Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void execute(Event event) {
- Player client = this.playerToSee.getSingle(event);
- LivingEntity[] targetEntity = (LivingEntity[]) this.targetEntity.getAll(event);
- ItemStack item = this.item.getSingle(event);
- String slottoget = this.slot.getSingle(event);
- FakeEquipment.EquipmentSlot finalslot = getSlot(slottoget);
- for (LivingEntity le : targetEntity){
- FakeEquipment.EquipmentSendingEvent newevent = new FakeEquipment.EquipmentSendingEvent(client, le, finalslot, item);
- Bukkit.getPluginManager().callEvent(event);
- }
- }
- public FakeEquipment.EquipmentSlot getSlot(String slottoget){
- if (slottoget.equalsIgnoreCase("HEAD") || slottoget.equalsIgnoreCase("HELM") || slottoget.equalsIgnoreCase("HELMET")) {
- return FakeEquipment.EquipmentSlot.HELMET;
- }
- if (slottoget.equalsIgnoreCase("CHEST") || slottoget.equalsIgnoreCase("CHESTPLATE") || slottoget.equalsIgnoreCase("BODY")) {
- return FakeEquipment.EquipmentSlot.CHESTPLATE;
- }
- if (slottoget.equalsIgnoreCase("PANTS") || slottoget.equalsIgnoreCase("LEGS") || slottoget.equalsIgnoreCase("LEGGINGS")) {
- return FakeEquipment.EquipmentSlot.LEGGINGS;
- }
- if (slottoget.equalsIgnoreCase("BOOTS") || slottoget.equalsIgnoreCase("FEET") || slottoget.equalsIgnoreCase("SHOES")) {
- return FakeEquipment.EquipmentSlot.BOOTS;
- }
- if (slottoget.equalsIgnoreCase("HELD") || slottoget.equalsIgnoreCase("TOOL") || slottoget.equalsIgnoreCase("WEAPON")) {
- return FakeEquipment.EquipmentSlot.HELD;
- }
- return FakeEquipment.EquipmentSlot.HELMET;
- }
Advertisement
Add Comment
Please, Sign In to add comment