From cae068a15196f2a0d3f442b60f60a397e5ec60aa Mon Sep 17 00:00:00 2001
From: ZeroEpoch1969 <13510767+ZeroEpoch1969@users.noreply.github.com>
Date: Sat, 21 Jul 2018 22:51:43 -0700
Subject: [PATCH] Begin the process of updating to 1.13
---
.gitignore | 1 -
TotalFreedomMod.iml | 95 +++++++++++++++++++
pom.xml | 12 +--
.../totalfreedommod/MovementValidator.java | 10 +-
.../totalfreedommod/ServerInterface.java | 10 +-
.../totalfreedommod/blocking/SignBlocker.java | 8 +-
.../command/Command_modifyitem.java | 14 +--
.../command/Command_spawnmob.java | 6 +-
.../totalfreedommod/config/ConfigEntry.java | 1 -
9 files changed, 123 insertions(+), 34 deletions(-)
create mode 100644 TotalFreedomMod.iml
diff --git a/.gitignore b/.gitignore
index 55aa6361..8e9f9af8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,7 +18,6 @@ manifest.mf
/.settings
# IntelliJ excludes
-*.iml
*.ipr
*.iws
/.idea
diff --git a/TotalFreedomMod.iml b/TotalFreedomMod.iml
new file mode 100644
index 00000000..88d7d31c
--- /dev/null
+++ b/TotalFreedomMod.iml
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index cc90811e..02e95706 100644
--- a/pom.xml
+++ b/pom.xml
@@ -86,14 +86,6 @@
provided
-
- org.spigotmc
- spigot-api
- 1.12.2
- system
- ${project.basedir}/lib/spigot-1.12.2.jar
-
-
com.github.Pravian
Aero
@@ -151,9 +143,9 @@
org.spigot
spigot
- 1.12.2
+ 1.13
system
- ${project.basedir}/lib/spigot-1.12.2.jar
+ ${project.basedir}/lib/spigot-1.13.jar
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/MovementValidator.java b/src/main/java/me/totalfreedom/totalfreedommod/MovementValidator.java
index 5b84bdca..b9697a2a 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/MovementValidator.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/MovementValidator.java
@@ -3,11 +3,11 @@ package me.totalfreedom.totalfreedommod;
import ca.momothereal.mojangson.ex.MojangsonParseException;
import ca.momothereal.mojangson.value.MojangsonCompound;
import ca.momothereal.mojangson.value.MojangsonValue;
-import net.minecraft.server.v1_12_R1.NBTTagCompound;
-import net.minecraft.server.v1_12_R1.NBTTagList;
+import net.minecraft.server.v1_13_R1.NBTTagCompound;
+import net.minecraft.server.v1_13_R1.NBTTagList;
import org.bukkit.ChatColor;
import org.bukkit.Material;
-import org.bukkit.craftbukkit.v1_12_R1.inventory.CraftItemStack;
+import org.bukkit.craftbukkit.v1_13_R1.inventory.CraftItemStack;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@@ -129,7 +129,7 @@ public class MovementValidator extends FreedomService
private Boolean exploitItem(ItemStack item)
{
- net.minecraft.server.v1_12_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(item);
+ net.minecraft.server.v1_13_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(item);
NBTTagList modifiers = getAttributeList(nmsStack);
MojangsonCompound compound = new MojangsonCompound();
boolean foundNegative = false;
@@ -166,7 +166,7 @@ public class MovementValidator extends FreedomService
}
- private NBTTagList getAttributeList(net.minecraft.server.v1_12_R1.ItemStack stack)
+ private NBTTagList getAttributeList(net.minecraft.server.v1_13_R1.ItemStack stack)
{
if (stack.getTag() == null)
{
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/ServerInterface.java b/src/main/java/me/totalfreedom/totalfreedommod/ServerInterface.java
index 58090cf0..5e85c016 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/ServerInterface.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/ServerInterface.java
@@ -4,16 +4,16 @@ import java.util.Arrays;
import java.util.List;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
-import net.minecraft.server.v1_12_R1.EntityPlayer;
-import net.minecraft.server.v1_12_R1.MinecraftServer;
-import net.minecraft.server.v1_12_R1.PropertyManager;
+import net.minecraft.server.v1_13_R1.EntityPlayer;
+import net.minecraft.server.v1_13_R1.MinecraftServer;
+import net.minecraft.server.v1_13_R1.PropertyManager;
import org.bukkit.Bukkit;
-import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
+import org.bukkit.craftbukkit.v1_13_R1.CraftServer;
public class ServerInterface extends FreedomService
{
- public static final String COMPILE_NMS_VERSION = "v1_12_R1";
+ public static final String COMPILE_NMS_VERSION = "v1_13_R1";
public ServerInterface(TotalFreedomMod plugin)
{
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/blocking/SignBlocker.java b/src/main/java/me/totalfreedom/totalfreedommod/blocking/SignBlocker.java
index 1dfd6ade..d0e84da4 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/blocking/SignBlocker.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/blocking/SignBlocker.java
@@ -2,11 +2,11 @@ package me.totalfreedom.totalfreedommod.blocking;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
-import net.minecraft.server.v1_12_R1.NBTTagCompound;
+import net.minecraft.server.v1_13_R1.NBTTagCompound;
import org.bukkit.ChatColor;
import org.bukkit.Material;
-import org.bukkit.craftbukkit.v1_12_R1.block.CraftBlock;
-import org.bukkit.craftbukkit.v1_12_R1.inventory.CraftItemStack;
+import org.bukkit.craftbukkit.v1_13_R1.block.CraftBlock;
+import org.bukkit.craftbukkit.v1_13_R1.inventory.CraftItemStack;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@@ -42,7 +42,7 @@ public class SignBlocker extends FreedomService
{
ItemStack sign = event.getItemInHand();
- net.minecraft.server.v1_12_R1.ItemStack nmsSign = CraftItemStack.asNMSCopy(sign);
+ net.minecraft.server.v1_13_R1.ItemStack nmsSign = CraftItemStack.asNMSCopy(sign);
NBTTagCompound compound = (nmsSign.hasTag()) ? nmsSign.getTag() : new NBTTagCompound();
NBTTagCompound bet = compound.getCompound("BlockEntityTag");
String line1 = bet.getString("Text1");
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_modifyitem.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_modifyitem.java
index a41756b7..39ad9557 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_modifyitem.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_modifyitem.java
@@ -2,15 +2,15 @@ package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
-import net.minecraft.server.v1_12_R1.NBTTagCompound;
-import net.minecraft.server.v1_12_R1.NBTTagInt;
-import net.minecraft.server.v1_12_R1.NBTTagList;
-import net.minecraft.server.v1_12_R1.NBTTagString;
+import net.minecraft.server.v1_13_R1.NBTTagCompound;
+import net.minecraft.server.v1_13_R1.NBTTagInt;
+import net.minecraft.server.v1_13_R1.NBTTagList;
+import net.minecraft.server.v1_13_R1.NBTTagString;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
-import org.bukkit.craftbukkit.v1_12_R1.inventory.CraftItemStack;
+import org.bukkit.craftbukkit.v1_13_R1.inventory.CraftItemStack;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
@@ -149,7 +149,7 @@ public class Command_modifyitem extends FreedomCommand
{
return false;
}
- net.minecraft.server.v1_12_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(item);
+ net.minecraft.server.v1_13_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(item);
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
NBTTagList modifiers = getAttributeList(nmsStack);
NBTTagCompound cmpnd = new NBTTagCompound();
@@ -188,7 +188,7 @@ public class Command_modifyitem extends FreedomCommand
return true;
}
- private NBTTagList getAttributeList(net.minecraft.server.v1_12_R1.ItemStack stack)
+ private NBTTagList getAttributeList(net.minecraft.server.v1_13_R1.ItemStack stack)
{
if (stack.getTag() == null)
{
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_spawnmob.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_spawnmob.java
index 16ee3169..a1accf00 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_spawnmob.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_spawnmob.java
@@ -4,13 +4,17 @@ import me.totalfreedom.totalfreedommod.rank.Rank;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.ChatColor;
import org.bukkit.Location;
+import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.apache.commons.lang3.EnumUtils;
+
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Spawn an entity.", usage = "/ [amount]", aliases="spawnentity")
@@ -75,7 +79,7 @@ public class Command_spawnmob extends FreedomCommand
return true;
}
- Location l = playerSender.getTargetBlock(null, 30).getLocation().add(0, 1, 0);
+ Location l = playerSender.getTargetBlock((Set) null, 30).getLocation().add(0, 1, 0);
World w = playerSender.getWorld();
msg("Spawning " + amount + " " + type.name().toLowerCase() + (amount > 1 ? "s." : "."));
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java b/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java
index b7a1b0c7..87306a2c 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java
@@ -65,7 +65,6 @@ public enum ConfigEntry
TOSSMOB_ENABLED(Boolean.class, "tossmob_enabled"),
AUTOKICK_ENABLED(Boolean.class, "autokick.enabled"),
MP44_ENABLED(Boolean.class, "mp44_enabled"),
- MAKE_ARROW_EXPLOSIVE(Boolean.class, "explosive_arrow.enabled"),
//
PROTECTAREA_ENABLED(Boolean.class, "protectarea.enabled"),
PROTECTAREA_SPAWNPOINTS(Boolean.class, "protectarea.auto_protect_spawnpoints"),