More cleanup

This commit is contained in:
Pim van der Loos 2020-11-23 13:04:23 +01:00
parent fa15557cb8
commit 8e80e86e32
No known key found for this signature in database
GPG Key ID: C16F020ADAE6D5A8
6 changed files with 25 additions and 50 deletions

25
pom.xml
View File

@ -2,7 +2,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>nl.pim16aap2</groupId> <groupId>nl.pim16aap2.armoredElytra</groupId>
<artifactId>ArmoredElytra</artifactId> <artifactId>ArmoredElytra</artifactId>
<version>3.0</version> <version>3.0</version>
@ -74,7 +74,7 @@
<relocations> <relocations>
<relocation> <relocation>
<pattern>org.bstats</pattern> <pattern>org.bstats</pattern>
<shadedPattern>nl.pim16aap2.armoredElytra</shadedPattern> <shadedPattern>nl.pim16aap2.armoredElytra.lib.bstats</shadedPattern>
</relocation> </relocation>
</relocations> </relocations>
</configuration> </configuration>
@ -96,27 +96,6 @@
<target>8</target> <target>8</target>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>deploy-artifact</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<ant antfile="${basedir}/mover.xml">
<target name="copyAll"/>
</ant>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

View File

@ -1,11 +1,11 @@
package nl.pim16aap2.armoredElytra.handlers; 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.ArmoredElytra;
import nl.pim16aap2.armoredElytra.enchantment.EnchantmentManager; 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.Action;
import nl.pim16aap2.armoredElytra.util.AllowedToWearEnum; import nl.pim16aap2.armoredElytra.util.AllowedToWearEnum;
import nl.pim16aap2.armoredElytra.util.ArmorTier; 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.Material;
import org.bukkit.entity.Player; 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. * @param newArmorPiece The ItemStack of the armor added.
*/ */
public ArmorEquipEvent(final Player player, final EquipMethod equipType, final ArmorType type, 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); super(player);
this.equipType = equipType; 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, * Returns the last equipped armor piece, could be a piece of armor, {@link Material#Air}, or null.
* {@link Material#Air}, or null.
*/ */
public final ItemStack getOldArmorPiece() 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, * Returns the newly equipped armor, could be a piece of armor, {@link Material#Air}, or null.
* {@link Material#Air}, or null.
*/ */
public final ItemStack getNewArmorPiece() public final ItemStack getNewArmorPiece()
{ {
@ -136,18 +134,15 @@ public final class ArmorEquipEvent extends PlayerEvent implements Cancellable
*/ */
PICK_DROP, PICK_DROP,
/** /**
* When you right click an armor piece in the hotbar without the inventory open * When you right click an armor piece in the hotbar without the inventory open to equip.
* to equip.
*/ */
HOTBAR, HOTBAR,
/** /**
* When you press the hotbar slot number while hovering over the armor slot to * When you press the hotbar slot number while hovering over the armor slot to equip or unequip
* equip or unequip
*/ */
HOTBAR_SWAP, HOTBAR_SWAP,
/** /**
* When in range of a dispenser that shoots an armor piece to equip.<br> * When in range of a dispenser that shoots an armor piece to equip.<br> Requires the spigot version to have
* Requires the spigot version to have
* {@link org.bukkit.event.block.BlockDispenseArmorEvent} implemented. * {@link org.bukkit.event.block.BlockDispenseArmorEvent} implemented.
*/ */
DISPENSER, DISPENSER,
@ -158,6 +153,7 @@ public final class ArmorEquipEvent extends PlayerEvent implements Cancellable
/** /**
* When you die causing all armor to unequip * 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.Bukkit;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; 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.Material;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
@ -9,10 +9,10 @@ import org.bukkit.inventory.ItemStack;
*/ */
public enum ArmorType public enum ArmorType
{ {
HELMET (5), HELMET(5),
CHESTPLATE (6), CHESTPLATE(6),
LEGGINGS (7), LEGGINGS(7),
BOOTS (8); BOOTS(8);
private final int slot; private final int slot;
@ -50,4 +50,4 @@ public enum ArmorType
{ {
return slot; 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.Bukkit;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;