Archiviert
13
0

1.9 update: Fix entity modifiers

Fixes #153
Dieser Commit ist enthalten in:
Dan Mulloy 2016-03-01 16:07:59 -05:00
Ursprung d87e877a27
Commit 019e45572d
2 geänderte Dateien mit 7 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -229,13 +229,13 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.9-SNAPSHOT</version>
<version>1.9-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.9-SNAPSHOT</version>
<version>1.9-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>

Datei anzeigen

@ -102,7 +102,7 @@ class EntityUtilities {
trackedPlayers.removeAll(nmsPlayers);
// We have to rely on a NAME once again. Damn it.
// TODO: Make sure this stays up to date with version changes
// TODO: Make sure this stays up to date with version changes - 1.9
if (scanPlayersMethod == null) {
scanPlayersMethod = trackerEntry.getClass().getMethod("scanPlayers", List.class);
}
@ -233,11 +233,11 @@ class EntityUtilities {
if (trackerEntry != null) {
if (trackerField == null) {
try {
trackerField = trackerEntry.getClass().getField("tracker");
trackerField = trackerEntry.getClass().getDeclaredField("tracker");
} catch (NoSuchFieldException e) {
// Assume it's the first public entity field then
trackerField = FuzzyReflection.fromObject(trackerEntry).getFieldByType(
"tracker", MinecraftReflection.getEntityClass());
// Assume it's the first entity field then
trackerField = FuzzyReflection.fromObject(trackerEntry, true)
.getFieldByType("tracker", MinecraftReflection.getEntityClass());
}
}