Update to 1.15.1
This commit is contained in:
parent
70c606b8df
commit
279c17b0c4
6
pom.xml
6
pom.xml
|
@ -25,19 +25,19 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
<version>1.13.2-R0.1-SNAPSHOT</version>
|
<version>1.15.1-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>craftbukkit</artifactId>
|
<artifactId>craftbukkit</artifactId>
|
||||||
<version>1.13.2-R0.1-SNAPSHOT</version>
|
<version>1.15.1-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>bukkit</artifactId>
|
<artifactId>bukkit</artifactId>
|
||||||
<version>1.13.2-R0.1-SNAPSHOT</version>
|
<version>1.15.1-R0.1-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>de.tr7zw</groupId>
|
<groupId>de.tr7zw</groupId>
|
||||||
|
|
|
@ -1,17 +1,12 @@
|
||||||
package com.fpghoti.classicswords.event;
|
package com.fpghoti.classicswords.event;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.Entity;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent.DamageModifier;
|
import org.bukkit.event.entity.EntityDamageEvent.DamageModifier;
|
||||||
import org.bukkit.event.inventory.InventoryOpenEvent;
|
|
||||||
|
|
||||||
import com.fpghoti.classicswords.ClassicSwordsMain;
|
|
||||||
|
|
||||||
|
|
||||||
public class BlockingListener implements Listener{
|
public class BlockingListener implements Listener{
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.fpghoti.classicswords.item;
|
package com.fpghoti.classicswords.item;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.craftbukkit.v1_13_R2.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_15_R1.inventory.CraftItemStack;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemFlag;
|
import org.bukkit.inventory.ItemFlag;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
@ -9,11 +9,8 @@ import org.bukkit.inventory.meta.Damageable;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
import net.minecraft.server.v1_13_R2.NBTTagCompound;
|
import net.minecraft.server.v1_15_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_13_R2.NBTTagDouble;
|
import net.minecraft.server.v1_15_R1.NBTTagList;
|
||||||
import net.minecraft.server.v1_13_R2.NBTTagInt;
|
|
||||||
import net.minecraft.server.v1_13_R2.NBTTagList;
|
|
||||||
import net.minecraft.server.v1_13_R2.NBTTagString;
|
|
||||||
|
|
||||||
public class CItemManager {
|
public class CItemManager {
|
||||||
|
|
||||||
|
@ -25,32 +22,32 @@ public class CItemManager {
|
||||||
meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
|
meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
|
||||||
meta.setDisplayName("Classic Diamond Sword");
|
meta.setDisplayName("Classic Diamond Sword");
|
||||||
csword.setItemMeta(meta);
|
csword.setItemMeta(meta);
|
||||||
net.minecraft.server.v1_13_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
net.minecraft.server.v1_15_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
||||||
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
||||||
NBTTagList modifiers = new NBTTagList();
|
NBTTagList modifiers = new NBTTagList();
|
||||||
NBTTagCompound damage = new NBTTagCompound();
|
NBTTagCompound damage = new NBTTagCompound();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
damage.set("AttributeName", new NBTTagString("generic.attackDamage"));
|
damage.set("AttributeName", SetAttributes.nbtString("generic.attackDamage"));
|
||||||
damage.set("Name", new NBTTagString("generic.attackDamage"));
|
damage.set("Name", SetAttributes.nbtString("generic.attackDamage"));
|
||||||
damage.set("Amount", new NBTTagInt(7));
|
damage.set("Amount", SetAttributes.nbtInt(7));
|
||||||
damage.set("Operation", new NBTTagInt(0));
|
damage.set("Operation", SetAttributes.nbtInt(0));
|
||||||
damage.set("UUIDLeast", new NBTTagInt(894654));
|
damage.set("UUIDLeast", SetAttributes.nbtInt(894654));
|
||||||
damage.set("UUIDMost", new NBTTagInt(2872));
|
damage.set("UUIDMost", SetAttributes.nbtInt(2872));
|
||||||
damage.set("Slot", new NBTTagString("mainhand"));
|
damage.set("Slot", SetAttributes.nbtString("mainhand"));
|
||||||
|
|
||||||
NBTTagCompound atspeed = new NBTTagCompound();
|
NBTTagCompound atspeed = new NBTTagCompound();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
atspeed.set("AttributeName", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("AttributeName", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Name", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("Name", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Amount", new NBTTagDouble(1021.6));
|
atspeed.set("Amount", SetAttributes.nbtDouble(1021.6));
|
||||||
atspeed.set("Operation", new NBTTagInt(0));
|
atspeed.set("Operation", SetAttributes.nbtInt(0));
|
||||||
atspeed.set("UUIDLeast", new NBTTagInt(894654));
|
atspeed.set("UUIDLeast", SetAttributes.nbtInt(894654));
|
||||||
atspeed.set("UUIDMost", new NBTTagInt(2872));
|
atspeed.set("UUIDMost", SetAttributes.nbtInt(2872));
|
||||||
atspeed.set("Slot", new NBTTagString("mainhand"));
|
atspeed.set("Slot", SetAttributes.nbtString("mainhand"));
|
||||||
|
|
||||||
modifiers.add(damage);
|
modifiers.add(damage);
|
||||||
modifiers.add(atspeed);
|
modifiers.add(atspeed);
|
||||||
|
@ -76,32 +73,32 @@ public class CItemManager {
|
||||||
meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
|
meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
|
||||||
meta.setDisplayName("Classic Wood Sword");
|
meta.setDisplayName("Classic Wood Sword");
|
||||||
csword.setItemMeta(meta);
|
csword.setItemMeta(meta);
|
||||||
net.minecraft.server.v1_13_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
net.minecraft.server.v1_15_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
||||||
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
||||||
NBTTagList modifiers = new NBTTagList();
|
NBTTagList modifiers = new NBTTagList();
|
||||||
NBTTagCompound damage = new NBTTagCompound();
|
NBTTagCompound damage = new NBTTagCompound();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
damage.set("AttributeName", new NBTTagString("generic.attackDamage"));
|
damage.set("AttributeName", SetAttributes.nbtString("generic.attackDamage"));
|
||||||
damage.set("Name", new NBTTagString("generic.attackDamage"));
|
damage.set("Name", SetAttributes.nbtString("generic.attackDamage"));
|
||||||
damage.set("Amount", new NBTTagInt(4));
|
damage.set("Amount", SetAttributes.nbtInt(4));
|
||||||
damage.set("Operation", new NBTTagInt(0));
|
damage.set("Operation", SetAttributes.nbtInt(0));
|
||||||
damage.set("UUIDLeast", new NBTTagInt(894654));
|
damage.set("UUIDLeast", SetAttributes.nbtInt(894654));
|
||||||
damage.set("UUIDMost", new NBTTagInt(2872));
|
damage.set("UUIDMost", SetAttributes.nbtInt(2872));
|
||||||
damage.set("Slot", new NBTTagString("mainhand"));
|
damage.set("Slot", SetAttributes.nbtString("mainhand"));
|
||||||
|
|
||||||
NBTTagCompound atspeed = new NBTTagCompound();
|
NBTTagCompound atspeed = new NBTTagCompound();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
atspeed.set("AttributeName", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("AttributeName", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Name", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("Name", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Amount", new NBTTagDouble(1021.6));
|
atspeed.set("Amount", SetAttributes.nbtDouble(1021.6));
|
||||||
atspeed.set("Operation", new NBTTagInt(0));
|
atspeed.set("Operation", SetAttributes.nbtInt(0));
|
||||||
atspeed.set("UUIDLeast", new NBTTagInt(894654));
|
atspeed.set("UUIDLeast", SetAttributes.nbtInt(894654));
|
||||||
atspeed.set("UUIDMost", new NBTTagInt(2872));
|
atspeed.set("UUIDMost", SetAttributes.nbtInt(2872));
|
||||||
atspeed.set("Slot", new NBTTagString("mainhand"));
|
atspeed.set("Slot", SetAttributes.nbtString("mainhand"));
|
||||||
|
|
||||||
modifiers.add(damage);
|
modifiers.add(damage);
|
||||||
modifiers.add(atspeed);
|
modifiers.add(atspeed);
|
||||||
|
@ -127,32 +124,32 @@ public class CItemManager {
|
||||||
meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
|
meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
|
||||||
meta.setDisplayName("Classic Stone Sword");
|
meta.setDisplayName("Classic Stone Sword");
|
||||||
csword.setItemMeta(meta);
|
csword.setItemMeta(meta);
|
||||||
net.minecraft.server.v1_13_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
net.minecraft.server.v1_15_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
||||||
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
||||||
NBTTagList modifiers = new NBTTagList();
|
NBTTagList modifiers = new NBTTagList();
|
||||||
NBTTagCompound damage = new NBTTagCompound();
|
NBTTagCompound damage = new NBTTagCompound();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
damage.set("AttributeName", new NBTTagString("generic.attackDamage"));
|
damage.set("AttributeName", SetAttributes.nbtString("generic.attackDamage"));
|
||||||
damage.set("Name", new NBTTagString("generic.attackDamage"));
|
damage.set("Name", SetAttributes.nbtString("generic.attackDamage"));
|
||||||
damage.set("Amount", new NBTTagInt(5));
|
damage.set("Amount", SetAttributes.nbtInt(5));
|
||||||
damage.set("Operation", new NBTTagInt(0));
|
damage.set("Operation", SetAttributes.nbtInt(0));
|
||||||
damage.set("UUIDLeast", new NBTTagInt(894654));
|
damage.set("UUIDLeast", SetAttributes.nbtInt(894654));
|
||||||
damage.set("UUIDMost", new NBTTagInt(2872));
|
damage.set("UUIDMost", SetAttributes.nbtInt(2872));
|
||||||
damage.set("Slot", new NBTTagString("mainhand"));
|
damage.set("Slot", SetAttributes.nbtString("mainhand"));
|
||||||
|
|
||||||
NBTTagCompound atspeed = new NBTTagCompound();
|
NBTTagCompound atspeed = new NBTTagCompound();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
atspeed.set("AttributeName", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("AttributeName", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Name", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("Name", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Amount", new NBTTagDouble(1021.6));
|
atspeed.set("Amount", SetAttributes.nbtDouble(1021.6));
|
||||||
atspeed.set("Operation", new NBTTagInt(0));
|
atspeed.set("Operation", SetAttributes.nbtInt(0));
|
||||||
atspeed.set("UUIDLeast", new NBTTagInt(894654));
|
atspeed.set("UUIDLeast", SetAttributes.nbtInt(894654));
|
||||||
atspeed.set("UUIDMost", new NBTTagInt(2872));
|
atspeed.set("UUIDMost", SetAttributes.nbtInt(2872));
|
||||||
atspeed.set("Slot", new NBTTagString("mainhand"));
|
atspeed.set("Slot", SetAttributes.nbtString("mainhand"));
|
||||||
|
|
||||||
modifiers.add(damage);
|
modifiers.add(damage);
|
||||||
modifiers.add(atspeed);
|
modifiers.add(atspeed);
|
||||||
|
@ -178,32 +175,32 @@ public class CItemManager {
|
||||||
meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
|
meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
|
||||||
meta.setDisplayName("Classic Iron Sword");
|
meta.setDisplayName("Classic Iron Sword");
|
||||||
csword.setItemMeta(meta);
|
csword.setItemMeta(meta);
|
||||||
net.minecraft.server.v1_13_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
net.minecraft.server.v1_15_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
||||||
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
||||||
NBTTagList modifiers = new NBTTagList();
|
NBTTagList modifiers = new NBTTagList();
|
||||||
NBTTagCompound damage = new NBTTagCompound();
|
NBTTagCompound damage = new NBTTagCompound();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
damage.set("AttributeName", new NBTTagString("generic.attackDamage"));
|
damage.set("AttributeName", SetAttributes.nbtString("generic.attackDamage"));
|
||||||
damage.set("Name", new NBTTagString("generic.attackDamage"));
|
damage.set("Name", SetAttributes.nbtString("generic.attackDamage"));
|
||||||
damage.set("Amount", new NBTTagInt(6));
|
damage.set("Amount", SetAttributes.nbtInt(6));
|
||||||
damage.set("Operation", new NBTTagInt(0));
|
damage.set("Operation", SetAttributes.nbtInt(0));
|
||||||
damage.set("UUIDLeast", new NBTTagInt(894654));
|
damage.set("UUIDLeast", SetAttributes.nbtInt(894654));
|
||||||
damage.set("UUIDMost", new NBTTagInt(2872));
|
damage.set("UUIDMost", SetAttributes.nbtInt(2872));
|
||||||
damage.set("Slot", new NBTTagString("mainhand"));
|
damage.set("Slot", SetAttributes.nbtString("mainhand"));
|
||||||
|
|
||||||
NBTTagCompound atspeed = new NBTTagCompound();
|
NBTTagCompound atspeed = new NBTTagCompound();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
atspeed.set("AttributeName", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("AttributeName", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Name", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("Name", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Amount", new NBTTagDouble(1021.6));
|
atspeed.set("Amount", SetAttributes.nbtDouble(1021.6));
|
||||||
atspeed.set("Operation", new NBTTagInt(0));
|
atspeed.set("Operation", SetAttributes.nbtInt(0));
|
||||||
atspeed.set("UUIDLeast", new NBTTagInt(894654));
|
atspeed.set("UUIDLeast", SetAttributes.nbtInt(894654));
|
||||||
atspeed.set("UUIDMost", new NBTTagInt(2872));
|
atspeed.set("UUIDMost", SetAttributes.nbtInt(2872));
|
||||||
atspeed.set("Slot", new NBTTagString("mainhand"));
|
atspeed.set("Slot", SetAttributes.nbtString("mainhand"));
|
||||||
|
|
||||||
modifiers.add(damage);
|
modifiers.add(damage);
|
||||||
modifiers.add(atspeed);
|
modifiers.add(atspeed);
|
||||||
|
@ -229,32 +226,32 @@ public class CItemManager {
|
||||||
meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
|
meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
|
||||||
meta.setDisplayName("Classic Gold Sword");
|
meta.setDisplayName("Classic Gold Sword");
|
||||||
csword.setItemMeta(meta);
|
csword.setItemMeta(meta);
|
||||||
net.minecraft.server.v1_13_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
net.minecraft.server.v1_15_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
||||||
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
||||||
NBTTagList modifiers = new NBTTagList();
|
NBTTagList modifiers = new NBTTagList();
|
||||||
NBTTagCompound damage = new NBTTagCompound();
|
NBTTagCompound damage = new NBTTagCompound();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
damage.set("AttributeName", new NBTTagString("generic.attackDamage"));
|
damage.set("AttributeName", SetAttributes.nbtString("generic.attackDamage"));
|
||||||
damage.set("Name", new NBTTagString("generic.attackDamage"));
|
damage.set("Name", SetAttributes.nbtString("generic.attackDamage"));
|
||||||
damage.set("Amount", new NBTTagInt(4));
|
damage.set("Amount", SetAttributes.nbtInt(4));
|
||||||
damage.set("Operation", new NBTTagInt(0));
|
damage.set("Operation", SetAttributes.nbtInt(0));
|
||||||
damage.set("UUIDLeast", new NBTTagInt(894654));
|
damage.set("UUIDLeast", SetAttributes.nbtInt(894654));
|
||||||
damage.set("UUIDMost", new NBTTagInt(2872));
|
damage.set("UUIDMost", SetAttributes.nbtInt(2872));
|
||||||
damage.set("Slot", new NBTTagString("mainhand"));
|
damage.set("Slot", SetAttributes.nbtString("mainhand"));
|
||||||
|
|
||||||
NBTTagCompound atspeed = new NBTTagCompound();
|
NBTTagCompound atspeed = new NBTTagCompound();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
atspeed.set("AttributeName", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("AttributeName", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Name", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("Name", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Amount", new NBTTagDouble(1021.6));
|
atspeed.set("Amount", SetAttributes.nbtDouble(1021.6));
|
||||||
atspeed.set("Operation", new NBTTagInt(0));
|
atspeed.set("Operation", SetAttributes.nbtInt(0));
|
||||||
atspeed.set("UUIDLeast", new NBTTagInt(894654));
|
atspeed.set("UUIDLeast", SetAttributes.nbtInt(894654));
|
||||||
atspeed.set("UUIDMost", new NBTTagInt(2872));
|
atspeed.set("UUIDMost", SetAttributes.nbtInt(2872));
|
||||||
atspeed.set("Slot", new NBTTagString("mainhand"));
|
atspeed.set("Slot", SetAttributes.nbtString("mainhand"));
|
||||||
|
|
||||||
modifiers.add(damage);
|
modifiers.add(damage);
|
||||||
modifiers.add(atspeed);
|
modifiers.add(atspeed);
|
||||||
|
|
|
@ -4,7 +4,7 @@ import org.bukkit.Material;
|
||||||
|
|
||||||
import com.fpghoti.classicswords.util.Storage;
|
import com.fpghoti.classicswords.util.Storage;
|
||||||
|
|
||||||
import net.minecraft.server.v1_13_R2.NBTTagCompound;
|
import net.minecraft.server.v1_15_R1.NBTTagCompound;
|
||||||
|
|
||||||
public class CItemType {
|
public class CItemType {
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import java.lang.reflect.Constructor;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.craftbukkit.v1_13_R2.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_15_R1.inventory.CraftItemStack;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
|
@ -17,11 +17,8 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||||
import com.fpghoti.classicswords.item.CItemType.SwordType;
|
import com.fpghoti.classicswords.item.CItemType.SwordType;
|
||||||
import com.fpghoti.classicswords.util.Storage;
|
import com.fpghoti.classicswords.util.Storage;
|
||||||
|
|
||||||
import net.minecraft.server.v1_13_R2.NBTTagCompound;
|
import net.minecraft.server.v1_15_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_13_R2.NBTTagDouble;
|
import net.minecraft.server.v1_15_R1.NBTTagList;
|
||||||
import net.minecraft.server.v1_13_R2.NBTTagInt;
|
|
||||||
import net.minecraft.server.v1_13_R2.NBTTagList;
|
|
||||||
import net.minecraft.server.v1_13_R2.NBTTagString;
|
|
||||||
|
|
||||||
public class ClassicSword {
|
public class ClassicSword {
|
||||||
|
|
||||||
|
@ -52,28 +49,28 @@ public class ClassicSword {
|
||||||
meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
|
meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
|
||||||
meta.setDisplayName(name);
|
meta.setDisplayName(name);
|
||||||
csword.setItemMeta(meta);
|
csword.setItemMeta(meta);
|
||||||
net.minecraft.server.v1_13_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
net.minecraft.server.v1_15_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
||||||
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
||||||
NBTTagList modifiers = new NBTTagList();
|
NBTTagList modifiers = new NBTTagList();
|
||||||
NBTTagCompound damage = CItemType.getSwordType(type);
|
NBTTagCompound damage = CItemType.getSwordType(type);
|
||||||
|
|
||||||
NBTTagCompound atspeed = new NBTTagCompound();
|
NBTTagCompound atspeed = new NBTTagCompound();
|
||||||
|
|
||||||
atspeed.set("AttributeName", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("AttributeName", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Name", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("Name", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Amount", new NBTTagDouble(1021.6));
|
atspeed.set("Amount", SetAttributes.nbtDouble(1021.6));
|
||||||
atspeed.set("Operation", new NBTTagInt(0));
|
atspeed.set("Operation", SetAttributes.nbtInt(0));
|
||||||
atspeed.set("UUIDLeast", new NBTTagInt(894654));
|
atspeed.set("UUIDLeast", SetAttributes.nbtInt(894654));
|
||||||
atspeed.set("UUIDMost", new NBTTagInt(2872));
|
atspeed.set("UUIDMost", SetAttributes.nbtInt(2872));
|
||||||
atspeed.set("Slot", new NBTTagString("mainhand"));
|
atspeed.set("Slot", SetAttributes.nbtString("mainhand"));
|
||||||
|
|
||||||
NBTTagCompound cstag = new NBTTagCompound();
|
NBTTagCompound cstag = new NBTTagCompound();
|
||||||
|
|
||||||
//int dur = old.getType().getMaxDurability() - old.getDurability();
|
//int dur = old.getType().getMaxDurability() - old.getDurability();
|
||||||
int dur = old.getType().getMaxDurability() - ((Damageable)old.getItemMeta()).getDamage();
|
int dur = old.getType().getMaxDurability() - ((Damageable)old.getItemMeta()).getDamage();
|
||||||
|
|
||||||
cstag.set("Durability", new NBTTagInt(dur));
|
cstag.set("Durability", SetAttributes.nbtInt(dur));
|
||||||
cstag.set("Type", new NBTTagString(CItemType.getShortName(type)));
|
cstag.set("Type", SetAttributes.nbtString(CItemType.getShortName(type)));
|
||||||
|
|
||||||
modifiers.add(damage);
|
modifiers.add(damage);
|
||||||
modifiers.add(atspeed);
|
modifiers.add(atspeed);
|
||||||
|
@ -116,29 +113,29 @@ public class ClassicSword {
|
||||||
meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
|
meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
|
||||||
meta.setDisplayName(name);
|
meta.setDisplayName(name);
|
||||||
csword.setItemMeta(meta);
|
csword.setItemMeta(meta);
|
||||||
net.minecraft.server.v1_13_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
net.minecraft.server.v1_15_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
||||||
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
||||||
NBTTagList modifiers = new NBTTagList();
|
NBTTagList modifiers = new NBTTagList();
|
||||||
NBTTagCompound damage = CItemType.getSwordType(type);
|
NBTTagCompound damage = CItemType.getSwordType(type);
|
||||||
|
|
||||||
NBTTagCompound atspeed = new NBTTagCompound();
|
NBTTagCompound atspeed = new NBTTagCompound();
|
||||||
|
|
||||||
atspeed.set("AttributeName", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("AttributeName", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Name", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("Name", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Amount", new NBTTagDouble(1021.6));
|
atspeed.set("Amount", SetAttributes.nbtDouble(1021.6));
|
||||||
atspeed.set("Operation", new NBTTagInt(0));
|
atspeed.set("Operation", SetAttributes.nbtInt(0));
|
||||||
atspeed.set("UUIDLeast", new NBTTagInt(894654));
|
atspeed.set("UUIDLeast", SetAttributes.nbtInt(894654));
|
||||||
atspeed.set("UUIDMost", new NBTTagInt(2872));
|
atspeed.set("UUIDMost", SetAttributes.nbtInt(2872));
|
||||||
atspeed.set("Slot", new NBTTagString("mainhand"));
|
atspeed.set("Slot", SetAttributes.nbtString("mainhand"));
|
||||||
|
|
||||||
NBTTagCompound cstag = new NBTTagCompound();
|
NBTTagCompound cstag = new NBTTagCompound();
|
||||||
|
|
||||||
int dur = getCShieldDurability(old);
|
int dur = getCShieldDurability(old);
|
||||||
cstag.set("Durability", new NBTTagInt(dur));
|
cstag.set("Durability", SetAttributes.nbtInt(dur));
|
||||||
cstag.set("Type", new NBTTagString(CItemType.getShortName(type)));
|
cstag.set("Type", SetAttributes.nbtString(CItemType.getShortName(type)));
|
||||||
|
|
||||||
NBTTagCompound blocktag = new NBTTagCompound();
|
NBTTagCompound blocktag = new NBTTagCompound();
|
||||||
blocktag.set("BlockHit", new NBTTagString("BlockHit"));
|
blocktag.set("BlockHit", SetAttributes.nbtString("BlockHit"));
|
||||||
|
|
||||||
modifiers.add(damage);
|
modifiers.add(damage);
|
||||||
modifiers.add(atspeed);
|
modifiers.add(atspeed);
|
||||||
|
@ -187,26 +184,26 @@ public class ClassicSword {
|
||||||
meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
|
meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
|
||||||
meta.setDisplayName(name);
|
meta.setDisplayName(name);
|
||||||
csword.setItemMeta(meta);
|
csword.setItemMeta(meta);
|
||||||
net.minecraft.server.v1_13_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
net.minecraft.server.v1_15_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
||||||
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
||||||
NBTTagList modifiers = new NBTTagList();
|
NBTTagList modifiers = new NBTTagList();
|
||||||
NBTTagCompound damage = CItemType.getSwordType(type);
|
NBTTagCompound damage = CItemType.getSwordType(type);
|
||||||
|
|
||||||
NBTTagCompound atspeed = new NBTTagCompound();
|
NBTTagCompound atspeed = new NBTTagCompound();
|
||||||
|
|
||||||
atspeed.set("AttributeName", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("AttributeName", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Name", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("Name", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Amount", new NBTTagDouble(1021.6));
|
atspeed.set("Amount", SetAttributes.nbtDouble(1021.6));
|
||||||
atspeed.set("Operation", new NBTTagInt(0));
|
atspeed.set("Operation", SetAttributes.nbtInt(0));
|
||||||
atspeed.set("UUIDLeast", new NBTTagInt(894654));
|
atspeed.set("UUIDLeast", SetAttributes.nbtInt(894654));
|
||||||
atspeed.set("UUIDMost", new NBTTagInt(2872));
|
atspeed.set("UUIDMost", SetAttributes.nbtInt(2872));
|
||||||
atspeed.set("Slot", new NBTTagString("mainhand"));
|
atspeed.set("Slot", SetAttributes.nbtString("mainhand"));
|
||||||
|
|
||||||
NBTTagCompound cstag = new NBTTagCompound();
|
NBTTagCompound cstag = new NBTTagCompound();
|
||||||
|
|
||||||
int dur = getCShieldDurability(old);
|
int dur = getCShieldDurability(old);
|
||||||
cstag.set("Durability", new NBTTagInt(dur));
|
cstag.set("Durability", SetAttributes.nbtInt(dur));
|
||||||
cstag.set("Type", new NBTTagString(CItemType.getShortName(type)));
|
cstag.set("Type", SetAttributes.nbtString(CItemType.getShortName(type)));
|
||||||
|
|
||||||
|
|
||||||
modifiers.add(damage);
|
modifiers.add(damage);
|
||||||
|
@ -252,20 +249,20 @@ public class ClassicSword {
|
||||||
meta.setUnbreakable(false);
|
meta.setUnbreakable(false);
|
||||||
meta.setDisplayName(name);
|
meta.setDisplayName(name);
|
||||||
csword.setItemMeta(meta);
|
csword.setItemMeta(meta);
|
||||||
net.minecraft.server.v1_13_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
net.minecraft.server.v1_15_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(csword);
|
||||||
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
|
||||||
NBTTagList modifiers = new NBTTagList();
|
NBTTagList modifiers = new NBTTagList();
|
||||||
NBTTagCompound damage = CItemType.getSwordType(type);
|
NBTTagCompound damage = CItemType.getSwordType(type);
|
||||||
|
|
||||||
NBTTagCompound atspeed = new NBTTagCompound();
|
NBTTagCompound atspeed = new NBTTagCompound();
|
||||||
|
|
||||||
atspeed.set("AttributeName", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("AttributeName", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Name", new NBTTagString("generic.attackSpeed"));
|
atspeed.set("Name", SetAttributes.nbtString("generic.attackSpeed"));
|
||||||
atspeed.set("Amount", new NBTTagDouble(1021.6));
|
atspeed.set("Amount", SetAttributes.nbtDouble(1021.6));
|
||||||
atspeed.set("Operation", new NBTTagInt(0));
|
atspeed.set("Operation", SetAttributes.nbtInt(0));
|
||||||
atspeed.set("UUIDLeast", new NBTTagInt(894654));
|
atspeed.set("UUIDLeast", SetAttributes.nbtInt(894654));
|
||||||
atspeed.set("UUIDMost", new NBTTagInt(2872));
|
atspeed.set("UUIDMost", SetAttributes.nbtInt(2872));
|
||||||
atspeed.set("Slot", new NBTTagString("mainhand"));
|
atspeed.set("Slot", SetAttributes.nbtString("mainhand"));
|
||||||
|
|
||||||
NBTTagCompound cstag = new NBTTagCompound();
|
NBTTagCompound cstag = new NBTTagCompound();
|
||||||
|
|
||||||
|
@ -290,7 +287,7 @@ public class ClassicSword {
|
||||||
if(item.getType() != Material.SHIELD) {
|
if(item.getType() != Material.SHIELD) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
net.minecraft.server.v1_13_R2.ItemStack nms = CraftItemStack.asNMSCopy(item);
|
net.minecraft.server.v1_15_R1.ItemStack nms = CraftItemStack.asNMSCopy(item);
|
||||||
if(!nms.hasTag() || nms.getTag() == null) {
|
if(!nms.hasTag() || nms.getTag() == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -302,7 +299,7 @@ public class ClassicSword {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Boolean isCBlockShield(ItemStack item) {
|
public static Boolean isCBlockShield(ItemStack item) {
|
||||||
net.minecraft.server.v1_13_R2.ItemStack nms = CraftItemStack.asNMSCopy(item);
|
net.minecraft.server.v1_15_R1.ItemStack nms = CraftItemStack.asNMSCopy(item);
|
||||||
return nms.getTag() != null && isCShield(item) && nms.getTag().hasKey("ClassicSwords");
|
return nms.getTag() != null && isCShield(item) && nms.getTag().hasKey("ClassicSwords");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -314,7 +311,7 @@ public class ClassicSword {
|
||||||
if(!(item.getType() == Material.WOODEN_SWORD || item.getType() == Material.STONE_SWORD ||item.getType() == Material.IRON_SWORD || item.getType() == Material.GOLDEN_SWORD || item.getType() == Material.DIAMOND_SWORD)) {
|
if(!(item.getType() == Material.WOODEN_SWORD || item.getType() == Material.STONE_SWORD ||item.getType() == Material.IRON_SWORD || item.getType() == Material.GOLDEN_SWORD || item.getType() == Material.DIAMOND_SWORD)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
net.minecraft.server.v1_13_R2.ItemStack nms = CraftItemStack.asNMSCopy(item);
|
net.minecraft.server.v1_15_R1.ItemStack nms = CraftItemStack.asNMSCopy(item);
|
||||||
if(!nms.hasTag() || nms.getTag() == null) {
|
if(!nms.hasTag() || nms.getTag() == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -398,7 +395,7 @@ public class ClassicSword {
|
||||||
}
|
}
|
||||||
if(!skip) {
|
if(!skip) {
|
||||||
NBTTagCompound cstag = getCSTag(item);
|
NBTTagCompound cstag = getCSTag(item);
|
||||||
cstag.set("Durability", new NBTTagInt(dur));
|
cstag.set("Durability", SetAttributes.nbtInt(dur));
|
||||||
p.getInventory().setItemInMainHand(updateCSTag(item, cstag));
|
p.getInventory().setItemInMainHand(updateCSTag(item, cstag));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -408,7 +405,7 @@ public class ClassicSword {
|
||||||
if(!isCItem(item)) {
|
if(!isCItem(item)) {
|
||||||
return null;
|
return null;
|
||||||
}else {
|
}else {
|
||||||
net.minecraft.server.v1_13_R2.ItemStack nms = CraftItemStack.asNMSCopy(item);
|
net.minecraft.server.v1_15_R1.ItemStack nms = CraftItemStack.asNMSCopy(item);
|
||||||
NBTTagCompound cstag = (NBTTagCompound) nms.getTag().get("ClassicSwords");
|
NBTTagCompound cstag = (NBTTagCompound) nms.getTag().get("ClassicSwords");
|
||||||
return cstag;
|
return cstag;
|
||||||
}
|
}
|
||||||
|
@ -416,7 +413,7 @@ public class ClassicSword {
|
||||||
|
|
||||||
public static ItemStack updateCSTag(ItemStack item, NBTTagCompound tag) {
|
public static ItemStack updateCSTag(ItemStack item, NBTTagCompound tag) {
|
||||||
if(isCItem(item)) {
|
if(isCItem(item)) {
|
||||||
net.minecraft.server.v1_13_R2.ItemStack nms = CraftItemStack.asNMSCopy(item);
|
net.minecraft.server.v1_15_R1.ItemStack nms = CraftItemStack.asNMSCopy(item);
|
||||||
nms.getTag().set("ClassicSwords", tag);
|
nms.getTag().set("ClassicSwords", tag);
|
||||||
return CraftItemStack.asBukkitCopy(nms);
|
return CraftItemStack.asBukkitCopy(nms);
|
||||||
}else {
|
}else {
|
||||||
|
|
|
@ -2,71 +2,87 @@ package com.fpghoti.classicswords.item;
|
||||||
|
|
||||||
import com.fpghoti.classicswords.util.Storage;
|
import com.fpghoti.classicswords.util.Storage;
|
||||||
|
|
||||||
import net.minecraft.server.v1_13_R2.NBTTagCompound;
|
import net.minecraft.server.v1_15_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_13_R2.NBTTagInt;
|
import net.minecraft.server.v1_15_R1.NBTTagDouble;
|
||||||
import net.minecraft.server.v1_13_R2.NBTTagString;
|
import net.minecraft.server.v1_15_R1.NBTTagInt;
|
||||||
|
import net.minecraft.server.v1_15_R1.NBTTagString;
|
||||||
|
|
||||||
public class SetAttributes {
|
public class SetAttributes {
|
||||||
|
|
||||||
|
// For readability and future changes
|
||||||
|
public static NBTTagString nbtString(String x) {
|
||||||
|
return NBTTagString.a(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static NBTTagInt nbtInt(int x) {
|
||||||
|
return NBTTagInt.a(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static NBTTagDouble nbtDouble(double x) {
|
||||||
|
return NBTTagDouble.a(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
public static void defineSwords() {
|
public static void defineSwords() {
|
||||||
|
|
||||||
NBTTagCompound damage = new NBTTagCompound();
|
NBTTagCompound damage = new NBTTagCompound();
|
||||||
|
|
||||||
damage.set("AttributeName", new NBTTagString("generic.attackDamage"));
|
damage.set("AttributeName", nbtString("generic.attackDamage"));
|
||||||
damage.set("Name", new NBTTagString("generic.attackDamage"));
|
damage.set("Name", nbtString("generic.attackDamage"));
|
||||||
damage.set("Amount", new NBTTagInt(7));
|
damage.set("Amount", nbtInt(7));
|
||||||
damage.set("Operation", new NBTTagInt(0));
|
damage.set("Operation", nbtInt(0));
|
||||||
damage.set("UUIDLeast", new NBTTagInt(894654));
|
damage.set("UUIDLeast", nbtInt(894654));
|
||||||
damage.set("UUIDMost", new NBTTagInt(2872));
|
damage.set("UUIDMost", nbtInt(2872));
|
||||||
damage.set("Slot", new NBTTagString("mainhand"));
|
damage.set("Slot", nbtString("mainhand"));
|
||||||
|
|
||||||
Storage.damagetag.put("diamond", damage);
|
Storage.damagetag.put("diamond", damage);
|
||||||
|
|
||||||
damage = new NBTTagCompound();
|
damage = new NBTTagCompound();
|
||||||
|
|
||||||
damage.set("AttributeName", new NBTTagString("generic.attackDamage"));
|
damage.set("AttributeName", nbtString("generic.attackDamage"));
|
||||||
damage.set("Name", new NBTTagString("generic.attackDamage"));
|
damage.set("Name", nbtString("generic.attackDamage"));
|
||||||
damage.set("Amount", new NBTTagInt(4));
|
damage.set("Amount", nbtInt(4));
|
||||||
damage.set("Operation", new NBTTagInt(0));
|
damage.set("Operation", nbtInt(0));
|
||||||
damage.set("UUIDLeast", new NBTTagInt(894654));
|
damage.set("UUIDLeast", nbtInt(894654));
|
||||||
damage.set("UUIDMost", new NBTTagInt(2872));
|
damage.set("UUIDMost", nbtInt(2872));
|
||||||
damage.set("Slot", new NBTTagString("mainhand"));
|
damage.set("Slot", nbtString("mainhand"));
|
||||||
|
|
||||||
Storage.damagetag.put("wood", damage);
|
Storage.damagetag.put("wood", damage);
|
||||||
|
|
||||||
damage = new NBTTagCompound();
|
damage = new NBTTagCompound();
|
||||||
|
|
||||||
damage.set("AttributeName", new NBTTagString("generic.attackDamage"));
|
damage.set("AttributeName", nbtString("generic.attackDamage"));
|
||||||
damage.set("Name", new NBTTagString("generic.attackDamage"));
|
damage.set("Name", nbtString("generic.attackDamage"));
|
||||||
damage.set("Amount", new NBTTagInt(5));
|
damage.set("Amount", nbtInt(5));
|
||||||
damage.set("Operation", new NBTTagInt(0));
|
damage.set("Operation", nbtInt(0));
|
||||||
damage.set("UUIDLeast", new NBTTagInt(894654));
|
damage.set("UUIDLeast", nbtInt(894654));
|
||||||
damage.set("UUIDMost", new NBTTagInt(2872));
|
damage.set("UUIDMost", nbtInt(2872));
|
||||||
damage.set("Slot", new NBTTagString("mainhand"));
|
damage.set("Slot", nbtString("mainhand"));
|
||||||
|
|
||||||
Storage.damagetag.put("stone", damage);
|
Storage.damagetag.put("stone", damage);
|
||||||
|
|
||||||
damage = new NBTTagCompound();
|
damage = new NBTTagCompound();
|
||||||
|
|
||||||
damage.set("AttributeName", new NBTTagString("generic.attackDamage"));
|
damage.set("AttributeName", nbtString("generic.attackDamage"));
|
||||||
damage.set("Name", new NBTTagString("generic.attackDamage"));
|
damage.set("Name", nbtString("generic.attackDamage"));
|
||||||
damage.set("Amount", new NBTTagInt(6));
|
damage.set("Amount", nbtInt(6));
|
||||||
damage.set("Operation", new NBTTagInt(0));
|
damage.set("Operation", nbtInt(0));
|
||||||
damage.set("UUIDLeast", new NBTTagInt(894654));
|
damage.set("UUIDLeast", nbtInt(894654));
|
||||||
damage.set("UUIDMost", new NBTTagInt(2872));
|
damage.set("UUIDMost", nbtInt(2872));
|
||||||
damage.set("Slot", new NBTTagString("mainhand"));
|
damage.set("Slot", nbtString("mainhand"));
|
||||||
|
|
||||||
Storage.damagetag.put("iron", damage);
|
Storage.damagetag.put("iron", damage);
|
||||||
|
|
||||||
damage = new NBTTagCompound();
|
damage = new NBTTagCompound();
|
||||||
|
|
||||||
damage.set("AttributeName", new NBTTagString("generic.attackDamage"));
|
damage.set("AttributeName", nbtString("generic.attackDamage"));
|
||||||
damage.set("Name", new NBTTagString("generic.attackDamage"));
|
damage.set("Name", nbtString("generic.attackDamage"));
|
||||||
damage.set("Amount", new NBTTagInt(4));
|
damage.set("Amount", nbtInt(4));
|
||||||
damage.set("Operation", new NBTTagInt(0));
|
damage.set("Operation", nbtInt(0));
|
||||||
damage.set("UUIDLeast", new NBTTagInt(894654));
|
damage.set("UUIDLeast", nbtInt(894654));
|
||||||
damage.set("UUIDMost", new NBTTagInt(2872));
|
damage.set("UUIDMost", nbtInt(2872));
|
||||||
damage.set("Slot", new NBTTagString("mainhand"));
|
damage.set("Slot", nbtString("mainhand"));
|
||||||
|
|
||||||
Storage.damagetag.put("gold", damage);
|
Storage.damagetag.put("gold", damage);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import io.netty.util.internal.ConcurrentSet;
|
import io.netty.util.internal.ConcurrentSet;
|
||||||
import net.minecraft.server.v1_13_R2.NBTTagCompound;
|
import net.minecraft.server.v1_15_R1.NBTTagCompound;
|
||||||
|
|
||||||
public class Storage {
|
public class Storage {
|
||||||
public static ConcurrentHashMap<String, Boolean> bools = new ConcurrentHashMap<>();
|
public static ConcurrentHashMap<String, Boolean> bools = new ConcurrentHashMap<>();
|
||||||
|
|
Loading…
Reference in New Issue