Read desc

Watcher is never null now
You can now change potion particles etc.
Added LivingWatcher
Cleaned up code
This commit is contained in:
Andrew
2013-05-31 03:36:59 +12:00
parent 39ca52ae8d
commit d1ccc40c59
16 changed files with 195 additions and 82 deletions

View File

@@ -58,9 +58,7 @@ public class LibsDisguises extends JavaPlugin {
if (DisguiseAPI.isDisguised(entity)) {
Disguise disguise = DisguiseAPI.getDisguise(entity);
if (event.getPacketID() == Packets.Server.ENTITY_METADATA) {
if (!(entity instanceof Player && disguise.getType().isPlayer()))
if (disguise.hasWatcher())
mods.write(1, disguise.getWatcher().convert((List<WatchableObject>) mods.read(1)));
mods.write(1, disguise.getWatcher().convert((List<WatchableObject>) mods.read(1)));
} else if (event.getPacketID() == Packets.Server.NAMED_ENTITY_SPAWN) {
if (disguise.getType().isPlayer()) {
String name = (String) mods.read(1);