mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 10:36:10 +01:00
Fix horse/llama equipping
This commit is contained in:
parent
680af76457
commit
5f062dbb3a
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user