mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-02 14:38:56 +00:00
Move registry instance out of Main
This commit is contained in:
1 parent
1dd938da60
commit
89fc6d1769
6 files changed
+18
-9
No files matched your search
@@ -15,6 +15,7 @@ import java.util.stream.Stream;
|
||||
|
||||
public class WarItemRegistry {
|
||||
|
||||
private static WarItemRegistry instance;
|
||||
|
||||
private static final HashMap<String, IWarItem> itemRegistry = new HashMap<>();
|
||||
|
||||
@@ -24,6 +25,8 @@ public class WarItemRegistry {
|
||||
* loads all items into the plugin registry list
|
||||
*/
|
||||
public WarItemRegistry() {
|
||||
instance = this;
|
||||
|
||||
Main.warLogger.log(Helper.chatLabel() + "Registering AlathraWar items.");
|
||||
|
||||
itemRegistry.put(registryName("ram"), new RamItem());
|
||||
@@ -31,6 +34,10 @@ public class WarItemRegistry {
|
||||
Main.warLogger.log(Helper.chatLabel() + "Registered AlathraWar items.");
|
||||
}
|
||||
|
||||
public static WarItemRegistry getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* generate a registry name
|
||||
* @param item
|
||||
|
||||
Reference in new issue
Block a user