More cleanup

This commit is contained in:
Pim van der Loos
2020-11-23 13:04:23 +01:00
parent fa15557cb8
commit 8e80e86e32
6 changed files with 25 additions and 50 deletions

View File

@ -1,11 +1,11 @@
package nl.pim16aap2.armoredElytra.handlers;
import com.codingforcookies.armorequip.ArmorEquipEvent;
import com.codingforcookies.armorequip.ArmorListener;
import com.codingforcookies.armorequip.ArmorType;
import com.codingforcookies.armorequip.DispenserArmorListener;
import nl.pim16aap2.armoredElytra.ArmoredElytra;
import nl.pim16aap2.armoredElytra.enchantment.EnchantmentManager;
import nl.pim16aap2.armoredElytra.lib.armorequip.ArmorEquipEvent;
import nl.pim16aap2.armoredElytra.lib.armorequip.ArmorListener;
import nl.pim16aap2.armoredElytra.lib.armorequip.ArmorType;
import nl.pim16aap2.armoredElytra.lib.armorequip.DispenserArmorListener;
import nl.pim16aap2.armoredElytra.util.Action;
import nl.pim16aap2.armoredElytra.util.AllowedToWearEnum;
import nl.pim16aap2.armoredElytra.util.ArmorTier;

View File

@ -1,4 +1,4 @@
package com.codingforcookies.armorequip;
package nl.pim16aap2.armoredElytra.lib.armorequip;
import org.bukkit.Material;
import org.bukkit.entity.Player;
@ -28,7 +28,7 @@ public final class ArmorEquipEvent extends PlayerEvent implements Cancellable
* @param newArmorPiece The ItemStack of the armor added.
*/
public ArmorEquipEvent(final Player player, final EquipMethod equipType, final ArmorType type,
final ItemStack oldArmorPiece, final ItemStack newArmorPiece)
final ItemStack oldArmorPiece, final ItemStack newArmorPiece)
{
super(player);
this.equipType = equipType;
@ -86,8 +86,7 @@ public final class ArmorEquipEvent extends PlayerEvent implements Cancellable
}
/**
* Returns the last equipped armor piece, could be a piece of armor,
* {@link Material#Air}, or null.
* Returns the last equipped armor piece, could be a piece of armor, {@link Material#Air}, or null.
*/
public final ItemStack getOldArmorPiece()
{
@ -100,8 +99,7 @@ public final class ArmorEquipEvent extends PlayerEvent implements Cancellable
}
/**
* Returns the newly equipped armor, could be a piece of armor,
* {@link Material#Air}, or null.
* Returns the newly equipped armor, could be a piece of armor, {@link Material#Air}, or null.
*/
public final ItemStack getNewArmorPiece()
{
@ -136,18 +134,15 @@ public final class ArmorEquipEvent extends PlayerEvent implements Cancellable
*/
PICK_DROP,
/**
* When you right click an armor piece in the hotbar without the inventory open
* to equip.
* When you right click an armor piece in the hotbar without the inventory open to equip.
*/
HOTBAR,
/**
* When you press the hotbar slot number while hovering over the armor slot to
* equip or unequip
* When you press the hotbar slot number while hovering over the armor slot to equip or unequip
*/
HOTBAR_SWAP,
/**
* When in range of a dispenser that shoots an armor piece to equip.<br>
* Requires the spigot version to have
* When in range of a dispenser that shoots an armor piece to equip.<br> Requires the spigot version to have
* {@link org.bukkit.event.block.BlockDispenseArmorEvent} implemented.
*/
DISPENSER,
@ -158,6 +153,7 @@ public final class ArmorEquipEvent extends PlayerEvent implements Cancellable
/**
* When you die causing all armor to unequip
*/
DEATH,;
DEATH,
;
}
}
}

View File

@ -1,6 +1,6 @@
package com.codingforcookies.armorequip;
package nl.pim16aap2.armoredElytra.lib.armorequip;
import com.codingforcookies.armorequip.ArmorEquipEvent.EquipMethod;
import nl.pim16aap2.armoredElytra.lib.armorequip.ArmorEquipEvent.EquipMethod;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package com.codingforcookies.armorequip;
package nl.pim16aap2.armoredElytra.lib.armorequip;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
@ -9,10 +9,10 @@ import org.bukkit.inventory.ItemStack;
*/
public enum ArmorType
{
HELMET (5),
CHESTPLATE (6),
LEGGINGS (7),
BOOTS (8);
HELMET(5),
CHESTPLATE(6),
LEGGINGS(7),
BOOTS(8);
private final int slot;
@ -50,4 +50,4 @@ public enum ArmorType
{
return slot;
}
}
}

View File

@ -1,4 +1,4 @@
package com.codingforcookies.armorequip;
package nl.pim16aap2.armoredElytra.lib.armorequip;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;