mirror of
https://github.com/Zrips/Jobs.git
synced 2025-02-18 05:11:32 +01:00
Correct lore usage
This commit is contained in:
parent
30c06bb476
commit
513fc019fd
@ -206,25 +206,31 @@ public class GuiManager {
|
||||
i++;
|
||||
}
|
||||
|
||||
ItemStack next = Jobs.getGCManager().guiInfoButton;
|
||||
ItemMeta meta = next.getItemMeta();
|
||||
if (Jobs.getGCManager().InfoButtonSlot > 0) {
|
||||
ItemStack next = Jobs.getGCManager().guiInfoButton;
|
||||
ItemMeta meta = next.getItemMeta();
|
||||
|
||||
meta.setDisplayName(" ");
|
||||
meta.setLore(Jobs.getLanguage().getMessageList("command.info.gui.infoLore"));
|
||||
next.setItemMeta(meta);
|
||||
List<String> l = Jobs.getLanguage().getMessageList("command.info.gui.infoLore");
|
||||
|
||||
gui.addButton(new CMIGuiButton(Jobs.getGCManager().InfoButtonSlot - 1, next) {
|
||||
@Override
|
||||
public void click(GUIClickType type) {
|
||||
for (String one : Jobs.getGCManager().InfoButtonCommands) {
|
||||
if (one.equalsIgnoreCase("closeinv!")) {
|
||||
player.closeInventory();
|
||||
continue;
|
||||
if (!l.isEmpty())
|
||||
meta.setDisplayName(l.remove(0));
|
||||
if (!l.isEmpty())
|
||||
meta.setLore(l);
|
||||
next.setItemMeta(meta);
|
||||
|
||||
gui.addButton(new CMIGuiButton(Jobs.getGCManager().InfoButtonSlot - 1, next) {
|
||||
@Override
|
||||
public void click(GUIClickType type) {
|
||||
for (String one : Jobs.getGCManager().InfoButtonCommands) {
|
||||
if (one.equalsIgnoreCase("closeinv!")) {
|
||||
player.closeInventory();
|
||||
continue;
|
||||
}
|
||||
CMICommands.performCommand(Bukkit.getConsoleSender(), one.replace("[playerName]", player.getName()));
|
||||
}
|
||||
CMICommands.performCommand(Bukkit.getConsoleSender(), one.replace("[playerName]", player.getName()));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
gui.fillEmptyButtons();
|
||||
gui.open();
|
||||
|
@ -1053,6 +1053,7 @@ public class GeneralConfigManager {
|
||||
item = CMILib.getInstance().getItemManager().getItem(c.get("JobsGUI.NextButton.Material", "ARROW"));
|
||||
guiNextButton = item.getCMIType() == CMIMaterial.NONE ? CMIMaterial.ARROW.newItemStack() : item.getItemStack();
|
||||
|
||||
c.addComment("JobsGUI.InfoButton.Slot", "Slot for info button. Set it to 0 if you want to disable it","Locale can be customized in locale file under gui->infoLore section");
|
||||
InfoButtonSlot = c.get("JobsGUI.InfoButton.Slot", 9);
|
||||
guiInfoButton = item.getCMIType() == CMIMaterial.NONE ? CMIMaterial.ARROW.newItemStack() : item.getItemStack();
|
||||
item = CMILib.getInstance().getItemManager().getItem(c.get("JobsGUI.InfoButton.Material",
|
||||
|
Loading…
Reference in New Issue
Block a user