* Remember to call withPacket(). */ - public static PacketConstructor DEFAULT = new PacketConstructor(null); + public static final PacketConstructor DEFAULT = new PacketConstructor(null); // The constructor method that's actually responsible for creating the packet private Constructor> constructorMethod; diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyReflection.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyReflection.java index 468b42d8..ae986fdb 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyReflection.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyReflection.java @@ -36,7 +36,7 @@ public class FuzzyReflection { /** * Matches a Minecraft object. */ - public static String MINECRAFT_OBJECT = "net\\.minecraft(\\.\\w+)+"; + public static final String MINECRAFT_OBJECT = "net\\.minecraft(\\.\\w+)+"; // The class we're actually representing private Class> source; diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/instances/CollectionGenerator.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/instances/CollectionGenerator.java index 24e14649..674565dc 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/instances/CollectionGenerator.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/instances/CollectionGenerator.java @@ -42,7 +42,7 @@ public class CollectionGenerator implements InstanceProvider { /** * Shared instance of this generator. */ - public static CollectionGenerator INSTANCE = new CollectionGenerator(); + public static final CollectionGenerator INSTANCE = new CollectionGenerator(); @Override public Object create(@Nullable Class> type) { diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/instances/DefaultInstances.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/instances/DefaultInstances.java index 56ca753e..46505891 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/instances/DefaultInstances.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/instances/DefaultInstances.java @@ -35,7 +35,7 @@ public class DefaultInstances { /** * Standard default instance provider. */ - public static DefaultInstances DEFAULT = DefaultInstances.fromArray( + public static final DefaultInstances DEFAULT = DefaultInstances.fromArray( PrimitiveGenerator.INSTANCE, CollectionGenerator.INSTANCE); /**