mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 14:05:25 +01:00
Allow customization of back and filler for gui
This commit is contained in:
parent
30b6c547dd
commit
75a5ff8c53
@ -153,7 +153,7 @@ public class GuiManager {
|
||||
i++;
|
||||
}
|
||||
|
||||
ItemStack filler = new ItemStack(Material.STAINED_GLASS_PANE, 1, (byte) 15);
|
||||
ItemStack filler = Jobs.getGCManager().guiFiller;
|
||||
|
||||
for (int y = 0; y < GuiInv.getContents().length; y++) {
|
||||
ItemStack item = GuiInv.getItem(y);
|
||||
@ -240,7 +240,7 @@ public class GuiManager {
|
||||
if (one != null)
|
||||
items.add(one);
|
||||
}
|
||||
|
||||
|
||||
int GuiSize = 54;
|
||||
int backButton = 45;
|
||||
|
||||
@ -253,7 +253,7 @@ public class GuiManager {
|
||||
GuiInv.setItem(i1, items.get(i1));
|
||||
}
|
||||
|
||||
ItemStack skull = new ItemStack(Material.JACK_O_LANTERN, 1, (byte) 0);
|
||||
ItemStack skull = Jobs.getGCManager().guiBackButton;
|
||||
|
||||
ItemMeta skullMeta = skull.getItemMeta();
|
||||
skullMeta.setDisplayName(Jobs.getLanguage().getMessage("command.info.gui.back"));
|
||||
@ -267,14 +267,14 @@ public class GuiManager {
|
||||
guiInfo.setbackButton(backButton);
|
||||
GuiList.put(player.getName(), guiInfo);
|
||||
|
||||
ItemStack filler = new ItemStack(Material.STAINED_GLASS_PANE, 1, (byte) 15);
|
||||
ItemStack filler = Jobs.getGCManager().guiFiller;
|
||||
|
||||
for (int y = 0; y < GuiInv.getContents().length; y++) {
|
||||
ItemStack item = GuiInv.getItem(y);
|
||||
if (item == null || item.getType() == Material.AIR)
|
||||
GuiInv.setItem(y, filler);
|
||||
}
|
||||
|
||||
|
||||
return GuiInv;
|
||||
}
|
||||
}
|
||||
|
@ -26,9 +26,11 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gamingmesh.jobs.Jobs;
|
||||
import com.gamingmesh.jobs.resources.jfep.Parser;
|
||||
@ -92,6 +94,10 @@ public class GeneralConfigManager {
|
||||
LevelChangeActionBar, SoundLevelupUse, SoundTitleChangeUse, UseServerAccount, EmptyServerAcountChat,
|
||||
EmptyServerAcountActionBar, ActionBarsMessageByDefault, ShowTotalWorkers, ShowPenaltyBonus, useDynamicPayment,
|
||||
useGlobalBoostScheduler, JobsGUIOpenOnBrowse, JobsGUIShowChatBrowse, JobsGUISwitcheButtons, JobsGUIOpenOnJoin;
|
||||
|
||||
public ItemStack guiBackButton;
|
||||
public ItemStack guiFiller;
|
||||
|
||||
public Integer levelLossPercentage, SoundLevelupVolume, SoundLevelupPitch, SoundTitleChangeVolume,
|
||||
SoundTitleChangePitch, ToplistInScoreboardInterval;
|
||||
public double MinimumOveralPaymentLimit;
|
||||
@ -821,6 +827,9 @@ public class GeneralConfigManager {
|
||||
c.getW().addComment("JobsBrowse.ShowPenaltyBonus", "Do you want to show GUI when performing /jobs join command");
|
||||
JobsGUIOpenOnJoin = c.get("JobsGUI.OpenOnJoin", true);
|
||||
|
||||
guiBackButton = new ItemStack(Material.getMaterial(c.get("JobsGUI.BackButton.Material", "JACK_O_LANTERN")), 1, (byte) c.get("JobsGUI.BackButton.Data", 0));
|
||||
guiFiller = new ItemStack(Material.getMaterial(c.get("JobsGUI.Filler.Material", "STAINED_GLASS_PANE")), 1, (byte) c.get("JobsGUI.Filler.Data", 15));
|
||||
|
||||
c.getW().addComment("Schedule.Boost.Enable", "Do you want to enable scheduler for global boost");
|
||||
useGlobalBoostScheduler = c.get("Schedule.Boost.Enable", false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user