mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Made requested changes
- Added null check - Changed "a access port" to "the access port" - Removed extra menu.open(p)
This commit is contained in:
parent
6dd56e23f2
commit
e4efed0640
@ -50,17 +50,18 @@ public class ReactorAccessPort extends SlimefunItem {
|
||||
if (reactor != null) {
|
||||
menu.replaceExistingItem(INFO_SLOT, new CustomItem(new ItemStack(Material.GREEN_WOOL), "&7Reactor", "", "&6Detected", "", "&7> Click to view Reactor"));
|
||||
menu.addMenuClickHandler(INFO_SLOT, (p, slot, item, action) -> {
|
||||
reactor.open(p);
|
||||
if(reactor != null) {
|
||||
reactor.open(p);
|
||||
}
|
||||
newInstance(menu, b);
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
else {
|
||||
menu.replaceExistingItem(INFO_SLOT, new CustomItem(new ItemStack(Material.RED_WOOL), "&7Reactor", "", "&cNot detected", "", "&7Reactor must be", "&7placed 3 blocks below", "&7a access port!"));
|
||||
menu.replaceExistingItem(INFO_SLOT, new CustomItem(new ItemStack(Material.RED_WOOL), "&7Reactor", "", "&cNot detected", "", "&7Reactor must be", "&7placed 3 blocks below", "&7the access port!"));
|
||||
menu.addMenuClickHandler(INFO_SLOT, (p, slot, item, action) -> {
|
||||
newInstance(menu, b);
|
||||
menu.open(p);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user