1515import org .bukkit .inventory .meta .ItemMeta ;
1616
1717import fr .xyness .SCS .SimpleClaimSystem ;
18+ import fr .xyness .SCS .Config .ClaimGuis ;
1819import fr .xyness .SCS .Types .CPlayer ;
1920import fr .xyness .SCS .Types .Claim ;
2021
@@ -28,87 +29,6 @@ public class ClaimSettingsGui implements InventoryHolder {
2829 // * Variables *
2930 // ***************
3031
31-
32- /**
33- * A map containing the key-to-slot mappings.
34- */
35- private static final Map <String , Integer > keyToSlotMap = new HashMap <>();
36-
37- /**
38- * A map containing the key-to-material mappings.
39- */
40- private static final Map <String , Material > keyToMaterialMap = new HashMap <>();
41-
42- static {
43- keyToSlotMap .put ("Build" , 1 );
44- keyToSlotMap .put ("Destroy" , 2 );
45- keyToSlotMap .put ("Buttons" , 3 );
46- keyToSlotMap .put ("Items" , 4 );
47- keyToSlotMap .put ("InteractBlocks" , 5 );
48- keyToSlotMap .put ("Levers" , 6 );
49- keyToSlotMap .put ("Plates" , 7 );
50- keyToSlotMap .put ("Doors" , 10 );
51- keyToSlotMap .put ("Trapdoors" , 11 );
52- keyToSlotMap .put ("Fencegates" , 12 );
53- keyToSlotMap .put ("Tripwires" , 13 );
54- keyToSlotMap .put ("RepeatersComparators" , 14 );
55- keyToSlotMap .put ("Bells" , 15 );
56- keyToSlotMap .put ("Entities" , 16 );
57- keyToSlotMap .put ("Teleportations" , 19 );
58- keyToSlotMap .put ("Damages" , 20 );
59- keyToSlotMap .put ("Fly" , 21 );
60- keyToSlotMap .put ("Frostwalker" , 22 );
61- keyToSlotMap .put ("Weather" , 23 );
62- keyToSlotMap .put ("GuiTeleport" , 24 );
63- keyToSlotMap .put ("Portals" , 25 );
64- keyToSlotMap .put ("Elytra" , 28 );
65- keyToSlotMap .put ("Enter" , 29 );
66- keyToSlotMap .put ("ItemsPickup" , 30 );
67- keyToSlotMap .put ("ItemsDrop" , 32 );
68- keyToSlotMap .put ("SpecialBlocks" , 33 );
69- keyToSlotMap .put ("Windcharges" , 34 );
70-
71- keyToSlotMap .put ("Explosions" , 10 );
72- keyToSlotMap .put ("Liquids" , 11 );
73- keyToSlotMap .put ("Redstone" , 12 );
74- keyToSlotMap .put ("Firespread" , 14 );
75- keyToSlotMap .put ("Monsters" , 15 );
76- keyToSlotMap .put ("Pvp" , 16 );
77-
78- keyToMaterialMap .put ("Build" , Material .OAK_STAIRS );
79- keyToMaterialMap .put ("Destroy" , Material .IRON_PICKAXE );
80- keyToMaterialMap .put ("Buttons" , Material .STONE_BUTTON );
81- keyToMaterialMap .put ("Items" , Material .BOW );
82- keyToMaterialMap .put ("InteractBlocks" , Material .RED_SHULKER_BOX );
83- keyToMaterialMap .put ("Levers" , Material .LEVER );
84- keyToMaterialMap .put ("Plates" , Material .STONE_PRESSURE_PLATE );
85- keyToMaterialMap .put ("Doors" , Material .OAK_DOOR );
86- keyToMaterialMap .put ("Trapdoors" , Material .OAK_TRAPDOOR );
87- keyToMaterialMap .put ("Fencegates" , Material .OAK_FENCE_GATE );
88- keyToMaterialMap .put ("Tripwires" , Material .TRIPWIRE_HOOK );
89- keyToMaterialMap .put ("RepeatersComparators" , Material .REPEATER );
90- keyToMaterialMap .put ("Bells" , Material .BELL );
91- keyToMaterialMap .put ("Entities" , Material .ARMOR_STAND );
92- keyToMaterialMap .put ("Explosions" , Material .TNT );
93- keyToMaterialMap .put ("Liquids" , Material .WATER_BUCKET );
94- keyToMaterialMap .put ("Redstone" , Material .REDSTONE );
95- keyToMaterialMap .put ("Frostwalker" , Material .DIAMOND_BOOTS );
96- keyToMaterialMap .put ("Firespread" , Material .CAMPFIRE );
97- keyToMaterialMap .put ("Teleportations" , Material .ENDER_PEARL );
98- keyToMaterialMap .put ("Damages" , Material .APPLE );
99- keyToMaterialMap .put ("Monsters" , Material .STRING );
100- keyToMaterialMap .put ("GuiTeleport" , Material .COMPASS );
101- keyToMaterialMap .put ("Fly" , Material .PRISMARINE_SHARD );
102- keyToMaterialMap .put ("Pvp" , Material .DIAMOND_SWORD );
103- keyToMaterialMap .put ("Weather" , Material .SNOWBALL );
104- keyToMaterialMap .put ("Portals" , Material .END_PORTAL_FRAME );
105- keyToMaterialMap .put ("Enter" , Material .BIRCH_DOOR );
106- keyToMaterialMap .put ("ItemsPickup" , Material .HOPPER );
107- keyToMaterialMap .put ("ItemsDrop" , Material .FEATHER );
108- keyToMaterialMap .put ("Elytra" , Material .ELYTRA );
109- keyToMaterialMap .put ("SpecialBlocks" , Material .SPAWNER );
110- keyToMaterialMap .put ("Windcharges" , Material .WHITE_DYE );
111- }
11232
11333 /** Inventory for the GUI. */
11434 private Inventory inv ;
@@ -249,7 +169,7 @@ public CompletableFuture<Boolean> loadItems(Player player, Claim claim, String r
249169 * @return The slot number associated with the key, or -1 if the key is not found.
250170 */
251171 public static int getSlotByKey (String key ) {
252- return keyToSlotMap .getOrDefault (key , -1 );
172+ return ClaimGuis . keyToSlotMap .getOrDefault (key , -1 );
253173 }
254174
255175 /**
@@ -259,7 +179,7 @@ public static int getSlotByKey(String key) {
259179 * @return The material associated with the key, or null if the key is not found.
260180 */
261181 public static Material getMaterialByKey (String key ) {
262- return keyToMaterialMap .getOrDefault (key , null );
182+ return ClaimGuis . keyToMaterialMap .getOrDefault (key , null );
263183 }
264184
265185 /**
0 commit comments