- Fixed anvils being unusable for non-AE stuff.
- Added backup note to uninstaller config option.
This commit is contained in:
parent
cb1d8c55a2
commit
acee288927
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>nl.pim16aap2</groupId>
|
||||
<artifactId>ArmoredElytra</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<version>2.0.1-SNAPSHOT</version>
|
||||
|
||||
|
||||
<repositories>
|
||||
|
@ -221,9 +221,14 @@ public class EventHandlers implements Listener
|
||||
// Verify the end result first, to prevent glitches. If the end result is invalid, remove the item and update the player's inventory.
|
||||
if (anvilInventory.getItem(2).getType() == Material.ELYTRA &&
|
||||
anvilInventory.getItem(0) != null &&
|
||||
anvilInventory.getItem(1) != null &&
|
||||
verifyEnchants(anvilInventory.getItem(2).getEnchantments()))
|
||||
anvilInventory.getItem(1) != null)
|
||||
{
|
||||
if (!verifyEnchants(anvilInventory.getItem(2).getEnchantments()))
|
||||
{
|
||||
anvilInventory.getItem(2).setAmount(0);
|
||||
p.updateInventory();
|
||||
return;
|
||||
}
|
||||
// If the elytra is armored with any tier other than leather and the other item is leather, remove the elytra.
|
||||
if ((nbtEditor.getArmorTier(anvilInventory.getItem(0)) != ArmorTier.LEATHER ||
|
||||
nbtEditor.getArmorTier(anvilInventory.getItem(1)) != ArmorTier.LEATHER) &&
|
||||
@ -243,11 +248,6 @@ public class EventHandlers implements Listener
|
||||
// Clean the anvil's inventory after transferring the items.
|
||||
cleanAnvil(anvilInventory);
|
||||
}
|
||||
else
|
||||
{
|
||||
anvilInventory.getItem(2).setAmount(0);
|
||||
p.updateInventory();
|
||||
}
|
||||
}
|
||||
|
||||
new BukkitRunnable()
|
||||
|
@ -69,7 +69,8 @@ public class ConfigLoader
|
||||
{"Setting this to true will disable this plugin and remove any armored elytras it can find.",
|
||||
"It will check player's inventories and their end chest upon login and any regular chest when it is opened.",
|
||||
"This means it will take a while for all armored elytras to be removed from your server, but it doesn't take up ",
|
||||
"a lot of resources, so you can just leave it installed and ignore it."};
|
||||
"a lot of resources, so you can just leave it installed and ignore it.",
|
||||
"Please do not forget to MAKE A BACKUP before enabling this option!"};
|
||||
|
||||
private ArrayList<ConfigOption> configOptionsList;
|
||||
private ArmoredElytra plugin;
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: ArmoredElytra
|
||||
main: nl.pim16aap2.armoredElytra.ArmoredElytra
|
||||
version: 2.0
|
||||
version: 2.0.1
|
||||
author: Pim
|
||||
commands:
|
||||
ArmoredElytra:
|
||||
|
Loading…
x
Reference in New Issue
Block a user