From e3cb78c63dd0e2a2b60662fb4674e26be2074a54 Mon Sep 17 00:00:00 2001 From: Brianna Date: Wed, 22 Apr 2020 13:00:26 -0400 Subject: [PATCH] Doubles for NBT --- .idea/jarRepositories.xml | 40 +++++++++++++++++++ .../songoda/core/commands/CommandManager.java | 2 +- .../com/songoda/core/nms/nbt/NBTCompound.java | 4 +- .../nms/v1_10_R1/nbt/NBTCompoundImpl.java | 6 +++ .../nms/v1_11_R1/nbt/NBTCompoundImpl.java | 6 +++ .../nms/v1_12_R1/nbt/NBTCompoundImpl.java | 6 +++ .../nms/v1_13_R1/nbt/NBTCompoundImpl.java | 8 +++- .../nms/v1_13_R2/nbt/NBTCompoundImpl.java | 6 +++ .../nms/v1_14_R1/nbt/NBTCompoundImpl.java | 6 +++ .../nms/v1_15_R1/nbt/NBTCompoundImpl.java | 6 +++ .../core/nms/v1_8_R1/nbt/NBTCompoundImpl.java | 6 +++ .../core/nms/v1_8_R2/nbt/NBTCompoundImpl.java | 6 +++ .../core/nms/v1_8_R3/nbt/NBTCompoundImpl.java | 6 +++ .../core/nms/v1_9_R1/nbt/NBTCompoundImpl.java | 6 +++ .../core/nms/v1_9_R2/nbt/NBTCompoundImpl.java | 6 +++ 15 files changed, 116 insertions(+), 4 deletions(-) create mode 100644 .idea/jarRepositories.xml diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 00000000..51569f58 --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Core/src/main/java/com/songoda/core/commands/CommandManager.java b/Core/src/main/java/com/songoda/core/commands/CommandManager.java index ef8e1626..295d7773 100644 --- a/Core/src/main/java/com/songoda/core/commands/CommandManager.java +++ b/Core/src/main/java/com/songoda/core/commands/CommandManager.java @@ -315,7 +315,7 @@ public class CommandManager implements CommandExecutor, TabCompleter { // If we're on Paper 1.8, we need to register timings (spigot creates timings on init, paper creates it on register) // later versions of paper create timings if needed when the command is executed if (ServerProject.isServer(ServerProject.PAPER, ServerProject.TACO) && ServerVersion.isServerVersionBelow(ServerVersion.V1_9)) { - // commandObject.timings = co.aikar.timings.TimingsManager.getCommandTiming(plugin.getName().toLowerCase(), commandObject); + //commandObject.timings = co.aikar.timings.TimingsManager.getCommandTiming(plugin.getName().toLowerCase(), commandObject); } // Set command action diff --git a/NMS/NMS-API/src/com/songoda/core/nms/nbt/NBTCompound.java b/NMS/NMS-API/src/com/songoda/core/nms/nbt/NBTCompound.java index 492740d4..b2db6705 100644 --- a/NMS/NMS-API/src/com/songoda/core/nms/nbt/NBTCompound.java +++ b/NMS/NMS-API/src/com/songoda/core/nms/nbt/NBTCompound.java @@ -1,7 +1,5 @@ package com.songoda.core.nms.nbt; -import java.util.List; - public interface NBTCompound { NBTCompound set(String tag, String s); @@ -10,6 +8,8 @@ public interface NBTCompound { NBTCompound set(String tag, int i); + NBTCompound set(String tag, double i); + NBTCompound set(String tag, long l); NBTCompound set(String tag, short s); diff --git a/NMS/NMS-v1_10_R1/src/com/songoda/core/nms/v1_10_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_10_R1/src/com/songoda/core/nms/v1_10_R1/nbt/NBTCompoundImpl.java index 898ef63b..e44ae8ea 100644 --- a/NMS/NMS-v1_10_R1/src/com/songoda/core/nms/v1_10_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_10_R1/src/com/songoda/core/nms/v1_10_R1/nbt/NBTCompoundImpl.java @@ -34,6 +34,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, double i) { + compound.setDouble(tag, i); + return this; + } + @Override public NBTCompound set(String tag, long l) { compound.setLong(tag, l); diff --git a/NMS/NMS-v1_11_R1/src/com/songoda/core/nms/v1_11_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_11_R1/src/com/songoda/core/nms/v1_11_R1/nbt/NBTCompoundImpl.java index fd9e860c..cfd2b29d 100644 --- a/NMS/NMS-v1_11_R1/src/com/songoda/core/nms/v1_11_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_11_R1/src/com/songoda/core/nms/v1_11_R1/nbt/NBTCompoundImpl.java @@ -34,6 +34,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, double i) { + compound.setDouble(tag, i); + return this; + } + @Override public NBTCompound set(String tag, long l) { compound.setLong(tag, l); diff --git a/NMS/NMS-v1_12_R1/src/com/songoda/core/nms/v1_12_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_12_R1/src/com/songoda/core/nms/v1_12_R1/nbt/NBTCompoundImpl.java index 7664021d..c68e471f 100644 --- a/NMS/NMS-v1_12_R1/src/com/songoda/core/nms/v1_12_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_12_R1/src/com/songoda/core/nms/v1_12_R1/nbt/NBTCompoundImpl.java @@ -34,6 +34,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, double i) { + compound.setDouble(tag, i); + return this; + } + @Override public NBTCompound set(String tag, long l) { compound.setLong(tag, l); diff --git a/NMS/NMS-v1_13_R1/src/com/songoda/core/nms/v1_13_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_13_R1/src/com/songoda/core/nms/v1_13_R1/nbt/NBTCompoundImpl.java index 1d8b3062..d7a127a2 100644 --- a/NMS/NMS-v1_13_R1/src/com/songoda/core/nms/v1_13_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_13_R1/src/com/songoda/core/nms/v1_13_R1/nbt/NBTCompoundImpl.java @@ -4,7 +4,7 @@ import com.songoda.core.nms.nbt.NBTCompound; import com.songoda.core.nms.nbt.NBTObject; import net.minecraft.server.v1_13_R1.NBTTagCompound; -public class NBTCompoundImpl implements NBTCompound { +public class NBTCompoundImpl implements NBTCompound { protected NBTTagCompound compound; @@ -34,6 +34,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, double i) { + compound.setDouble(tag, i); + return this; + } + @Override public NBTCompound set(String tag, long l) { compound.setLong(tag, l); diff --git a/NMS/NMS-v1_13_R2/src/com/songoda/core/nms/v1_13_R2/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_13_R2/src/com/songoda/core/nms/v1_13_R2/nbt/NBTCompoundImpl.java index 6805bc1a..6fdc5fe2 100644 --- a/NMS/NMS-v1_13_R2/src/com/songoda/core/nms/v1_13_R2/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_13_R2/src/com/songoda/core/nms/v1_13_R2/nbt/NBTCompoundImpl.java @@ -34,6 +34,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, double i) { + compound.setDouble(tag, i); + return this; + } + @Override public NBTCompound set(String tag, long l) { compound.setLong(tag, l); diff --git a/NMS/NMS-v1_14_R1/src/com/songoda/core/nms/v1_14_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_14_R1/src/com/songoda/core/nms/v1_14_R1/nbt/NBTCompoundImpl.java index f1b2b0b6..223d98e3 100644 --- a/NMS/NMS-v1_14_R1/src/com/songoda/core/nms/v1_14_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_14_R1/src/com/songoda/core/nms/v1_14_R1/nbt/NBTCompoundImpl.java @@ -34,6 +34,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, double i) { + compound.setDouble(tag, i); + return this; + } + @Override public NBTCompound set(String tag, long l) { compound.setLong(tag, l); diff --git a/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTCompoundImpl.java index ddbfc3f9..a424d5d7 100644 --- a/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_15_R1/src/com/songoda/core/nms/v1_15_R1/nbt/NBTCompoundImpl.java @@ -37,6 +37,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, double i) { + compound.setDouble(tag, i); + return this; + } + @Override public NBTCompound set(String tag, long l) { compound.setLong(tag, l); diff --git a/NMS/NMS-v1_8_R1/src/com/songoda/core/nms/v1_8_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_8_R1/src/com/songoda/core/nms/v1_8_R1/nbt/NBTCompoundImpl.java index ae86fcaf..17201501 100644 --- a/NMS/NMS-v1_8_R1/src/com/songoda/core/nms/v1_8_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_8_R1/src/com/songoda/core/nms/v1_8_R1/nbt/NBTCompoundImpl.java @@ -34,6 +34,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, double i) { + compound.setDouble(tag, i); + return this; + } + @Override public NBTCompound set(String tag, long l) { compound.setLong(tag, l); diff --git a/NMS/NMS-v1_8_R2/src/com/songoda/core/nms/v1_8_R2/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_8_R2/src/com/songoda/core/nms/v1_8_R2/nbt/NBTCompoundImpl.java index 3b34335e..ecbb613f 100644 --- a/NMS/NMS-v1_8_R2/src/com/songoda/core/nms/v1_8_R2/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_8_R2/src/com/songoda/core/nms/v1_8_R2/nbt/NBTCompoundImpl.java @@ -34,6 +34,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, double i) { + compound.setDouble(tag, i); + return this; + } + @Override public NBTCompound set(String tag, long l) { compound.setLong(tag, l); diff --git a/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTCompoundImpl.java index 828245de..5301191c 100644 --- a/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_8_R3/src/com/songoda/core/nms/v1_8_R3/nbt/NBTCompoundImpl.java @@ -34,6 +34,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, double i) { + compound.setDouble(tag, i); + return this; + } + @Override public NBTCompound set(String tag, long l) { compound.setLong(tag, l); diff --git a/NMS/NMS-v1_9_R1/src/com/songoda/core/nms/v1_9_R1/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_9_R1/src/com/songoda/core/nms/v1_9_R1/nbt/NBTCompoundImpl.java index 55556cc1..f6496680 100644 --- a/NMS/NMS-v1_9_R1/src/com/songoda/core/nms/v1_9_R1/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_9_R1/src/com/songoda/core/nms/v1_9_R1/nbt/NBTCompoundImpl.java @@ -34,6 +34,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, double i) { + compound.setDouble(tag, i); + return this; + } + @Override public NBTCompound set(String tag, long l) { compound.setLong(tag, l); diff --git a/NMS/NMS-v1_9_R2/src/com/songoda/core/nms/v1_9_R2/nbt/NBTCompoundImpl.java b/NMS/NMS-v1_9_R2/src/com/songoda/core/nms/v1_9_R2/nbt/NBTCompoundImpl.java index 7c9a5bf6..09d89289 100644 --- a/NMS/NMS-v1_9_R2/src/com/songoda/core/nms/v1_9_R2/nbt/NBTCompoundImpl.java +++ b/NMS/NMS-v1_9_R2/src/com/songoda/core/nms/v1_9_R2/nbt/NBTCompoundImpl.java @@ -34,6 +34,12 @@ public class NBTCompoundImpl implements NBTCompound { return this; } + @Override + public NBTCompound set(String tag, double i) { + compound.setDouble(tag, i); + return this; + } + @Override public NBTCompound set(String tag, long l) { compound.setLong(tag, l);