Move registry instance out of Main

This commit is contained in:
Aubri Seebauer committed 2023-05-02 16:00:10 -04:00
1 parent 1dd938da60
commit 89fc6d1769
6 files changed
+18 -9

No files matched your search

@@ -152,9 +152,9 @@ public class AdminCommands implements CommandExecutor {
//find item
ItemStack stack = null;
if(args[1].contains(Main.getInstance().getName().toLowerCase())) {
stack = Main.itemRegistry.getOrNullNamespace(args[1]);
stack = WarItemRegistry.getInstance().getOrNullNamespace(args[1]);
} else {
stack = Main.itemRegistry.getOrNull(args[1]);
stack = WarItemRegistry.getInstance().getOrNull(args[1]);
}
// item not real!
if(stack == null) {
@@ -242,6 +242,6 @@ public class CommandHelper {
* @return list of all alathrawar items namespaced
*/
public static List<String> getWarItems() {
return new ArrayList<>(WarItemRegistry.getItemRegistry().keySet());
return new ArrayList<>(WarItemRegistry.getInstance().getItemRegistry().keySet());
}
}