mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-03 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
@@ -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());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user