mirror of
https://github.com/songoda/EpicHeads.git
synced 2025-02-18 04:21:20 +01:00
Added ability to disable unwanted global heads.
This commit is contained in:
parent
e7956f7217
commit
bc3a638979
@ -190,7 +190,11 @@ public class EpicHeads extends JavaPlugin {
|
||||
|
||||
Category category = tagOptional.orElseGet(() -> new Category(categoryStr));
|
||||
|
||||
Head head = new Head(Integer.parseInt((String) jsonObject.get("id")),
|
||||
int id = Integer.parseInt((String) jsonObject.get("id"));
|
||||
|
||||
if (SettingsManager.Setting.DISABLED_HEADS.getIntegerList().contains(id)) continue;
|
||||
|
||||
Head head = new Head(id,
|
||||
(String) jsonObject.get("name"),
|
||||
(String) jsonObject.get("url"),
|
||||
category,
|
||||
|
@ -178,6 +178,8 @@ public class SettingsManager implements Listener {
|
||||
DROP_PLAYER_HEADS("Main.Drop Player Heads", true),
|
||||
DROP_CHANCE("Main.Head Drop Chance", "25%"),
|
||||
|
||||
DISABLED_HEADS("Main.Disabled Global Heads", Arrays.asList(34567, 34568, 34569)),
|
||||
|
||||
GLASS_TYPE_1("Interfaces.Glass Type 1", 7),
|
||||
GLASS_TYPE_2("Interfaces.Glass Type 2", 11),
|
||||
GLASS_TYPE_3("Interfaces.Glass Type 3", 3),
|
||||
@ -205,6 +207,10 @@ public class SettingsManager implements Listener {
|
||||
return EpicHeads.getInstance().getConfig().getStringList(setting);
|
||||
}
|
||||
|
||||
public List<Integer> getIntegerList() {
|
||||
return EpicHeads.getInstance().getConfig().getIntegerList(setting);
|
||||
}
|
||||
|
||||
public boolean getBoolean() {
|
||||
return EpicHeads.getInstance().getConfig().getBoolean(setting);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user