This commit is contained in:
Brianna 2019-09-28 17:03:49 -04:00
parent fa7b3594b4
commit 9788b7f424
4 changed files with 199 additions and 256 deletions

View File

@ -68,7 +68,7 @@ public class BlockEditorGui extends Gui {
plugin.getLocale().getMessage("interface.kitblock.editlore").getMessage().split("|")), plugin.getLocale().getMessage("interface.kitblock.editlore").getMessage().split("|")),
ClickType.LEFT, ClickType.LEFT,
event -> { event -> {
new GUIKitEditor(UltimateKits.getInstance(), player, kitBlockData.getKit(), this, null, 0); new GUIKitEditor(UltimateKits.getInstance(), event.player, kitBlockData.getKit(), this);
}); });
} }

View File

@ -1,15 +1,19 @@
package com.songoda.ultimatekits.gui; package com.songoda.ultimatekits.gui;
import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.CompatibleSound; import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.gui.AnvilGui;
import com.songoda.core.gui.Gui;
import com.songoda.core.gui.GuiUtils;
import com.songoda.core.utils.ItemUtils; import com.songoda.core.utils.ItemUtils;
import com.songoda.core.utils.TextUtils; import com.songoda.core.utils.TextUtils;
import com.songoda.ultimatekits.UltimateKits; import com.songoda.ultimatekits.UltimateKits;
import com.songoda.ultimatekits.kit.Kit; import com.songoda.ultimatekits.kit.Kit;
import com.songoda.ultimatekits.kit.KitAnimation; import com.songoda.ultimatekits.kit.KitAnimation;
import com.songoda.ultimatekits.kit.KitItem; import com.songoda.ultimatekits.kit.KitItem;
import com.songoda.ultimatekits.settings.Settings;
import com.songoda.ultimatekits.utils.Methods; import com.songoda.ultimatekits.utils.Methods;
import com.songoda.ultimatekits.utils.gui.AbstractAnvilGUI; import com.songoda.ultimatekits.utils.gui.AbstractAnvilGUI;
import com.songoda.ultimatekits.utils.gui.AbstractGUI;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Material; import org.bukkit.Material;
@ -18,77 +22,87 @@ import org.bukkit.event.inventory.ClickType;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.SkullMeta;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
public class GUIKitEditor extends AbstractGUI { public class GUIKitEditor extends Gui {
private UltimateKits plugin; private UltimateKits plugin;
private Kit kit; private Kit kit;
private AbstractGUI back; private Gui back;
private Player player;
private ItemStack[] inventoryItems; private ItemStack[] inventoryItems;
private boolean isInFuction = false; private boolean isInFuction = false;
private boolean isInInventory = false; private boolean isInInventory = false;
public GUIKitEditor(UltimateKits plugin, Player player, Kit kit, Gui back) {
private ItemStack toReplace;
private int slot;
private String title;
public GUIKitEditor(UltimateKits plugin, Player player, Kit kit, AbstractGUI back, ItemStack toReplace, int slot) {
super(player);
this.plugin = plugin; this.plugin = plugin;
this.kit = kit; this.kit = kit;
this.back = back; this.back = back;
this.player = player;
String name = kit.getShowableName(); setDefaultItem(null);
title = "&8You are editing kit: &9" + name + "&8."; setRows(6);
setTitle(plugin.getLocale().getMessage("interface.kiteditor.title")
.processPlaceholder("name", kit.getShowableName())
.getMessage());
this.toReplace = toReplace;
this.slot = slot;
init(title, 54);
saveItemsInstance(); saveItemsInstance();
getInvItems(); getInvItems();
setOnClose((event) -> {
this.saveKit(player, inventory, false);
if (!isInInventory && this.inventoryItems.length != 0) {
player.getInventory().setContents(this.inventoryItems);
player.updateInventory();
}
CompatibleSound.ENTITY_VILLAGER_YES.play(player);
});
} }
@Override private void paint() {
protected void constructGUI() { ItemStack glass1 = GuiUtils.getBorderItem(Settings.GLASS_TYPE_1.getMaterial());
inventory.clear(); ItemStack glass2 = GuiUtils.getBorderItem(Settings.GLASS_TYPE_2.getMaterial());
player.updateInventory(); ItemStack glass3 = GuiUtils.getBorderItem(Settings.GLASS_TYPE_3.getMaterial());
createButton(8, Material.valueOf(UltimateKits.getInstance().getConfig().getString("Interfaces.Exit Icon")), GuiUtils.mirrorFill(this, 0, 0, true, true, glass2);
UltimateKits.getInstance().getLocale().getMessage("interface.button.exit").getMessage()); GuiUtils.mirrorFill(this, 0, 1, true, true, glass2);
GuiUtils.mirrorFill(this, 0, 2, true, true, glass3);
GuiUtils.mirrorFill(this, 0, 3, false, true, glass1);
GuiUtils.mirrorFill(this, 1, 0, true, true, glass2);
ItemStack back = ItemUtils.getCustomHead("3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23"); // exit button
SkullMeta skull2Meta = (SkullMeta) back.getItemMeta(); setButton(0, 8, GuiUtils.createButtonItem(Settings.EXIT_ICON.getMaterial(CompatibleMaterial.OAK_DOOR),
back.setDurability((short) 3); plugin.getLocale().getMessage("interface.button.exit").getMessage()),
skull2Meta.setDisplayName(UltimateKits.getInstance().getLocale().getMessage("interface.button.back").getMessage()); ClickType.LEFT,
back.setItemMeta(skull2Meta); event -> exit());
// back button
if (this.back != null)
setButton(0, 0, GuiUtils.createButtonItem(ItemUtils.getCustomHead("3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23"),
plugin.getLocale().getMessage("interface.button.back").getMessage()),
ClickType.LEFT,
event -> event.player.closeInventory());
ItemStack it = new ItemStack(Material.CHEST, 1); ItemStack it = new ItemStack(Material.CHEST, 1);
ItemMeta itmeta = it.getItemMeta(); ItemMeta itmeta = it.getItemMeta();
itmeta.setDisplayName(Methods.formatText("&5&l" + kit.getName())); itmeta.setDisplayName(plugin.getLocale().newMessage("&5&l" + kit.getName()).getMessage());
ArrayList<String> lore = new ArrayList<>(); ArrayList<String> lore = new ArrayList<>();
lore.add(Methods.formatText("&fPermissions:")); lore.add(plugin.getLocale().newMessage("&&fPermissions:").getMessage());
lore.add(Methods.formatText("&7ultimatekits.kit." + kit.getName().toLowerCase())); lore.add(plugin.getLocale().newMessage("&&7ultimatekits.kit." + kit.getName().toLowerCase()).getMessage());
itmeta.setLore(lore); itmeta.setLore(lore);
it.setItemMeta(itmeta); it.setItemMeta(itmeta);
ItemStack glass = new ItemStack(plugin.isServerVersionAtLeast(ServerVersion.V1_13) ? Material.GRAY_STAINED_GLASS_PANE : Material.valueOf("STAINED_GLASS_PANE"), 1); ItemStack glass = CompatibleMaterial.GRAY_STAINED_GLASS_PANE.getItem();
ItemMeta glassmeta = glass.getItemMeta(); ItemMeta glassmeta = glass.getItemMeta();
glassmeta.setDisplayName(Methods.formatText("&" + kit.getName().replaceAll(".(?!$)", "$0&"))); glassmeta.setDisplayName(plugin.getLocale().newMessage("&&" + kit.getName().replaceAll(".(?!$)", "$0&")).getMessage());
glass.setItemMeta(glassmeta); glass.setItemMeta(glassmeta);
if (this.back != null)
inventory.setItem(0, back);
inventory.setItem(4, it); inventory.setItem(4, it);
int num = 10; int num = 10;
@ -117,23 +131,7 @@ public class GUIKitEditor extends AbstractGUI {
itemLore.add(TextUtils.convertToInvisibleLoreString("----")); itemLore.add(TextUtils.convertToInvisibleLoreString("----"));
itemLore.add(Methods.formatText("&7" + plugin.getLocale().getMessage("general.type.chance") + ": &6" + item.getChance() + "%")); itemLore.add(Methods.formatText("&7" + plugin.getLocale().getMessage("general.type.chance") + ": &6" + item.getChance() + "%"));
if (isInFuction) { if (isInFuction) {
itemLore.add(Methods.formatText("&7Display Item: &6" + (item.getDisplayItem() == null ? "" : item.getDisplayItem().name()))); itemLore.add(plugin.getLocale().getMessage("interface.kiteditor.itemfunctionlore").getMessage().split("|"));
itemLore.add(Methods.formatText("&7Display Name: &6" + Methods.formatText(item.getDisplayName())));
itemLore.add(Methods.formatText("&7Display Lore: &6" + Methods.formatText(item.getDisplayLore())));
}
itemLore.add("");
if (isInFuction) {
itemLore.add(Methods.formatText("&7Left-Click: &6To set a display item."));
itemLore.add(Methods.formatText("&7Middle-Click: &6To set a display name."));
itemLore.add(Methods.formatText("&7Right-Click: &6To set display lore."));
itemLore.add(Methods.formatText("&7Shift-Click: &6To set chance."));
itemLore.add("");
itemLore.add(Methods.formatText("&7Display options only show up on display."));
itemLore.add(Methods.formatText("&7This can be useful if you want to explain"));
itemLore.add(Methods.formatText("&7What an item does without putting it in the"));
itemLore.add(Methods.formatText("&7permanent lore."));
itemLore.add("");
itemLore.add(Methods.formatText("&6Leave function mode to move items."));
} }
meta.setLore(itemLore); meta.setLore(itemLore);
is.setItemMeta(meta); is.setItemMeta(meta);
@ -165,68 +163,52 @@ public class GUIKitEditor extends AbstractGUI {
toReplace = null; toReplace = null;
} }
inventory.setItem(3, Methods.getGlass());
inventory.setItem(5, Methods.getGlass());
inventory.setItem(48, Methods.getGlass());
inventory.setItem(50, Methods.getGlass());
if (this.back == null)
inventory.setItem(0, Methods.getBackgroundGlass(true));
inventory.setItem(1, Methods.getBackgroundGlass(true));
inventory.setItem(9, Methods.getBackgroundGlass(true));
inventory.setItem(7, Methods.getBackgroundGlass(true));
inventory.setItem(17, Methods.getBackgroundGlass(true));
inventory.setItem(54 - 18, Methods.getBackgroundGlass(true));
inventory.setItem(54 - 9, Methods.getBackgroundGlass(true));
inventory.setItem(54 - 8, Methods.getBackgroundGlass(true));
inventory.setItem(54 - 10, Methods.getBackgroundGlass(true));
inventory.setItem(54 - 2, Methods.getBackgroundGlass(true));
inventory.setItem(54 - 1, Methods.getBackgroundGlass(true));
inventory.setItem(2, Methods.getBackgroundGlass(false));
inventory.setItem(6, Methods.getBackgroundGlass(false));
inventory.setItem(54 - 7, Methods.getBackgroundGlass(false));
inventory.setItem(54 - 3, Methods.getBackgroundGlass(false));
updateInvButton(); updateInvButton();
} }
private void updateInvButton() { private void updateInvButton() {
ItemStack item = GuiUtils.createButtonItem(CompatibleMaterial.PAPER,
plugin.getLocale().getMessage("interface.kiteditor.itemediting").getMessage(),
plugin.getLocale().getMessage("interface.kiteditor.itemeditinglore").getMessage());
if (!isInFuction) { if (!isInFuction) {
createButton(48, Material.PAPER, "&6Switch To Item Editing", setUnlockedRange(1, 1, 1, 7);
"&7Click to enable", setUnlockedRange(2, 0, 3, 8);
"&7item editing."); setUnlockedRange(4, 1, 4, 7);
addDraggable(new Range(10, 43, null, true), true);
addDraggable(new Range(17, 17, null, true), false);
addDraggable(new Range(36, 36, null, true), false);
registerClickables();
} else { } else {
createButton(48, Material.PAPER, "&6Switch To Item Moving", unlockedCells.clear();
"&7Click to switch back", item = GuiUtils.createButtonItem(CompatibleMaterial.PAPER,
"&7to item moving."); plugin.getLocale().getMessage("interface.kiteditor.itemmoving").getMessage(),
removeDraggable(); plugin.getLocale().getMessage("interface.kiteditor.itemmovinglore").getMessage());
registerClickables();
} }
if (!isInInventory) { setButton(48, item,
createButton(50, Material.ITEM_FRAME, "&6Switch To Your Inventory", (event) -> {
"&7Click to switch to", isInFuction = !isInFuction;
"&7your inventory."); saveKit(player, inventory, true);
cancelBottom = true; paint();
registerClickables(); });
} else {
createButton(50, Material.ITEM_FRAME, "&6Switch To Kit Functions", ItemStack item2 = GuiUtils.createButtonItem(CompatibleMaterial.ITEM_FRAME,
"&7Click to switch back", plugin.getLocale().getMessage("interface.kiteditor.switchtokitfunctions").getMessage(),
"&7to the kit functions."); plugin.getLocale().getMessage("interface.kiteditor.switchtokitfunctionslore").getMessage().split("|"));
cancelBottom = false;
registerClickables(); setAcceptsItems(!isInInventory);
}
setButton(50, item2,
(event) -> {
if (!isInInventory) {
player.getInventory().setContents(inventoryItems);
isInInventory = true;
player.updateInventory();
} else {
saveItemsInstance();
getInvItems();
}
updateInvButton();
});
} }
private void saveItemsInstance() { private void saveItemsInstance() {
@ -237,28 +219,95 @@ public class GUIKitEditor extends AbstractGUI {
private void getInvItems() { private void getInvItems() {
isInInventory = false; isInInventory = false;
createButton(9, player.getInventory(), plugin.isServerVersionAtLeast(ServerVersion.V1_13) ? Material.REDSTONE_TORCH : Material.valueOf("REDSTONE_TORCH_ON"), "&6General Options", setButton(9, GuiUtils.createButtonItem(CompatibleMaterial.REDSTONE_TORCH,
"&7Click to edit adjust", plugin.getLocale().getMessage("interface.kiteditor.generaloptions").getMessage(),
"&7general options."); plugin.getLocale().getMessage("interface.kiteditor.generaloptionslore").getMessage().split("|")),
(event) -> guiManager.showGUI(player, new KitGeneralOptionsGui(plugin, player, kit, this)));
createButton(10, player.getInventory(), Material.EMERALD, "&9Selling Options", setButton(10, GuiUtils.createButtonItem(CompatibleMaterial.EMERALD,
"&7Click to edit adjust", plugin.getLocale().getMessage("interface.kiteditor.sellingoptions").getMessage(),
"&7selling options."); plugin.getLocale().getMessage("interface.kiteditor.sellingoptionslore").getMessage().split("|")),
(event) -> guiManager.showGUI(player, new KitSellingOptionsGui(plugin, player, kit, this)));
createButton(12, player.getInventory(), Material.ITEM_FRAME, "&5GUI Options", setButton(12, GuiUtils.createButtonItem(CompatibleMaterial.ITEM_FRAME,
"&7Click to edit GUI options", plugin.getLocale().getMessage("interface.kiteditor.guioptions").getMessage(),
"&7for this kit."); plugin.getLocale().getMessage("interface.kiteditor.guioptionslore").getMessage().split("|")),
(event) -> guiManager.showGUI(player, new KitGuiOptionsGui(plugin, player, kit, back)));
createButton(13, player.getInventory(), Material.PAPER, "&fAdd Command", setButton(13, GuiUtils.createButtonItem(CompatibleMaterial.PAPER,
"&7Click to add a command", plugin.getLocale().getMessage("interface.kiteditor.addcommand").getMessage(),
"&7to this kit."); plugin.getLocale().getMessage("interface.kiteditor.addcommandlore").getMessage().split("|")),
(event) -> {
AnvilGui gui = new AnvilGui(player, this);
gui.setTitle(plugin.getLocale().getMessage("interface.kiteditor.addcommandpromp").getMessage());
gui.setAction(aevent -> {
String msg = gui.getInputText();
createButton(14, player.getInventory(), plugin.isServerVersionAtLeast(ServerVersion.V1_13) ? Material.SUNFLOWER : Material.valueOf("DOUBLE_PLANT"), "&6Add Economy", ItemStack parseStack = new ItemStack(Material.PAPER, 1);
"&7Click to add money", ItemMeta meta = parseStack.getItemMeta();
"&7to this kit.");
createButton(17, player.getInventory(), Material.CHEST, "&6Kit Animation", ArrayList<String> lore = new ArrayList<>();
"&7Currently: &6" + kit.getKitAnimation().name());
int index = 0;
while (index < msg.length()) {
lore.add(ChatColor.GREEN + "/" + msg.substring(index, Math.min(index + 30, msg.length())));
index += 30;
}
meta.setLore(lore);
meta.setDisplayName(plugin.getLocale().getMessage("general.type.command").getMessage());
parseStack.setItemMeta(meta);
plugin.getLocale().newMessage(plugin.getLocale().getMessage("interface.kiteditor.addcommandok")
.processPlaceholder("command", msg).getMessage())
.sendPrefixedMessage(player);
this.inventory.addItem(parseStack);
});
});
setButton(14, GuiUtils.createButtonItem(CompatibleMaterial.SUNFLOWER,
plugin.getLocale().getMessage("interface.kiteditor.addeconomy").getMessage(),
plugin.getLocale().getMessage("interface.kiteditor.addeconomylore").getMessage().split("|")),
(event) -> {
AnvilGui gui = new AnvilGui(player, this);
gui.setTitle(plugin.getLocale().getMessage("interface.kiteditor.addeconomyprompt").getMessage());
gui.setAction(aevent -> {
String msg = gui.getInputText();
ItemStack parseStack = new ItemStack(Material.PAPER, 1);
ItemMeta meta = parseStack.getItemMeta();
ArrayList<String> lore = new ArrayList<>();
int index = 0;
while (index < msg.length()) {
lore.add(ChatColor.GREEN + "$" + msg.substring(index, Math.min(index + 30, msg.length())));
index += 30;
}
meta.setLore(lore);
meta.setDisplayName(plugin.getLocale().getMessage("general.type.money").getMessage());
parseStack.setItemMeta(meta);
plugin.getLocale().getMessage("interface.kiteditor.addeconomyok")
.sendPrefixedMessage(player);
this.inventory.addItem(parseStack);
});
});
setButton(17, GuiUtils.createButtonItem(CompatibleMaterial.CHEST,
plugin.getLocale().getMessage("interface.kiteditor.animation").getMessage(),
plugin.getLocale().getMessage("interface.kiteditor.animationlore").getMessage().split("|")),
(event) -> {
if (kit.getKitAnimation() == KitAnimation.NONE) {
kit.setKitAnimation(KitAnimation.ROULETTE);
} else {
kit.setKitAnimation(KitAnimation.NONE);
}
getInvItems();
});
} }
@ -385,94 +434,6 @@ public class GUIKitEditor extends AbstractGUI {
protected void registerClickables() { protected void registerClickables() {
resetClickables(); resetClickables();
if (!isInInventory) {
registerClickable(9, true, ((player, inventory, cursor, slot, type) ->
new KitGeneralOptionsGui(plugin, player, this, kit)));
registerClickable(12, true, ((player, inventory, cursor, slot, type) ->
new KitGuiOptionsGui(plugin, player, this, kit)));
registerClickable(10, true, ((player, inventory, cursor, slot, type) ->
guiManager.showGui(player, new KitSellingOptionsGui(plugin, player, kit, this));
registerClickable(17, true, (player, inventory, cursor, slot, type) -> {
if (kit.getKitAnimation() == KitAnimation.NONE) {
kit.setKitAnimation(KitAnimation.ROULETTE);
} else {
kit.setKitAnimation(KitAnimation.NONE);
}
getInvItems();
});
registerClickable(14, true, ((player, inventory, cursor, slot, type) -> {
saveKit(player, this.inventory, true);
AbstractAnvilGUI gui = new AbstractAnvilGUI(player, event -> {
String msg = event.getName();
ItemStack parseStack2 = new ItemStack(Material.PAPER, 1);
ItemMeta meta2 = parseStack2.getItemMeta();
ArrayList<String> lore2 = new ArrayList<>();
int index2 = 0;
while (index2 < msg.length()) {
lore2.add("§a$" + msg.substring(index2, Math.min(index2 + 30, msg.length())));
index2 += 30;
}
meta2.setLore(lore2);
meta2.setDisplayName(plugin.getLocale().getMessage("general.type.money").getMessage());
parseStack2.setItemMeta(meta2);
plugin.getLocale().newMessage("&8Money &5$" + msg + "&8 has been added to your kit.")
.sendPrefixedMessage(player);
this.slot = 0;
this.toReplace = parseStack2;
});
gui.setOnClose((player1, inventory1) -> init(title, 54));
ItemStack item = new ItemStack(Material.DIAMOND);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName("Enter Price (No $)");
item.setItemMeta(meta);
gui.setSlot(AbstractAnvilGUI.AnvilSlot.INPUT_LEFT, item);
gui.open();
}));
registerClickable(13, true, ((player, inventory, cursor, slot, type) -> {
saveKit(player, this.inventory, true);
AbstractAnvilGUI gui = new AbstractAnvilGUI(player, event -> {
String msg = event.getName();
ItemStack parseStack = new ItemStack(Material.PAPER, 1);
ItemMeta meta = parseStack.getItemMeta();
ArrayList<String> lore = new ArrayList<>();
int index = 0;
while (index < msg.length()) {
lore.add(ChatColor.COLOR_CHAR + "a/" + msg.substring(index, Math.min(index + 30, msg.length())));
index += 30;
}
meta.setLore(lore);
meta.setDisplayName(plugin.getLocale().getMessage("general.type.command").getMessage());
parseStack.setItemMeta(meta);
plugin.getLocale().newMessage("&8Command &5" + msg + "&8 has been added to your kit.")
.sendPrefixedMessage(player);
this.slot = 0;
this.toReplace = parseStack;
});
gui.setOnClose((player1, inventory1) -> init(title, 54));
ItemStack item = new ItemStack(Material.PAPER);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName("Enter Command (No /)");
item.setItemMeta(meta);
gui.setSlot(AbstractAnvilGUI.AnvilSlot.INPUT_LEFT, item);
gui.open();
}));
}
if (isInFuction) { if (isInFuction) {
registerClickable(10, 43, ClickType.SHIFT_LEFT, (player, inventory, cursor, slot, type) -> { registerClickable(10, 43, ClickType.SHIFT_LEFT, (player, inventory, cursor, slot, type) -> {
if (inventory.getItem(slot) == null) return; if (inventory.getItem(slot) == null) return;
@ -491,44 +452,6 @@ public class GUIKitEditor extends AbstractGUI {
replaceItem(Action.DISPLAY_LORE, player, inventory.getItem(slot), slot); replaceItem(Action.DISPLAY_LORE, player, inventory.getItem(slot), slot);
}); });
} }
registerClickable(8, (player, inventory, cursor, slot, type) -> player.closeInventory());
registerClickable(0, ((player, inventory, cursor, slot, type) -> {
if (back == null) return;
back.init(back.getSetTitle(), back.getInventory().getSize());
}));
registerClickable(48, ((player1, inventory, cursor, slot1, type) -> {
isInFuction = !isInFuction;
saveKit(player1, inventory,true);
constructGUI();
}));
registerClickable(50, (player, inventory, cursor, slot, type) -> {
if (!isInInventory) {
player.getInventory().setContents(inventoryItems);
isInInventory = true;
player.updateInventory();
} else {
saveItemsInstance();
getInvItems();
}
updateInvButton();
});
}
@Override
protected void registerOnCloses() {
registerOnClose((player1, inventory1) -> {
this.saveKit(player1, inventory1, false);
if (!isInInventory && this.inventoryItems.length != 0) {
player.getInventory().setContents(this.inventoryItems);
player.updateInventory();
}
CompatibleSound.ENTITY_VILLAGER_YES.play(player);
});
} }
public enum Action {NONE, CHANCE, DISPLAY_ITEM, DISPLAY_NAME, DISPLAY_LORE} public enum Action {NONE, CHANCE, DISPLAY_ITEM, DISPLAY_NAME, DISPLAY_LORE}

View File

@ -33,10 +33,6 @@ public class Methods {
return false; return false;
} }
public static String getKitFromLocation(Location location) {
return UltimateKits.getInstance().getConfig().getString("data.block." + serializeLocation(location));
}
/** /**
* Serializes the location of the block specified. * Serializes the location of the block specified.
* *

View File

@ -102,8 +102,32 @@ interface.kitoptions.destroylore = "|&7Click this to destroy this kit."
interface.kitoptions.destroyprompt = "Enter \"%kit%\"" interface.kitoptions.destroyprompt = "Enter \"%kit%\""
interface.kitoptions.destroyok = "&cKit destroyed successfully." interface.kitoptions.destroyok = "&cKit destroyed successfully."
interface.kitoptions.destroycancel = "&cKit was not Destroyed." interface.kitoptions.destroycancel = "&cKit was not Destroyed."
interface.kiteditor.title = "&8You are editing kit: &9%name&8."
interface.kiteditor.generaloptions = "&6General Options"
interface.kiteditor.generaloptionslore = "&7Click to edit adjust|&7general options."
interface.kiteditor.sellingoptions = "&9Selling Options"
interface.kiteditor.sellingoptionslore = "&7Click to edit adjust|&7selling options."
interface.kiteditor.guioptions = "&5GUI Options"
interface.kiteditor.guioptionslore = "&7Click to edit GUI options|&7for this kit."
interface.kiteditor.addcommand = "&fAdd Command"
interface.kiteditor.addcommandlore = "&7Click to add a command|&7to this kit."
interface.kiteditor.addcommandpromp = "Enter Command (No /)"
interface.kiteditor.addcommandok = "&8Command &5%command%&8 has been added to your kit."
interface.kiteditor.addeconomy = "&6Add Economy"
interface.kiteditor.addeconomylore = "&7Click to add money|&7to this kit."
interface.kiteditor.addeconomyprompt = "Enter Price (No $)"
interface.kiteditor.addeconomyok = "&8Money &5$%amount%&8 has been added to your kit."
interface.kiteditor.animation = "&6Kit Animation"
interface.kiteditor.animationlore = "&7Currently: &6%animation%"
interface.kiteditor.itemediting = "&6Switch To Item Editing"
interface.kiteditor.itemeditinglore = "&7Click to enable|&7item editing."
interface.kiteditor.itemmoving = "&6Switch To Item Moving"
interface.kiteditor.itemmovinglore = "&7Click to switch back|&7to item moving."
interface.kiteditor.switchtoinventory = "&6Switch To Your Inventory"
interface.kiteditor.switchtoinventorylore = "&7Click to switch to|&7your inventory."
interface.kiteditor.switchtokitfunctions = "&6Switch To Kit Functions"
interface.kiteditor.switchtokitfunctionslore = "&7Click to switch back|&7to the kit functions."
interface.kiteditor.itemfunctionlore = "&7Display Item: &6%item%|&7Display Name: &6%name%|&7Display Lore: &6||&7Left-Click: &6To set a display item.|&7Middle-Click: &6To set a display name.|&7Right-Click: &6To set display lore.|&7Shift-Click: &6To set chance.||&7Display options only show up on display.|"&7This can be useful if you want to explain|&7What an item does without putting it in the|&7permanent lore.||&6Leave function mode to move items."
#Command Messages #Command Messages