Various fixes.

This commit is contained in:
Brianna 2019-10-06 12:17:33 -04:00
parent 77d3c8b192
commit 04f412a94c
5 changed files with 8 additions and 6 deletions

View File

@ -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;

View File

@ -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));
});
}

View File

@ -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);
});

View File

@ -115,7 +115,7 @@ public class KitEditorGui extends DoubleGui {
if (!isInFuction)
setItem(num, is);
setButton(num, is, null);
else {
setButton(num, is,
(event) -> {

View File

@ -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."