Skip to content

Commit

Permalink
Bug fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
biscuut committed Sep 13, 2018
1 parent fdd75f6 commit 7bf6984
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
30 changes: 18 additions & 12 deletions src/main/java/xyz/biscut/chunkbuster/events/PlayerEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,26 @@ public void onChunkBusterPlace(BlockPlaceEvent e) {
if (!p.getOpenInventory().getTitle().contains(main.getConfigValues().getGUITitle())) {
Inventory confirmInv = Bukkit.createInventory(null, 9 * main.getConfigValues().getGUIRows(), main.getConfigValues().getGUITitle());
ItemStack acceptItem = main.getConfigValues().getConfirmBlockItemStack();
ItemMeta acceptItemMeta = acceptItem.getItemMeta();
acceptItemMeta.setDisplayName(main.getConfigValues().getConfirmName());
acceptItemMeta.setLore(main.getConfigValues().getConfirmLore());
acceptItem.setItemMeta(acceptItemMeta);
if (!acceptItem.getType().equals(Material.AIR)) {
ItemMeta acceptItemMeta = acceptItem.getItemMeta();
acceptItemMeta.setDisplayName(main.getConfigValues().getConfirmName());
acceptItemMeta.setLore(main.getConfigValues().getConfirmLore());
acceptItem.setItemMeta(acceptItemMeta);
}
ItemStack cancelItem = main.getConfigValues().getCancelBlockItemStack();
ItemMeta cancelItemMeta = cancelItem.getItemMeta();
cancelItemMeta.setDisplayName(main.getConfigValues().getCancelName());
cancelItemMeta.setLore(main.getConfigValues().getCancelLore());
cancelItem.setItemMeta(cancelItemMeta);
if (!cancelItem.getType().equals(Material.AIR)) {
ItemMeta cancelItemMeta = cancelItem.getItemMeta();
cancelItemMeta.setDisplayName(main.getConfigValues().getCancelName());
cancelItemMeta.setLore(main.getConfigValues().getCancelLore());
cancelItem.setItemMeta(cancelItemMeta);
}
ItemStack fillItem = main.getConfigValues().getFillItemStack();
ItemMeta fillItemMeta = fillItem.getItemMeta();
fillItemMeta.setDisplayName(main.getConfigValues().getFillName());
fillItemMeta.setLore(main.getConfigValues().getFillLore());
fillItem.setItemMeta(fillItemMeta);
if (!fillItem.getType().equals(Material.AIR)) {
ItemMeta fillItemMeta = fillItem.getItemMeta();
fillItemMeta.setDisplayName(main.getConfigValues().getFillName());
fillItemMeta.setLore(main.getConfigValues().getFillLore());
fillItem.setItemMeta(fillItemMeta);
}
int slotCounter = 1;
for (int i = 0; i < 9 * main.getConfigValues().getGUIRows(); i++) {
if (slotCounter < 5) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class SoundTimer extends BukkitRunnable {

public SoundTimer(ChunkBuster main, Player p, int count) {
this.main = main;
this.p = p;
this.count = count;
}

Expand Down

0 comments on commit 7bf6984

Please sign in to comment.