Optimizations and a purge fix

This commit is contained in:
MattBDev
2016-04-02 01:30:26 -04:00
parent 8243e0118a
commit 4ebd778c62
33 changed files with 765 additions and 835 deletions

View File

@ -53,6 +53,6 @@ public class BukkitCommand implements CommandExecutor, TabCompleter {
for (Object o : objects) {
result.add(o.toString());
}
return result.size() == 0 ? null : result;
return result.isEmpty() ? null : result;
}
}

View File

@ -50,6 +50,7 @@ public class SendChunk {
RefClass classChunk = getRefClass("{nms}.Chunk");
this.methodInitLighting = classChunk.getMethod("initLighting");
RefClass classMapChunk = getRefClass("{nms}.PacketPlayOutMapChunk");
//TODO in 1.7.10 this is PacketPlayOutMapChunk(Chunk chunk, boolean flag, int i, int version)
this.mapChunk = classMapChunk.getConstructor(classChunk.getRealClass(), boolean.class, int.class);
RefClass classEntityPlayer = getRefClass("{nms}.EntityPlayer");
this.connection = classEntityPlayer.getField("playerConnection");