From 898eb405f0631ba7ea7fc489f33122cfb4943968 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Thu, 10 Jan 2013 01:00:16 +0100 Subject: [PATCH 01/19] Incremented to 2.0.1-SNAPSHOT for development towards the next version --- ProtocolLib/pom.xml | 2 +- ProtocolLib/src/main/resources/plugin.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/pom.xml b/ProtocolLib/pom.xml index a81c34d1..ac5b3cd1 100644 --- a/ProtocolLib/pom.xml +++ b/ProtocolLib/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.comphenix.protocol ProtocolLib - 2.0.0 + 2.0.1-SNAPSHOT jar Provides read/write access to the Minecraft protocol. diff --git a/ProtocolLib/src/main/resources/plugin.yml b/ProtocolLib/src/main/resources/plugin.yml index 5acbb65b..ee01cee9 100644 --- a/ProtocolLib/src/main/resources/plugin.yml +++ b/ProtocolLib/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: ProtocolLib -version: 2.0.0 +version: 2.0.1-SNAPSHOT description: Provides read/write access to the Minecraft protocol. author: Comphenix website: http://www.comphenix.net/ProtocolLib From 29709c4159a8bf62293ce79f40c80a3c5c4c9501 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Thu, 10 Jan 2013 01:26:45 +0100 Subject: [PATCH 02/19] Fix a small oversight in the API design. --- .../java/com/comphenix/protocol/wrappers/nbt/NbtCompound.java | 2 +- .../com/comphenix/protocol/wrappers/nbt/WrappedCompound.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/nbt/NbtCompound.java b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/nbt/NbtCompound.java index ba27a6cb..5465ae29 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/nbt/NbtCompound.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/nbt/NbtCompound.java @@ -272,7 +272,7 @@ public interface NbtCompound extends NbtBase>>, Iterable< * @param compound - the compound value. * @return This current compound, for chaining. */ - public abstract NbtCompound put(WrappedCompound compound); + public abstract NbtCompound put(NbtCompound compound); /** * Retrieve the NBT list value of an entry identified by a given key. diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/nbt/WrappedCompound.java b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/nbt/WrappedCompound.java index 410e093d..8d3f6fa8 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/nbt/WrappedCompound.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/nbt/WrappedCompound.java @@ -524,7 +524,7 @@ class WrappedCompound implements NbtWrapper>>, Iterable Date: Fri, 11 Jan 2013 00:07:15 +0100 Subject: [PATCH 03/19] Added a convenience method for boolean structure modifiers. --- .../com/comphenix/protocol/events/PacketContainer.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/events/PacketContainer.java b/ProtocolLib/src/main/java/com/comphenix/protocol/events/PacketContainer.java index 4c679cb3..93bc0d19 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/events/PacketContainer.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/events/PacketContainer.java @@ -175,6 +175,14 @@ public class PacketContainer implements Serializable { return structureModifier.withType(byte.class); } + /** + * Retrieves a read/write structure for every boolean field. + * @return A modifier for every boolean field. + */ + public StructureModifier getBooleans() { + return structureModifier.withType(boolean.class); + } + /** * Retrieves a read/write structure for every short field. * @return A modifier for every short field. From 845f339a3048728aeabeb45d720b69132291b5ea Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Sun, 13 Jan 2013 11:31:32 +0100 Subject: [PATCH 04/19] Add the ability to set the default injection hook method. This is useful for debugging. --- .../comphenix/protocol/ProtocolConfig.java | 39 ++++++++++++++++++- .../comphenix/protocol/ProtocolLibrary.java | 7 ++++ ProtocolLib/src/main/resources/config.yml | 6 ++- 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolConfig.java b/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolConfig.java index 040a8ef1..ce084d0a 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolConfig.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolConfig.java @@ -23,6 +23,8 @@ import org.bukkit.configuration.Configuration; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.plugin.Plugin; +import com.comphenix.protocol.injector.PacketFilterManager.PlayerInjectHooks; + /** * Represents the configuration of ProtocolLib. * @@ -35,9 +37,10 @@ class ProtocolConfig { private static final String METRICS_ENABLED = "metrics"; - private static final String IGNORE_VERSION_CHECK = "ignore version check"; - + private static final String IGNORE_VERSION_CHECK = "ignore version check"; private static final String BACKGROUND_COMPILER_ENABLED = "background compiler"; + + private static final String INJECTION_METHOD = "injection method"; private static final String UPDATER_NOTIFY = "notify"; private static final String UPDATER_DOWNLAD = "download"; @@ -234,6 +237,38 @@ class ProtocolConfig { updater.set(UPDATER_LAST_TIME, lastTimeSeconds); } + /** + * Retrieve the default injection method. + * @return Default method. + */ + public PlayerInjectHooks getDefaultMethod() { + return PlayerInjectHooks.NETWORK_SERVER_OBJECT; + } + + /** + * Retrieve the injection method that has been set in the configuration, or use a default value. + * @return Injection method to use. + * @throws IllegalArgumentException If the configuration option is malformed. + */ + public PlayerInjectHooks getInjectionMethod() throws IllegalArgumentException { + String text = global.getString(INJECTION_METHOD); + + // Default hook if nothing has been set + PlayerInjectHooks hook = getDefaultMethod(); + + if (text != null) + hook = PlayerInjectHooks.valueOf(text.toUpperCase().replace(" ", "_")); + return hook; + } + + /** + * Set the starting injection method to use. + * @return Injection method. + */ + public void setInjectionMethod(PlayerInjectHooks hook) { + global.set(INJECTION_METHOD, hook.name()); + } + /** * Save the current configuration file. */ diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java b/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java index c8c3e0a8..ec800646 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java @@ -136,6 +136,13 @@ public class ProtocolLibrary extends JavaPlugin { protocolManager = new PacketFilterManager(getClassLoader(), getServer(), unhookTask, detailedReporter); detailedReporter.addGlobalParameter("manager", protocolManager); + // Update injection hook + try { + protocolManager.setPlayerHook(config.getInjectionMethod()); + } catch (IllegalArgumentException e) { + detailedReporter.reportWarning(config, "Cannot parse injection method. Using default.", e); + } + // Initialize command handlers commandProtocol = new CommandProtocol(detailedReporter, this, updater, config); commandPacket = new CommandPacket(detailedReporter, this, logger, protocolManager); diff --git a/ProtocolLib/src/main/resources/config.yml b/ProtocolLib/src/main/resources/config.yml index 32f4e4c3..e3c48aff 100644 --- a/ProtocolLib/src/main/resources/config.yml +++ b/ProtocolLib/src/main/resources/config.yml @@ -15,4 +15,8 @@ global: background compiler: true # Disable version checking for the given Minecraft version. Backup your world first! - ignore version check: \ No newline at end of file + ignore version check: + + # Override the starting injecting method + injection method: + \ No newline at end of file From f416d1ba3d5efc2fc7b993ba6b7e58c96832e5a5 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Sun, 13 Jan 2013 11:33:53 +0100 Subject: [PATCH 05/19] Make the backwards compatible scheduler available to all. --- .../main/java/com/comphenix/protocol/metrics/Metrics.java | 6 ++++-- .../Scheduling.java => utility/WrappedScheduler.java} | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) rename ProtocolLib/src/main/java/com/comphenix/protocol/{metrics/Scheduling.java => utility/WrappedScheduler.java} (97%) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Metrics.java b/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Metrics.java index 3ff786ff..e2a6f3bd 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Metrics.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Metrics.java @@ -51,6 +51,8 @@ import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginDescriptionFile; +import com.comphenix.protocol.utility.WrappedScheduler; + import java.io.BufferedReader; import java.io.File; import java.io.IOException; @@ -136,7 +138,7 @@ public class Metrics { /** * The scheduled task */ - private volatile Scheduling.TaskWrapper task = null; + private volatile WrappedScheduler.TaskWrapper task = null; public Metrics(final Plugin plugin) throws IOException { if (plugin == null) { @@ -237,7 +239,7 @@ public class Metrics { } // Begin hitting the server with glorious data - task = Scheduling.runAsynchronously(plugin, new Runnable() { + task = WrappedScheduler.runAsynchronously(plugin, new Runnable() { private boolean firstPost = true; diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Scheduling.java b/ProtocolLib/src/main/java/com/comphenix/protocol/utility/WrappedScheduler.java similarity index 97% rename from ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Scheduling.java rename to ProtocolLib/src/main/java/com/comphenix/protocol/utility/WrappedScheduler.java index 42e6db77..8eda7c7e 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Scheduling.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/utility/WrappedScheduler.java @@ -1,4 +1,4 @@ -package com.comphenix.protocol.metrics; +package com.comphenix.protocol.utility; import org.bukkit.plugin.Plugin; import org.bukkit.scheduler.BukkitScheduler; @@ -9,7 +9,7 @@ import org.bukkit.scheduler.BukkitTask; * * @author Kristian */ -class Scheduling { +public class WrappedScheduler { /** * Represents a backwards compatible Bukkit task. */ From 37a9fc6a987fb9b3cdc2925e9106c087ac82a036 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Sun, 13 Jan 2013 11:41:32 +0100 Subject: [PATCH 06/19] Don't call deprecated methods. --- .../comphenix/protocol/CommandProtocol.java | 11 +++++------ .../protocol/async/AsyncListenerHandler.java | 5 +++-- .../comphenix/protocol/metrics/Metrics.java | 2 +- .../protocol/utility/WrappedScheduler.java | 19 +++++++++++++++---- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/CommandProtocol.java b/ProtocolLib/src/main/java/com/comphenix/protocol/CommandProtocol.java index c35f7632..c722eb53 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/CommandProtocol.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/CommandProtocol.java @@ -25,6 +25,7 @@ import com.comphenix.protocol.error.ErrorReporter; import com.comphenix.protocol.metrics.Updater; import com.comphenix.protocol.metrics.Updater.UpdateResult; import com.comphenix.protocol.metrics.Updater.UpdateType; +import com.comphenix.protocol.utility.WrappedScheduler; /** * Handles the "protocol" administration command. @@ -64,10 +65,9 @@ class CommandProtocol extends CommandBase { return true; } - @SuppressWarnings("deprecation") public void checkVersion(final CommandSender sender) { // Perform on an async thread - plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable() { + WrappedScheduler.runAsynchronouslyOnce(plugin, new Runnable() { @Override public void run() { try { @@ -77,15 +77,14 @@ class CommandProtocol extends CommandBase { getReporter().reportDetailed(this, "Cannot check updates for ProtocolLib.", e, sender); } } - }); + }, 0L); updateFinished(); } - @SuppressWarnings("deprecation") public void updateVersion(final CommandSender sender) { // Perform on an async thread - plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable() { + WrappedScheduler.runAsynchronouslyOnce(plugin, new Runnable() { @Override public void run() { try { @@ -95,7 +94,7 @@ class CommandProtocol extends CommandBase { getReporter().reportDetailed(this, "Cannot update ProtocolLib.", e, sender); } } - }); + }, 0L); updateFinished(); } diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/async/AsyncListenerHandler.java b/ProtocolLib/src/main/java/com/comphenix/protocol/async/AsyncListenerHandler.java index cefd8a0a..47eb84a6 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/async/AsyncListenerHandler.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/async/AsyncListenerHandler.java @@ -30,6 +30,7 @@ import com.comphenix.protocol.events.ListeningWhitelist; import com.comphenix.protocol.events.PacketAdapter; import com.comphenix.protocol.events.PacketEvent; import com.comphenix.protocol.events.PacketListener; +import com.comphenix.protocol.utility.WrappedScheduler; import com.google.common.base.Function; import com.google.common.base.Joiner; @@ -298,9 +299,9 @@ public class AsyncListenerHandler { }); } - @SuppressWarnings("deprecation") private void scheduleAsync(Runnable runnable) { - filterManager.getScheduler().scheduleAsyncDelayedTask(listener.getPlugin(), runnable); + // Handle deprecation + WrappedScheduler.runAsynchronouslyRepeat(listener.getPlugin(), filterManager.getScheduler(), runnable, 0L, -1L); } /** diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Metrics.java b/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Metrics.java index e2a6f3bd..d7640502 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Metrics.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Metrics.java @@ -239,7 +239,7 @@ public class Metrics { } // Begin hitting the server with glorious data - task = WrappedScheduler.runAsynchronously(plugin, new Runnable() { + task = WrappedScheduler.runAsynchronouslyRepeat(plugin, new Runnable() { private boolean firstPost = true; diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/utility/WrappedScheduler.java b/ProtocolLib/src/main/java/com/comphenix/protocol/utility/WrappedScheduler.java index 8eda7c7e..a7a54395 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/utility/WrappedScheduler.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/utility/WrappedScheduler.java @@ -21,15 +21,26 @@ public class WrappedScheduler { } /** - * Schedule a given task for asynchronous execution. + * Schedule a given task for a single asynchronous execution. + * @param plugin - the owner plugin. + * @param runnable - the task to run. + * @param firstDelay - the amount of time to wait until executing the task. + * @return A cancel token. + */ + public static TaskWrapper runAsynchronouslyOnce(final Plugin plugin, Runnable runnable, long firstDelay) { + return runAsynchronouslyRepeat(plugin, plugin.getServer().getScheduler(), runnable, firstDelay, -1L); + } + + /** + * Schedule a given task for multiple asynchronous executions. * @param plugin - the owner plugin. * @param runnable - the task to run. * @param firstDelay - the amount of time to wait until executing the task for the first time. * @param repeatDelay - the amount of time inbetween each execution. If less than zero, the task is only executed once. * @return A cancel token. */ - public static TaskWrapper runAsynchronously(final Plugin plugin, Runnable runnable, long firstDelay, long repeatDelay) { - return runAsynchronously(plugin, plugin.getServer().getScheduler(), runnable, firstDelay, repeatDelay); + public static TaskWrapper runAsynchronouslyRepeat(final Plugin plugin, Runnable runnable, long firstDelay, long repeatDelay) { + return runAsynchronouslyRepeat(plugin, plugin.getServer().getScheduler(), runnable, firstDelay, repeatDelay); } /** @@ -41,7 +52,7 @@ public class WrappedScheduler { * @param repeatDelay - the amount of time inbetween each execution. If less than zero, the task is only executed once. * @return A cancel token. */ - public static TaskWrapper runAsynchronously(final Plugin plugin, final BukkitScheduler scheduler, Runnable runnable, long firstDelay, long repeatDelay) { + public static TaskWrapper runAsynchronouslyRepeat(final Plugin plugin, final BukkitScheduler scheduler, Runnable runnable, long firstDelay, long repeatDelay) { try { @SuppressWarnings("deprecation") final int taskID = scheduler.scheduleAsyncRepeatingTask(plugin, runnable, firstDelay, repeatDelay); From 70cb9c527522926a348556a9cd91dadb3f5d5c19 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Sun, 13 Jan 2013 14:31:19 +0100 Subject: [PATCH 07/19] Updated packet registry for 1.4.6. --- .../src/main/java/com/comphenix/protocol/Packets.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/Packets.java b/ProtocolLib/src/main/java/com/comphenix/protocol/Packets.java index 33023c47..34349377 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/Packets.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/Packets.java @@ -52,9 +52,18 @@ public final class Packets { public static final int PLAYER_POSITION = 11; public static final int PLAYER_LOOK = 12; public static final int PLAYER_LOOK_MOVE = 13; + /** + * Made bi-directional in 1.4.6. + */ + public static final int BLOCK_ITEM_SWITCH = 16; public static final int ENTITY_LOCATION_ACTION = 17; public static final int ARM_ANIMATION = 18; public static final int NAMED_ENTITY_SPAWN = 20; + /** + * Removed in 1.4.6 and replaced with {@link VEHICLE_SPAWN}. + * @see Protocol History - MinecraftCoalition + */ + @Deprecated() public static final int PICKUP_SPAWN = 21; public static final int COLLECT = 22; public static final int VEHICLE_SPAWN = 23; From 637d6cda18e9828c2555951547ffc0ac14aa4d31 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Sun, 13 Jan 2013 14:58:07 +0100 Subject: [PATCH 08/19] Only set the hook if it's different --- .../java/com/comphenix/protocol/ProtocolLibrary.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java b/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java index ec800646..2f5e0322 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java @@ -37,6 +37,7 @@ import com.comphenix.protocol.error.DetailedErrorReporter; import com.comphenix.protocol.error.ErrorReporter; import com.comphenix.protocol.injector.DelayedSingleTask; import com.comphenix.protocol.injector.PacketFilterManager; +import com.comphenix.protocol.injector.PacketFilterManager.PlayerInjectHooks; import com.comphenix.protocol.metrics.Statistics; import com.comphenix.protocol.metrics.Updater; import com.comphenix.protocol.reflect.compiler.BackgroundCompiler; @@ -138,7 +139,13 @@ public class ProtocolLibrary extends JavaPlugin { // Update injection hook try { - protocolManager.setPlayerHook(config.getInjectionMethod()); + PlayerInjectHooks hook = config.getInjectionMethod(); + + // Only update the hook if it's different + if (protocolManager.getPlayerHook().equals(hook)) { + protocolManager.setPlayerHook(hook); + logger.info("Changing player hook to " + hook); + } } catch (IllegalArgumentException e) { detailedReporter.reportWarning(config, "Cannot parse injection method. Using default.", e); } From 651581d6777a67ebec4057d9542c4b4d17b1b045 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Sun, 13 Jan 2013 15:22:55 +0100 Subject: [PATCH 09/19] FIXED: DataWatcher can now clone ItemStacks and ChunkPositions. Due to a oversight, we retrieved the "wrapped" value in the get cloned helper method. This caused it to not clone the chunk position and item stack. --- .../protocol/wrappers/WrappedWatchableObject.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedWatchableObject.java b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedWatchableObject.java index c1b2edb7..1ef3de0f 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedWatchableObject.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedWatchableObject.java @@ -218,6 +218,14 @@ public class WrappedWatchableObject { modifier.withType(Object.class).write(0, getUnwrapped(newValue)); } + /** + * Read the underlying value field. + * @return The underlying value. + */ + private Object getNMSValue() { + return modifier.withType(Object.class).read(0); + } + /** * Read the value field. * @return The watched value. @@ -324,7 +332,7 @@ public class WrappedWatchableObject { // Helper Object getClonedValue() throws FieldAccessException { - Object value = getValue(); + Object value = getNMSValue(); // Only a limited set of references types are supported if (MinecraftReflection.isChunkPosition(value)) { From 429ca5d447c47b28e621b944aaa9a59a4f0bfbe1 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Sun, 13 Jan 2013 15:44:16 +0100 Subject: [PATCH 10/19] Don't update hooks if we don't need to. --- .../src/main/java/com/comphenix/protocol/ProtocolLibrary.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java b/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java index 2f5e0322..1a64565d 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java @@ -142,9 +142,9 @@ public class ProtocolLibrary extends JavaPlugin { PlayerInjectHooks hook = config.getInjectionMethod(); // Only update the hook if it's different - if (protocolManager.getPlayerHook().equals(hook)) { + if (!protocolManager.getPlayerHook().equals(hook)) { + logger.info("Changing player hook from " + protocolManager.getPlayerHook() + " to " + hook); protocolManager.setPlayerHook(hook); - logger.info("Changing player hook to " + hook); } } catch (IllegalArgumentException e) { detailedReporter.reportWarning(config, "Cannot parse injection method. Using default.", e); From 1880add7dc23ac429732bd2782b1b98ba89fa900 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Sun, 13 Jan 2013 18:00:34 +0100 Subject: [PATCH 11/19] Just report HTTP errors, no need to make tickets out of them. --- .../comphenix/protocol/CommandProtocol.java | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/CommandProtocol.java b/ProtocolLib/src/main/java/com/comphenix/protocol/CommandProtocol.java index c722eb53..672c4127 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/CommandProtocol.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/CommandProtocol.java @@ -17,6 +17,8 @@ package com.comphenix.protocol; +import java.io.IOException; + import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.plugin.Plugin; @@ -74,7 +76,11 @@ class CommandProtocol extends CommandBase { UpdateResult result = updater.update(UpdateType.NO_DOWNLOAD, true); sender.sendMessage(ChatColor.BLUE + "[ProtocolLib] " + result.toString()); } catch (Exception e) { - getReporter().reportDetailed(this, "Cannot check updates for ProtocolLib.", e, sender); + if (isHttpError(e)) { + getReporter().reportWarning(this, "Http error: " + e.getCause().getMessage()); + } else { + getReporter().reportDetailed(this, "Cannot check updates for ProtocolLib.", e, sender); + } } } }, 0L); @@ -91,7 +97,11 @@ class CommandProtocol extends CommandBase { UpdateResult result = updater.update(UpdateType.DEFAULT, true); sender.sendMessage(ChatColor.BLUE + "[ProtocolLib] " + result.toString()); } catch (Exception e) { - getReporter().reportDetailed(this, "Cannot update ProtocolLib.", e, sender); + if (isHttpError(e)) { + getReporter().reportWarning(this, "Http error: " + e.getCause().getMessage()); + } else { + getReporter().reportDetailed(this, "Cannot update ProtocolLib.", e, sender); + } } } }, 0L); @@ -99,6 +109,17 @@ class CommandProtocol extends CommandBase { updateFinished(); } + private boolean isHttpError(Exception e) { + Throwable cause = e.getCause(); + + if (cause instanceof IOException) { + // Thanks for making the message a part of the API ... + return cause.getMessage().contains("HTTP response"); + } else { + return false; + } + } + /** * Prevent further automatic updates until the next delay. */ From d23a45081af7f19cc5aae532b4977d31fbf23228 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Tue, 15 Jan 2013 11:09:16 +0100 Subject: [PATCH 12/19] Better error messages - inform that updating is disabled for SNAPSHOTs. --- .../com/comphenix/protocol/metrics/Updater.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Updater.java b/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Updater.java index 50ea9583..3133a434 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Updater.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Updater.java @@ -119,7 +119,12 @@ public class Updater /** * The updater found an update, but because of the UpdateType being set to NO_DOWNLOAD, it wasn't downloaded. */ - UPDATE_AVAILABLE(7, "The updater found an update, but because of the UpdateType being set to NO_DOWNLOAD, it wasn't downloaded."); + UPDATE_AVAILABLE(7, "The updater found an update, but because of the UpdateType being set to NO_DOWNLOAD, it wasn't downloaded."), + + /** + * Updating SNAPSHOT versions are not supported. Please perform a manual upgrade. + */ + NOT_SUPPORTED(8, "Updating SNAPSHOT versions are not supported. Please perform a manual upgrade."); private static final Map valueList = new HashMap(); private final int value; @@ -479,7 +484,12 @@ public class Updater remVer=-1; } - if(hasTag(version)||version.equalsIgnoreCase(remoteVersion)||curVer>=remVer) + if (hasTag(version)) + { + result = Updater.UpdateResult.NOT_SUPPORTED; + return false; + } + else if (version.equalsIgnoreCase(remoteVersion) || curVer>=remVer) { // We already have the latest version, or this build is tagged for no-update result = Updater.UpdateResult.NO_UPDATE; From 95438c18619d9823874b520817ef8ef3d2742981 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Thu, 17 Jan 2013 12:26:39 +0100 Subject: [PATCH 13/19] Throw an exception the caller can handle instead of a warning message. This should prevent possible spam by plugins that are not aware that a player has either logged out, or is not injected due to a bug in ProtocolLib. --- .../protocol/injector/player/PlayerInjectionHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectionHandler.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectionHandler.java index 3722e4f5..afe058eb 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectionHandler.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectionHandler.java @@ -486,7 +486,7 @@ public class PlayerInjectionHandler { if (injector != null) injector.sendServerPacket(packet.getHandle(), filters); else - reporter.reportWarning(this, String.format( + throw new PlayerLoggedOutException(String.format( "Unable to send packet %s (%s): Player %s has logged out.", packet.getID(), packet, reciever.getName() )); @@ -507,7 +507,7 @@ public class PlayerInjectionHandler { if (injector != null) injector.processPacket(mcPacket); else - reporter.reportWarning(this, String.format( + throw new PlayerLoggedOutException(String.format( "Unable to receieve packet %s. Player %s has logged out.", mcPacket, player.getName() )); From 093a6f12bf85b089ed59cc49bc23b54e2f9e05b9 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Fri, 18 Jan 2013 09:46:23 +0100 Subject: [PATCH 14/19] Properly exit BlockingHashMap#get if we time out. --- .../com/comphenix/protocol/concurrency/BlockingHashMap.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/concurrency/BlockingHashMap.java b/ProtocolLib/src/main/java/com/comphenix/protocol/concurrency/BlockingHashMap.java index df867951..54295cdb 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/concurrency/BlockingHashMap.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/concurrency/BlockingHashMap.java @@ -114,7 +114,10 @@ public class BlockingHashMap { if (remainingTime > 0) { TimeUnit.NANOSECONDS.timedWait(lock, remainingTime); value = backingMap.get(key); - } + } else { + // Timeout elapsed + break; + } } } } From 5c098339a9e6d22962f7c004de4be049812c26b1 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Fri, 18 Jan 2013 09:56:55 +0100 Subject: [PATCH 15/19] Increase default waiting period to 2 seconds. --- .../protocol/injector/player/PlayerInjectionHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectionHandler.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectionHandler.java index afe058eb..a59e5772 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectionHandler.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectionHandler.java @@ -50,7 +50,7 @@ public class PlayerInjectionHandler { /** * The maximum number of milliseconds to wait until a player can be looked up by connection. */ - private static final long TIMEOUT_PLAYER_LOOKUP = 1000; // ms + private static final long TIMEOUT_PLAYER_LOOKUP = 2000; // ms /** * The highest possible packet ID. It's unlikely that this value will ever change. From b138332608f78abe21e6586c2f18c2dad22b9230 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Fri, 18 Jan 2013 15:36:42 +0100 Subject: [PATCH 16/19] Compile PL for 1.4.7 - though earlier versions will still work. --- ProtocolLib/.project | 4 +- ProtocolLib/pom.xml | 2 +- .../comphenix/protocol/ProtocolLibrary.java | 2 +- .../protocol/BukkitInitialization.java | 60 +++++++++++++++++++ .../protocol/events/PacketContainerTest.java | 29 +-------- .../injector/SortedCopyOnWriteArrayTest.java | 1 - .../wrappers/nbt/NbtCompoundTest.java | 7 +-- .../protocol/wrappers/nbt/NbtFactoryTest.java | 8 +-- .../io/NbtConfigurationSerializerTest.java | 7 +-- 9 files changed, 76 insertions(+), 44 deletions(-) create mode 100644 ProtocolLib/src/test/java/com/comphenix/protocol/BukkitInitialization.java diff --git a/ProtocolLib/.project b/ProtocolLib/.project index a1960c9e..d36fcbe8 100644 --- a/ProtocolLib/.project +++ b/ProtocolLib/.project @@ -11,12 +11,12 @@ - org.eclipse.m2e.core.maven2Builder + net.sourceforge.metrics.builder - net.sourceforge.metrics.builder + org.eclipse.m2e.core.maven2Builder diff --git a/ProtocolLib/pom.xml b/ProtocolLib/pom.xml index ac5b3cd1..9ef4c1aa 100644 --- a/ProtocolLib/pom.xml +++ b/ProtocolLib/pom.xml @@ -203,7 +203,7 @@ org.bukkit craftbukkit - 1.4.6-R0.1 + 1.4.7-R0.1 provided diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java b/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java index 1a64565d..4717e674 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java @@ -56,7 +56,7 @@ public class ProtocolLibrary extends JavaPlugin { /** * The maximum version ProtocolLib has been tested with, */ - private static final String MAXIMUM_MINECRAFT_VERSION = "1.4.6"; + private static final String MAXIMUM_MINECRAFT_VERSION = "1.4.7"; /** * The number of milliseconds per second. diff --git a/ProtocolLib/src/test/java/com/comphenix/protocol/BukkitInitialization.java b/ProtocolLib/src/test/java/com/comphenix/protocol/BukkitInitialization.java new file mode 100644 index 00000000..9fac9cac --- /dev/null +++ b/ProtocolLib/src/test/java/com/comphenix/protocol/BukkitInitialization.java @@ -0,0 +1,60 @@ +package com.comphenix.protocol; + +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +// Will have to be updated for every version though +import org.bukkit.craftbukkit.v1_4_R1.inventory.CraftItemFactory; + +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.Server; +import org.bukkit.inventory.ItemFactory; +import org.bukkit.inventory.meta.ItemMeta; +import com.comphenix.protocol.reflect.FieldUtils; +import com.comphenix.protocol.utility.MinecraftReflection; + +/** + * Used to ensure that ProtocolLib and Bukkit is prepared to be tested. + * + * @author Kristian + */ +public class BukkitInitialization { + private static boolean initialized; + + /** + * Initialize Bukkit and ProtocolLib such that we can perfrom unit testing. + * @throws IllegalAccessException If we are unable to initialize Bukkit. + */ + public static void initializeItemMeta() throws IllegalAccessException { + if (!initialized) { + // Denote that we're done + initialized = true; + + initializePackage(); + + // Mock the server object + Server mockedServer = mock(Server.class); + ItemFactory mockedFactory = mock(CraftItemFactory.class); + ItemMeta mockedMeta = mock(ItemMeta.class); + + when(mockedServer.getItemFactory()).thenReturn(mockedFactory); + when(mockedFactory.getItemMeta(any(Material.class))).thenReturn(mockedMeta); + + // Inject this fake server + FieldUtils.writeStaticField(Bukkit.class, "server", mockedServer, true); + + // And the fake item factory + FieldUtils.writeStaticField(CraftItemFactory.class, "instance", mockedFactory, true); + } + } + + /** + * Ensure that package names are correctly set up. + */ + public static void initializePackage() { + // Initialize reflection + MinecraftReflection.setMinecraftPackage("net.minecraft.server.v1_4_R1", "org.bukkit.craftbukkit.v1_4_R1"); + } +} diff --git a/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java b/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java index 8359c753..1b66511e 100644 --- a/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java +++ b/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java @@ -18,31 +18,23 @@ package com.comphenix.protocol.events; import static org.junit.Assert.*; -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - import java.lang.reflect.Array; import java.util.List; // Will have to be updated for every version though -import org.bukkit.craftbukkit.v1_4_6.inventory.CraftItemFactory; +import org.bukkit.craftbukkit.v1_4_R1.inventory.CraftItemFactory; -import org.bukkit.Bukkit; import org.bukkit.Material; -import org.bukkit.Server; import org.bukkit.WorldType; -import org.bukkit.inventory.ItemFactory; import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.ItemMeta; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.powermock.core.classloader.annotations.PrepareForTest; +import com.comphenix.protocol.BukkitInitialization; import com.comphenix.protocol.Packets; import com.comphenix.protocol.reflect.EquivalentConverter; -import com.comphenix.protocol.reflect.FieldUtils; import com.comphenix.protocol.reflect.StructureModifier; import com.comphenix.protocol.utility.MinecraftReflection; import com.comphenix.protocol.wrappers.BukkitConverters; @@ -65,22 +57,7 @@ public class PacketContainerTest { @BeforeClass public static void initializeBukkit() throws IllegalAccessException { - // Initialize reflection - MinecraftReflection.setMinecraftPackage("net.minecraft.server.v1_4_6", "org.bukkit.craftbukkit.v1_4_6"); - - // Mock the server object - Server mockedServer = mock(Server.class); - ItemFactory mockedFactory = mock(CraftItemFactory.class); - ItemMeta mockedMeta = mock(ItemMeta.class); - - when(mockedServer.getItemFactory()).thenReturn(mockedFactory); - when(mockedFactory.getItemMeta(any(Material.class))).thenReturn(mockedMeta); - - // Inject this fake server - FieldUtils.writeStaticField(Bukkit.class, "server", mockedServer, true); - - // And the fake item factory - FieldUtils.writeStaticField(CraftItemFactory.class, "instance", mockedFactory, true); + BukkitInitialization.initializeItemMeta(); } private void testPrimitive(StructureModifier modifier, int index, T initialValue, T testValue) { diff --git a/ProtocolLib/src/test/java/com/comphenix/protocol/injector/SortedCopyOnWriteArrayTest.java b/ProtocolLib/src/test/java/com/comphenix/protocol/injector/SortedCopyOnWriteArrayTest.java index 57280526..6bc2cce1 100644 --- a/ProtocolLib/src/test/java/com/comphenix/protocol/injector/SortedCopyOnWriteArrayTest.java +++ b/ProtocolLib/src/test/java/com/comphenix/protocol/injector/SortedCopyOnWriteArrayTest.java @@ -30,7 +30,6 @@ import com.comphenix.protocol.events.ListenerPriority; import com.google.common.primitives.Ints; public class SortedCopyOnWriteArrayTest { - @Test public void testInsertion() { diff --git a/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/NbtCompoundTest.java b/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/NbtCompoundTest.java index bfeea39d..f512944e 100644 --- a/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/NbtCompoundTest.java +++ b/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/NbtCompoundTest.java @@ -21,13 +21,12 @@ import static org.junit.Assert.*; import org.junit.BeforeClass; import org.junit.Test; - -import com.comphenix.protocol.utility.MinecraftReflection; +import com.comphenix.protocol.BukkitInitialization; public class NbtCompoundTest { @BeforeClass - public static void setupBukkit() { - MinecraftReflection.setMinecraftPackage("net.minecraft.server.v1_4_6", "org.bukkit.craftbukkit.v1_4_6"); + public static void initializeBukkit() throws IllegalAccessException { + BukkitInitialization.initializePackage(); } @Test diff --git a/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/NbtFactoryTest.java b/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/NbtFactoryTest.java index c2504df0..cd85bf7d 100644 --- a/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/NbtFactoryTest.java +++ b/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/NbtFactoryTest.java @@ -28,15 +28,13 @@ import java.io.DataOutputStream; import org.junit.BeforeClass; import org.junit.Test; - -import com.comphenix.protocol.utility.MinecraftReflection; +import com.comphenix.protocol.BukkitInitialization; import com.comphenix.protocol.wrappers.nbt.io.NbtBinarySerializer; public class NbtFactoryTest { @BeforeClass - public static void initializeBukkit() { - // Initialize reflection - MinecraftReflection.setMinecraftPackage("net.minecraft.server.v1_4_6", "org.bukkit.craftbukkit.v1_4_6"); + public static void initializeBukkit() throws IllegalAccessException { + BukkitInitialization.initializePackage(); } @Test diff --git a/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/io/NbtConfigurationSerializerTest.java b/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/io/NbtConfigurationSerializerTest.java index 916875ab..3cc4f675 100644 --- a/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/io/NbtConfigurationSerializerTest.java +++ b/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/io/NbtConfigurationSerializerTest.java @@ -6,15 +6,14 @@ import org.bukkit.configuration.file.YamlConfiguration; import org.junit.BeforeClass; import org.junit.Test; -import com.comphenix.protocol.utility.MinecraftReflection; +import com.comphenix.protocol.BukkitInitialization; import com.comphenix.protocol.wrappers.nbt.NbtCompound; import com.comphenix.protocol.wrappers.nbt.NbtFactory; public class NbtConfigurationSerializerTest { @BeforeClass - public static void initializeBukkit() { - // Initialize reflection - MinecraftReflection.setMinecraftPackage("net.minecraft.server.v1_4_6", "org.bukkit.craftbukkit.v1_4_6"); + public static void initializeBukkit() throws IllegalAccessException { + BukkitInitialization.initializePackage(); } @SuppressWarnings("unchecked") From 14f667e2b9f7d8251d3d63e4d0d6e5cbcb054e08 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Sun, 20 Jan 2013 21:03:17 +0100 Subject: [PATCH 17/19] The client no longer sends a RESPAWN packet. --- .../src/main/java/com/comphenix/protocol/Packets.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/Packets.java b/ProtocolLib/src/main/java/com/comphenix/protocol/Packets.java index 34349377..1509c411 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/Packets.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/Packets.java @@ -162,7 +162,13 @@ public final class Packets { public static final int HANDSHAKE = 2; public static final int CHAT = 3; public static final int USE_ENTITY = 7; + + /** + * Since 1.3.1, the client no longer sends a respawn packet. Moved to CLIENT_COMMAND. + */ + @Deprecated public static final int RESPAWN = 9; + public static final int FLYING = 10; public static final int PLAYER_POSITION = 11; public static final int PLAYER_LOOK = 12; From 2a8dc4ad223b1e9bc638b7afe1eb8d09aadce611 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Tue, 22 Jan 2013 03:27:26 +0100 Subject: [PATCH 18/19] Don't consider the current file as a candidate for conflicting version. --- .../main/java/com/comphenix/protocol/ProtocolLibrary.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java b/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java index 4717e674..9a5bd6ac 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java @@ -283,12 +283,15 @@ public class ProtocolLibrary extends JavaPlugin { MinecraftVersion currentVersion = new MinecraftVersion(this.getDescription().getVersion()); MinecraftVersion newestVersion = null; + // Skip the file that contains this current instance however + File loadedFile = getFile(); + try { // Scan the plugin folder for newer versions of ProtocolLib File pluginFolder = new File("plugins/"); for (File candidate : pluginFolder.listFiles()) { - if (candidate.isFile()) { + if (candidate.isFile() && !candidate.equals(loadedFile)) { Matcher match = ourPlugin.matcher(candidate.getName()); if (match.matches()) { From c6d896d717db65463a3959a6d4044ddfb4e87be4 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Tue, 22 Jan 2013 12:59:08 +0100 Subject: [PATCH 19/19] Bumping version to 2.1.0 This is because the previous release had a mistake in the API. --- ProtocolLib/pom.xml | 2 +- ProtocolLib/src/main/resources/plugin.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/pom.xml b/ProtocolLib/pom.xml index 9ef4c1aa..9c0c920b 100644 --- a/ProtocolLib/pom.xml +++ b/ProtocolLib/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.comphenix.protocol ProtocolLib - 2.0.1-SNAPSHOT + 2.1.0 jar Provides read/write access to the Minecraft protocol. diff --git a/ProtocolLib/src/main/resources/plugin.yml b/ProtocolLib/src/main/resources/plugin.yml index ee01cee9..174c6b4a 100644 --- a/ProtocolLib/src/main/resources/plugin.yml +++ b/ProtocolLib/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: ProtocolLib -version: 2.0.1-SNAPSHOT +version: 2.1.0 description: Provides read/write access to the Minecraft protocol. author: Comphenix website: http://www.comphenix.net/ProtocolLib