From f2125623f685d45b8f75ba14ccd21e41f8429b65 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Thu, 11 Jul 2013 00:04:42 +0200 Subject: [PATCH] Correct the fallback method for retrieving WatchableObjects. --- .../com/comphenix/protocol/utility/MinecraftReflection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/utility/MinecraftReflection.java b/ProtocolLib/src/main/java/com/comphenix/protocol/utility/MinecraftReflection.java index ef1a0151..40fe3d58 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/utility/MinecraftReflection.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/utility/MinecraftReflection.java @@ -18,7 +18,7 @@ package com.comphenix.protocol.utility; import java.io.DataInputStream; -import java.io.DataOutputStream; +import java.io.DataOutput; import java.lang.reflect.Array; import java.lang.reflect.Constructor; import java.lang.reflect.Field; @@ -797,7 +797,7 @@ public class MinecraftReflection { Method selected = FuzzyReflection.fromClass(getDataWatcherClass(), true). getMethod(FuzzyMethodContract.newBuilder(). requireModifier(Modifier.STATIC). - parameterSuperOf(DataOutputStream.class, 0). + parameterDerivedOf(DataOutput.class, 0). parameterMatches(getMinecraftObjectMatcher(), 1). build());