From bbfbb508919459d9885bd9d690c1c483e7e3f70b Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Thu, 16 Apr 2020 00:36:41 -0400 Subject: [Update to 1.15.2] Version 0.7.1 --- src/main/java/net/transit/type/group/GroupRegistry.java | 5 ++--- src/main/java/net/transit/type/group/TypeGroup.java | 15 +++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) (limited to 'src/main/java/net/transit') diff --git a/src/main/java/net/transit/type/group/GroupRegistry.java b/src/main/java/net/transit/type/group/GroupRegistry.java index 8f8a612..12ffffc 100644 --- a/src/main/java/net/transit/type/group/GroupRegistry.java +++ b/src/main/java/net/transit/type/group/GroupRegistry.java @@ -11,7 +11,6 @@ public class GroupRegistry { private static final ArrayList> GROUPS = new ArrayList>(0); private static final Logger LOG = LogManager.getFormatterLogger("Transit|GroupRegistry"); - private static final String prefix = "[" + LOG.getName() + "] "; private GroupRegistry() {} @@ -21,13 +20,13 @@ public class GroupRegistry { { if(g.getGroup().equals(group.getGroup())) { - LOG.warn(prefix + "Failed to add group " + group.getGroup() + " to the registry. Did another mod add a group with the same name?"); + LOG.warn("Failed to add group " + group.getGroup() + " to the registry. Did another mod add a group with the same name?"); return false; } } GROUPS.add(group); - LOG.info(prefix + "Successfully added group " + group.getGroup() + " to the registry."); + LOG.info("Successfully added group " + group.getGroup() + " to the registry."); return true; } diff --git a/src/main/java/net/transit/type/group/TypeGroup.java b/src/main/java/net/transit/type/group/TypeGroup.java index 6cea6dd..a3ab622 100644 --- a/src/main/java/net/transit/type/group/TypeGroup.java +++ b/src/main/java/net/transit/type/group/TypeGroup.java @@ -22,7 +22,6 @@ public class TypeGroup // Logger for events in the TypeGroup. private static final Logger LOG = LogManager.getFormatterLogger("Transit|Group"); - private static final String prefix = "[" + LOG.getName() + "] "; public TypeGroup(Type base) @@ -46,11 +45,11 @@ public class TypeGroup if(!isInGroup(type.getGroup(), type.getType())) { TYPES.add(type); - LOG.info(prefix + "Added type " + type.getType() + ":" + type.getGroup() + " to group " + getGroup()); + LOG.info("Added type " + type.getType() + ":" + type.getGroup() + " to group " + getGroup()); return true; } - LOG.info(prefix + "Failed to add type " + type.getType() + ":" + type.getGroup() + " to group " + getGroup() + ". Was the type already added?"); + LOG.info("Failed to add type " + type.getType() + ":" + type.getGroup() + " to group " + getGroup() + ". Was the type already added?"); return false; } @@ -62,17 +61,17 @@ public class TypeGroup public boolean removeType(Type type) { if(type.equals(baseType)) { - LOG.warn(prefix + "[WARN] Failed to remove type " + type.getGroup() + ":" + type.getType() + " from group " + getGroup() + ". This is the base type and can not be removed."); + LOG.warn("[WARN] Failed to remove type " + type.getGroup() + ":" + type.getType() + " from group " + getGroup() + ". This is the base type and can not be removed."); return false; } if(TYPES.indexOf(type) != -1) { - LOG.info(prefix + "Removed type " + TYPES.remove(TYPES.indexOf(type)).getType() + " from group " + getGroup()); + LOG.info("Removed type " + TYPES.remove(TYPES.indexOf(type)).getType() + " from group " + getGroup()); return true; } - LOG.warn(prefix + "[WARN] Failed to remove type " + type.getGroup() + ":" + type.getType() + " from group " + getGroup() + ". Are we sure that the type was added to the group first?"); + LOG.warn("[WARN] Failed to remove type " + type.getGroup() + ":" + type.getType() + " from group " + getGroup() + ". Are we sure that the type was added to the group first?"); return false; } @@ -88,12 +87,12 @@ public class TypeGroup { if(type.getGroup().equals(groupID) && type.getType().equals(typeID)) { - LOG.info(prefix + "Removed type " + TYPES.remove(TYPES.indexOf(type)).getType() + " from group " + getGroup()); + LOG.info("Removed type " + TYPES.remove(TYPES.indexOf(type)).getType() + " from group " + getGroup()); return true; } } - LOG.warn(prefix + "[WARN] Failed to remove type " + groupID + ":" + typeID + " from group " + getGroup() + ". Are we sure that the type was added to the group first?"); + LOG.warn("[WARN] Failed to remove type " + groupID + ":" + typeID + " from group " + getGroup() + ". Are we sure that the type was added to the group first?"); return false; } -- cgit v1.2.3