Fix horse/llama equipping

This commit is contained in:
fullwall 2018-03-15 16:41:30 +08:00
parent 680af76457
commit 5f062dbb3a
4 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
package net.citizensnpcs.editor;
import org.bukkit.entity.Horse;
import org.bukkit.entity.Player;
import org.bukkit.entity.Tameable;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.util.NMS;
@ -9,7 +9,7 @@ import net.citizensnpcs.util.NMS;
public class HorseEquipper implements Equipper {
@Override
public void equip(Player equipper, NPC toEquip) {
Horse horse = (Horse) toEquip.getEntity();
Tameable horse = (Tameable) toEquip.getEntity();
NMS.openHorseScreen(horse, equipper);
}
}

View File

@ -699,7 +699,7 @@ public class NMSImpl implements NMSBridge {
return;
boolean wasTamed = horse.isTamed();
horse.setTamed(true);
((EntityHorse) handle).a((EntityHuman) equipperHandle);
((EntityHorse) handle).f((EntityHuman) equipperHandle);
horse.setTamed(wasTamed);
}

View File

@ -760,7 +760,7 @@ public class NMSImpl implements NMSBridge {
return;
boolean wasTamed = horse.isTamed();
horse.setTamed(true);
((EntityHorseAbstract) handle).a((EntityHuman) equipperHandle);
((EntityHorseAbstract) handle).f((EntityHuman) equipperHandle);
horse.setTamed(wasTamed);
}

View File

@ -767,7 +767,7 @@ public class NMSImpl implements NMSBridge {
return;
boolean wasTamed = horse.isTamed();
horse.setTamed(true);
((EntityHorseAbstract) handle).a((EntityHuman) equipperHandle);
((EntityHorseAbstract) handle).c((EntityHuman) equipperHandle);
horse.setTamed(wasTamed);
}