mirror of
https://github.com/darksaid98/Builders-Utilities.git
synced 2026-12-01 22:14:56 +00:00
Updated Secret blocks and added check for disabling NoClip in GUI to put you back into creative.
This commit is contained in:
1 parent
0fcf7cc0c9
commit
2ad5284a6d
2 files changed
+5
-1
No files matched your search
@@ -40,7 +40,7 @@ public class SecretBlockMenuProvider implements InventoryProvider {
|
||||
private static final ItemStack BARRIER = Items.create(Material.BARRIER, (short) 0, 1, ChatColor.RED + "Barrier", "");
|
||||
private static final ItemStack DRAGON_EGG = Items.create(Material.DRAGON_EGG, (short) 0, 1, ChatColor.LIGHT_PURPLE + "Dragon Egg", "");
|
||||
private static final ItemStack STRUCTURE_VOID = Items.create(Material.STRUCTURE_VOID, (short) 0, 1, ChatColor.DARK_AQUA + "Structure Void", "");
|
||||
private static final ItemStack DEBUG_STICK = Items.create(Material.DEBUG_STICK, (short) 0, 1, ChatColor.AQUA + "Debug Stick", "");
|
||||
private static final ItemStack DEBUG_STICK = Items.create(Material.DEBUG_STICK, (short) 0, 1, ChatColor.AQUA + "Debug Stick", "&7Only works as operator in creative.");
|
||||
|
||||
@Override
|
||||
public void init(Player player, InventoryContents contents) {
|
||||
|
||||
@@ -34,6 +34,7 @@ import net.arcaniax.buildersutilities.menus.inv.ClickableItem;
|
||||
import net.arcaniax.buildersutilities.menus.inv.content.InventoryContents;
|
||||
import net.arcaniax.buildersutilities.menus.inv.content.InventoryProvider;
|
||||
import net.arcaniax.buildersutilities.utils.Items;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@@ -189,6 +190,9 @@ public class UtilitiesMenuProvider implements InventoryProvider {
|
||||
"&6No Clip", ENABLED_LORE + NO_CLIP_LORE),
|
||||
inventoryClickEvent -> {
|
||||
NoClipManager.noClipPlayerIds.remove(player.getUniqueId());
|
||||
if (player.getGameMode().equals(GameMode.SPECTATOR)){
|
||||
player.setGameMode(GameMode.CREATIVE);
|
||||
}
|
||||
setNoClipItem(player, contents);
|
||||
}));
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user