Add more blocks to secretblocks (#11)

* Improve permission handling and implement debug listener

* Fix custom no-permission message

* Fix ender dragon egg teleport bypass when sneaking

* Build shadowJar by default

* Provide more blocks to secretblocks
This commit is contained in:
NotMyFault authored and GitHub committed 2020-09-14 14:06:41 +02:00
1 parent 826448f29c
commit 08efc339db
2 files changed
+22 -8

No files matched your search

@@ -25,7 +25,6 @@
package net.arcaniax.buildersutilities.menus;
import net.arcaniax.buildersutilities.Main;
import net.arcaniax.buildersutilities.menus.inv.ClickableItem;
import net.arcaniax.buildersutilities.menus.inv.content.InventoryContents;
import net.arcaniax.buildersutilities.menus.inv.content.InventoryProvider;
@@ -36,20 +35,21 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
public class SecretBlockMenuProvider implements InventoryProvider {
private static final ItemStack SPAWNER = Items.create(Material.SPAWNER, (short) 0, 1, ChatColor.DARK_AQUA + "Spawner Cage", "");
private static final ItemStack SPAWNER = Items.create(Material.SPAWNER, (short) 0, 1, ChatColor.DARK_AQUA + "Pig Spawner", "");
private static final ItemStack BARRIER = Items.create(Material.BARRIER, (short) 0, 1, ChatColor.DARK_AQUA + "Barrier", "");
private static final ItemStack DRAGON_EGG = Items.create(Material.DRAGON_EGG, (short) 0, 1, ChatColor.DARK_AQUA + "Dragon Egg", "");
private static final ItemStack GRASS_PATH = Items.create(Material.GRASS_PATH, (short) 0, 1, ChatColor.DARK_AQUA + "Grass Path", "");
private static final ItemStack STRUCTURE_BLOCK = Items.create(Material.STRUCTURE_BLOCK, (short) 0, 1, ChatColor.DARK_AQUA + "Structure Block", "");
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.DARK_AQUA + "Debug Stick", "&7Only works as operator in creative.");
@Override
public void init(Player player, InventoryContents contents) {
contents.set(0, 0, ClickableItem.of(SPAWNER, inventoryClickEvent -> player.getInventory().addItem(new ItemStack(Material.SPAWNER))));
contents.set(0, 1, ClickableItem.of(BARRIER, inventoryClickEvent -> player.getInventory().addItem(new ItemStack(Material.BARRIER))));
contents.set(0, 2, ClickableItem.of(DRAGON_EGG, inventoryClickEvent -> player.getInventory().addItem(new ItemStack(Material.DRAGON_EGG))));
if (Main.getInstance().getNmsManager().isAtLeastVersion(1, 9, 0)) {
contents.set(0, 3, ClickableItem.of(GRASS_PATH, inventoryClickEvent -> player.getInventory().addItem(new ItemStack(Material.GRASS_PATH))));
}
contents.set(0, 3, ClickableItem.of(STRUCTURE_BLOCK, inventoryClickEvent -> player.getInventory().addItem(new ItemStack(Material.STRUCTURE_BLOCK))));
contents.set(0, 4, ClickableItem.of(STRUCTURE_VOID, inventoryClickEvent -> player.getInventory().addItem(new ItemStack(Material.STRUCTURE_VOID))));
contents.set(0, 5, ClickableItem.of(DEBUG_STICK, inventoryClickEvent -> player.getInventory().addItem(new ItemStack(Material.DEBUG_STICK))));
}
}