Begin the process of updating to 1.13

This commit is contained in:
ZeroEpoch1969 2018-07-21 22:51:43 -07:00
parent e8eda42295
commit cae068a151
No known key found for this signature in database
GPG Key ID: E0AAB104FB9F8FDF
9 changed files with 123 additions and 34 deletions

1
.gitignore vendored
View File

@ -18,7 +18,6 @@ manifest.mf
/.settings
# IntelliJ excludes
*.iml
*.ipr
*.iws
/.idea

95
TotalFreedomMod.iml Normal file
View File

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="aero-2.1-SNAPSHOT" level="project" />
<orderEntry type="library" name="JDA-3.6.0_354-withDependencies" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.commons:commons-lang3:3.6" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-io:commons-io:2.5" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.16.20" level="project" />
<orderEntry type="module-library">
<library name="Maven: com.github.Pravian:Aero:2.1-SNAPSHOT">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/aero-2.1-SNAPSHOT.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TotalFreedom:BukkitTelnet:4.5-pre1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.12-pre5-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-lang:commons-lang:2.6" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.googlecode.json-simple:json-simple:1.1.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: junit:junit:4.10" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.guava:guava:21.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.18" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.10-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.logging.log4j:log4j-core:2.5" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.logging.log4j:log4j-api:2.5" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.ess3:Essentials:2.13.1" level="project" />
<orderEntry type="module-library">
<library name="Maven: com.sk89q:worldguard:6.2">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/worldguard-6.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Maven: com.github.TotalFreedom.TF-WorldEdit:worldedit-bukkit:6.1.0-TF">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/TF-WorldEdit.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Maven: net.coreprotect:CoreProtect:2.14.2">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/CoreProtect_2.14.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Maven: me.libraryaddict:LibsDisguises:9.4.0-SNAPSHOT">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/LibsDisguises.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Maven: org.spigot:spigot:1.13">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/spigot-1.13.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Maven: net.dv8tion:JDA:JDA-3.6.0_354-withDependencies">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/JDA-3.6.0_354-withDependencies.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>

12
pom.xml
View File

@ -86,14 +86,6 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.12.2</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/spigot-1.12.2.jar</systemPath>
</dependency>
<dependency>
<groupId>com.github.Pravian</groupId>
<artifactId>Aero</artifactId>
@ -151,9 +143,9 @@
<dependency>
<groupId>org.spigot</groupId>
<artifactId>spigot</artifactId>
<version>1.12.2</version>
<version>1.13</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/spigot-1.12.2.jar</systemPath>
<systemPath>${project.basedir}/lib/spigot-1.13.jar</systemPath>
</dependency>
<dependency>

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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");

View File

@ -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)
{

View File

@ -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 = "/<command> <entitytype> [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<Material>) null, 30).getLocation().add(0, 1, 0);
World w = playerSender.getWorld();
msg("Spawning " + amount + " " + type.name().toLowerCase() + (amount > 1 ? "s." : "."));

View File

@ -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"),