From 04f412a94cc39d93be868c2c7fa47658eeacb664 Mon Sep 17 00:00:00 2001 From: Brianna Date: Sun, 6 Oct 2019 12:17:33 -0400 Subject: [PATCH] Various fixes. --- src/main/java/com/songoda/ultimatekits/UltimateKits.java | 6 +++--- .../java/com/songoda/ultimatekits/gui/BlockEditorGui.java | 2 +- .../com/songoda/ultimatekits/gui/KitDecorOptionsGui.java | 2 ++ .../java/com/songoda/ultimatekits/gui/KitEditorGui.java | 2 +- src/main/resources/en_US.lang | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/songoda/ultimatekits/UltimateKits.java b/src/main/java/com/songoda/ultimatekits/UltimateKits.java index f5819ee..1402871 100644 --- a/src/main/java/com/songoda/ultimatekits/UltimateKits.java +++ b/src/main/java/com/songoda/ultimatekits/UltimateKits.java @@ -324,16 +324,16 @@ public class UltimateKits extends SongodaPlugin { private Location getKitLocation(KitBlockData data, int lines) { Location location = data.getLocation(); - double multi = .25 * lines; + double multi = .1 * lines; if (data.isDisplayingItems()) { - multi += .40; + multi += .15; } Material type = location.getBlock().getType(); if (type == Material.TRAPPED_CHEST || type == Material.CHEST || type.name().contains("SIGN") || type == Material.ENDER_CHEST) { - multi -= .15; + multi -= .10; } location.add(0, multi, 0); return location; diff --git a/src/main/java/com/songoda/ultimatekits/gui/BlockEditorGui.java b/src/main/java/com/songoda/ultimatekits/gui/BlockEditorGui.java index 1d3799d..620a76e 100644 --- a/src/main/java/com/songoda/ultimatekits/gui/BlockEditorGui.java +++ b/src/main/java/com/songoda/ultimatekits/gui/BlockEditorGui.java @@ -68,7 +68,7 @@ public class BlockEditorGui extends Gui { plugin.getLocale().getMessage("interface.kitblock.editlore").getMessage().split("\\|")), ClickType.LEFT, event -> { - new KitEditorGui(UltimateKits.getInstance(), event.player, kitBlockData.getKit(), this); + guiManager.showGUI(event.player, new KitEditorGui(UltimateKits.getInstance(), event.player, kitBlockData.getKit(), this)); }); } diff --git a/src/main/java/com/songoda/ultimatekits/gui/KitDecorOptionsGui.java b/src/main/java/com/songoda/ultimatekits/gui/KitDecorOptionsGui.java index 1d929e4..b099ae8 100644 --- a/src/main/java/com/songoda/ultimatekits/gui/KitDecorOptionsGui.java +++ b/src/main/java/com/songoda/ultimatekits/gui/KitDecorOptionsGui.java @@ -67,7 +67,9 @@ public class KitDecorOptionsGui extends Gui { plugin.getLocale().getMessage("interface.kitdecor.display").getMessage(), kitBlockData.isDisplayingItems() ? enableLore : disableLore), event -> { + plugin.removeHologram(kitBlockData); kitBlockData.setDisplayingItems(!kitBlockData.isDisplayingItems()); + plugin.updateHologram(kitBlockData); updateItemLore(event.slot, kitBlockData.isDisplayingItems() ? enableLore : disableLore); }); diff --git a/src/main/java/com/songoda/ultimatekits/gui/KitEditorGui.java b/src/main/java/com/songoda/ultimatekits/gui/KitEditorGui.java index 9d0f497..37e0e84 100644 --- a/src/main/java/com/songoda/ultimatekits/gui/KitEditorGui.java +++ b/src/main/java/com/songoda/ultimatekits/gui/KitEditorGui.java @@ -115,7 +115,7 @@ public class KitEditorGui extends DoubleGui { if (!isInFuction) - setItem(num, is); + setButton(num, is, null); else { setButton(num, is, (event) -> { diff --git a/src/main/resources/en_US.lang b/src/main/resources/en_US.lang index b4ee212..60ba021 100644 --- a/src/main/resources/en_US.lang +++ b/src/main/resources/en_US.lang @@ -72,7 +72,7 @@ interface.kitsell.linknoeco = "&8ECO has been removed from this kit. Note you ca interface.kitsell.price = "&a&lSet kit price" interface.kitsell.priceon = "&7Currently: &a$%price%&7." interface.kitsell.priceoff = "&7Currently: &cNot set&7." -interface.kitsell.pricelore = "%onoff%||&7Clicking this option will|&7allow you to set a price|&7that players will be able to|&7purchase this kit for|&7requires &aVault&7." +interface.kitsell.pricelore = "%onoff%||&7Clicking this option will|&7allow you to set a price|&7that players will be able to|&7purchase this kit for|&7requires a compatible economy plugin&7." interface.kitsell.pricenoeco = "&8You must have an economy plugin installed to utilize economy.." interface.kitsell.priceprompt = "Set Price:" interface.kitsell.pricenonumber = "&a%input% &8is not a positive number."