From 286e1159e9203a3921154b3ee1e87afd3209666b Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Sun, 16 Sep 2012 03:18:58 +0200 Subject: [PATCH] Made certain classes private. No need to expose them to the API. --- .../comphenix/protocol/injector/NetworkFieldInjector.java | 2 +- .../comphenix/protocol/injector/NetworkObjectInjector.java | 2 +- .../comphenix/protocol/injector/PacketFilterManager.java | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/src/com/comphenix/protocol/injector/NetworkFieldInjector.java b/ProtocolLib/src/com/comphenix/protocol/injector/NetworkFieldInjector.java index 23975981..e3f6923d 100644 --- a/ProtocolLib/src/com/comphenix/protocol/injector/NetworkFieldInjector.java +++ b/ProtocolLib/src/com/comphenix/protocol/injector/NetworkFieldInjector.java @@ -23,7 +23,7 @@ import net.minecraft.server.Packet; * * @author Kristian */ -public class NetworkFieldInjector extends PlayerInjector { +class NetworkFieldInjector extends PlayerInjector { /** * Marker interface that indicates a packet is fake and should not be processed. diff --git a/ProtocolLib/src/com/comphenix/protocol/injector/NetworkObjectInjector.java b/ProtocolLib/src/com/comphenix/protocol/injector/NetworkObjectInjector.java index 2981a3db..02efd317 100644 --- a/ProtocolLib/src/com/comphenix/protocol/injector/NetworkObjectInjector.java +++ b/ProtocolLib/src/com/comphenix/protocol/injector/NetworkObjectInjector.java @@ -16,7 +16,7 @@ import org.bukkit.entity.Player; * * @author Kristian */ -public class NetworkObjectInjector extends PlayerInjector { +class NetworkObjectInjector extends PlayerInjector { public NetworkObjectInjector(Player player, PacketFilterManager manager, Set sendingFilters) throws IllegalAccessException { super(player, manager, sendingFilters); } diff --git a/ProtocolLib/src/com/comphenix/protocol/injector/PacketFilterManager.java b/ProtocolLib/src/com/comphenix/protocol/injector/PacketFilterManager.java index 472228bb..6b6e1e33 100644 --- a/ProtocolLib/src/com/comphenix/protocol/injector/PacketFilterManager.java +++ b/ProtocolLib/src/com/comphenix/protocol/injector/PacketFilterManager.java @@ -63,6 +63,10 @@ public final class PacketFilterManager implements ProtocolManager { */ NETWORK_HANDLER_FIELDS, + /** + * Override the network handler object itself. + */ + NETWORK_MANAGER_OBJECT } // Create a concurrent set @@ -352,6 +356,8 @@ public final class PacketFilterManager implements ProtocolManager { switch (playerHook) { case NETWORK_HANDLER_FIELDS: return new NetworkFieldInjector(player, this, sendingFilters); + case NETWORK_MANAGER_OBJECT: + return new NetworkObjectInjector(player, this, sendingFilters); } throw new IllegalArgumentException("Cannot construct a player injector.");