From e29ad3ffde4f42b4c398709561b64d08fe0b0cd4 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 19 Apr 2020 08:23:35 +1200 Subject: [PATCH] Rename more custom entity fields --- src/main/java/me/libraryaddict/disguise/DisguiseConfig.java | 4 ++-- .../disguise/disguisetypes/ModdedDisguise.java | 2 +- .../disguise/utilities/modded/ModdedManager.java | 6 +++--- .../disguise/utilities/parser/DisguiseParser.java | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/DisguiseConfig.java b/src/main/java/me/libraryaddict/disguise/DisguiseConfig.java index d6ce5997..f80dfb51 100644 --- a/src/main/java/me/libraryaddict/disguise/DisguiseConfig.java +++ b/src/main/java/me/libraryaddict/disguise/DisguiseConfig.java @@ -596,7 +596,7 @@ public class DisguiseConfig { for (String name : config.getConfigurationSection("Custom-Entities").getKeys(false)) { try { if (!name.matches("[a-zA-Z0-9_]+")) { - DisguiseUtilities.getLogger().severe("Invalid custom disguise name '" + name + "'"); + DisguiseUtilities.getLogger().severe("Invalid modded disguise name '" + name + "'"); continue; } @@ -640,7 +640,7 @@ public class DisguiseConfig { ModdedEntity entity = new ModdedEntity(null, name, living, mod, version, requireMessage, 0); - ModdedManager.registerCustomEntity( + ModdedManager.registerModdedEntity( new NamespacedKey(key.substring(0, key.indexOf(":")), key.substring(key.indexOf(":") + 1)), entity, register); diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/ModdedDisguise.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/ModdedDisguise.java index 6c40f527..db2fa455 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/ModdedDisguise.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/ModdedDisguise.java @@ -17,7 +17,7 @@ public class ModdedDisguise extends TargetedDisguise { private ModdedEntity moddedEntity; public ModdedDisguise(String moddedEntityName) { - this(ModdedManager.getCustomEntity(moddedEntityName)); + this(ModdedManager.getModdedEntity(moddedEntityName)); } public ModdedDisguise(ModdedEntity moddedEntity) { diff --git a/src/main/java/me/libraryaddict/disguise/utilities/modded/ModdedManager.java b/src/main/java/me/libraryaddict/disguise/utilities/modded/ModdedManager.java index a4f1609c..d6703dcc 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/modded/ModdedManager.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/modded/ModdedManager.java @@ -67,7 +67,7 @@ public class ModdedManager implements PluginMessageListener { fmlHandshake = stream.toByteArray(); } - public static void registerCustomEntity(NamespacedKey name, ModdedEntity entity, boolean register) { + public static void registerModdedEntity(NamespacedKey name, ModdedEntity entity, boolean register) { if (entities.keySet().stream().anyMatch(n -> n.toString().equalsIgnoreCase(name.toString()))) { throw new IllegalArgumentException(name + " has already been registered"); } @@ -93,11 +93,11 @@ public class ModdedManager implements PluginMessageListener { entities.put(name, entity); } - public static ModdedEntity getCustomEntity(NamespacedKey name) { + public static ModdedEntity getModdedEntity(NamespacedKey name) { return entities.get(name); } - public static ModdedEntity getCustomEntity(String name) { + public static ModdedEntity getModdedEntity(String name) { for (ModdedEntity entity : entities.values()) { if (!entity.getName().equalsIgnoreCase(name)) { continue; diff --git a/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguiseParser.java b/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguiseParser.java index e45813f8..9d172378 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguiseParser.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguiseParser.java @@ -647,7 +647,7 @@ public class DisguiseParser { name = disguisePerm.toReadable(); if (disguisePerm.getType().isCustom()) { - ModdedEntity ent = ModdedManager.getCustomEntity(disguisePerm.toReadable()); + ModdedEntity ent = ModdedManager.getModdedEntity(disguisePerm.toReadable()); if (ent == null) { throw new DisguiseParseException(LibsMsg.PARSE_CANT_DISG_UNKNOWN);