diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index f48e1940..805a64ee 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -8,10 +8,12 @@
+
+
-
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 1c166418..9c7ca68c 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -3,6 +3,7 @@
+
-
+
\ No newline at end of file
diff --git a/TotalFreedomMod.iml b/TotalFreedomMod.iml
index 94a3e6af..8668eadf 100644
--- a/TotalFreedomMod.iml
+++ b/TotalFreedomMod.iml
@@ -1,5 +1,5 @@
-
+
@@ -14,7 +14,8 @@
-
+
+
diff --git a/pom.xml b/pom.xml
index 977b2e59..435d5e73 100644
--- a/pom.xml
+++ b/pom.xml
@@ -99,10 +99,17 @@
provided
+
+ commons-io
+ commons-io
+ 2.6
+ compile
+
+
org.spigotmc
spigot
- 1.13.2-R0.1-SNAPSHOT
+ 1.14-R0.1-SNAPSHOT
provided
@@ -127,6 +134,13 @@
provided
+
+ com.github.TFPatches
+ TotalFreedomMod
+ 4a91c81
+ provided
+
+
com.github.TFPatches
TF-WorldEdit
@@ -263,7 +277,6 @@
-
org.codehaus.mojo
@@ -329,6 +342,29 @@
+
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+ 2.4.3
+
+
+ package
+
+ shade
+
+
+ true
+
+
+ commons-io:commons-io
+
+
+
+
+
+
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/FrontDoor.java b/src/main/java/me/totalfreedom/totalfreedommod/FrontDoor.java
index 50b516ac..c9b61b5b 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/FrontDoor.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/FrontDoor.java
@@ -464,7 +464,7 @@ public class FrontDoor extends FreedomService
continue;
}
- block.setType(Material.SIGN);
+ block.setType(Material.OAK_SIGN);
org.bukkit.block.Sign sign = (org.bukkit.block.Sign)block.getState();
org.bukkit.material.Sign signData = (org.bukkit.material.Sign)sign.getData();
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/MovementValidator.java b/src/main/java/me/totalfreedom/totalfreedommod/MovementValidator.java
index a3f926c0..60ed6335 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/MovementValidator.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/MovementValidator.java
@@ -5,11 +5,11 @@ import ca.momothereal.mojangson.value.MojangsonCompound;
import ca.momothereal.mojangson.value.MojangsonValue;
import java.util.List;
import java.util.Objects;
-import net.minecraft.server.v1_13_R2.NBTTagCompound;
-import net.minecraft.server.v1_13_R2.NBTTagList;
+import net.minecraft.server.v1_14_R1.NBTTagCompound;
+import net.minecraft.server.v1_14_R1.NBTTagList;
import org.bukkit.ChatColor;
import org.bukkit.Material;
-import org.bukkit.craftbukkit.v1_13_R2.inventory.CraftItemStack;
+import org.bukkit.craftbukkit.v1_14_R1.inventory.CraftItemStack;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@@ -128,7 +128,7 @@ public class MovementValidator extends FreedomService
private Boolean exploitItem(ItemStack item)
{
- net.minecraft.server.v1_13_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(item);
+ net.minecraft.server.v1_14_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(item);
NBTTagList modifiers = getAttributeList(nmsStack);
MojangsonCompound compound = new MojangsonCompound();
boolean foundNegative = false;
@@ -165,7 +165,7 @@ public class MovementValidator extends FreedomService
}
- private NBTTagList getAttributeList(net.minecraft.server.v1_13_R2.ItemStack stack)
+ private NBTTagList getAttributeList(net.minecraft.server.v1_14_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 32e362a4..457b91f7 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/ServerInterface.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/ServerInterface.java
@@ -4,16 +4,15 @@ 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_13_R2.EntityPlayer;
-import net.minecraft.server.v1_13_R2.MinecraftServer;
-import net.minecraft.server.v1_13_R2.PropertyManager;
+import net.minecraft.server.v1_14_R1.EntityPlayer;
+import net.minecraft.server.v1_14_R1.MinecraftServer;
import org.bukkit.Bukkit;
-import org.bukkit.craftbukkit.v1_13_R2.CraftServer;
+import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
public class ServerInterface extends FreedomService
{
- public static final String COMPILE_NMS_VERSION = "v1_13_R2";
+ public static final String COMPILE_NMS_VERSION = "v1_14_R1";
public ServerInterface(TotalFreedomMod plugin)
{
@@ -43,9 +42,7 @@ public class ServerInterface extends FreedomService
public void setOnlineMode(boolean mode)
{
- final PropertyManager manager = getServer().getPropertyManager();
- manager.setProperty("online-mode", mode);
- manager.savePropertiesFile();
+ getServer().setOnlineMode(mode);
}
public int purgeWhitelist()
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/blocking/BlockBlocker.java b/src/main/java/me/totalfreedom/totalfreedommod/blocking/BlockBlocker.java
index 39576af8..ac8e0d56 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/blocking/BlockBlocker.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/blocking/BlockBlocker.java
@@ -5,7 +5,6 @@ import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
-import me.totalfreedom.totalfreedommod.util.Groups;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
@@ -97,6 +96,13 @@ public class BlockBlocker extends FreedomService
event.setCancelled(true);
break;
}
+ case JIGSAW:
+ {
+ player.sendMessage(ChatColor.GRAY + "Jigsaws are disabled.");
+ player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
+ event.setCancelled(true);
+ break;
+ }
}
}
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/blocking/InteractBlocker.java b/src/main/java/me/totalfreedom/totalfreedommod/blocking/InteractBlocker.java
index 2adf299e..48bace35 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/blocking/InteractBlocker.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/blocking/InteractBlocker.java
@@ -55,10 +55,13 @@ public class InteractBlocker extends FreedomService
{
final Player player = event.getPlayer();
- if (event.getClickedBlock() != null && event.getClickedBlock().getType().equals(Material.STRUCTURE_BLOCK))
+ if (event.getClickedBlock() != null)
{
- event.setCancelled(true);
- event.getPlayer().closeInventory();
+ if (event.getClickedBlock().getType().equals(Material.STRUCTURE_BLOCK) || event.getClickedBlock().getType().equals(Material.JIGSAW))
+ {
+ event.setCancelled(true);
+ event.getPlayer().closeInventory();
+ }
}
switch (event.getMaterial())
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/blocking/PotionBlocker.java b/src/main/java/me/totalfreedom/totalfreedommod/blocking/PotionBlocker.java
index f7a97d2e..292bac17 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/blocking/PotionBlocker.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/blocking/PotionBlocker.java
@@ -59,7 +59,7 @@ public class PotionBlocker extends FreedomService
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onThrowLingeringPotion(LingeringPotionSplashEvent event)
{
- LingeringPotion potion = event.getEntity();
+ ThrownPotion potion = event.getEntity();
ProjectileSource projectileSource = potion.getShooter();
Player player = null;
if (projectileSource instanceof Player)
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/blocking/SignBlocker.java b/src/main/java/me/totalfreedom/totalfreedommod/blocking/SignBlocker.java
index 0d939b8a..f6de9c20 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/blocking/SignBlocker.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/blocking/SignBlocker.java
@@ -2,10 +2,11 @@ package me.totalfreedom.totalfreedommod.blocking;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
-import net.minecraft.server.v1_13_R2.NBTTagCompound;
+import net.minecraft.server.v1_14_R1.NBTTagCompound;
import org.bukkit.ChatColor;
import org.bukkit.Material;
-import org.bukkit.craftbukkit.v1_13_R2.inventory.CraftItemStack;
+import org.bukkit.Tag;
+import org.bukkit.craftbukkit.v1_14_R1.inventory.CraftItemStack;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@@ -37,11 +38,11 @@ public class SignBlocker extends FreedomService
{
final Player player = event.getPlayer();
- if (event.getBlock().getType().equals(Material.SIGN) || event.getBlock().getType().equals(Material.WALL_SIGN))
+ if (event.getBlock().getType().equals(Tag.SIGNS.getValues()))
{
ItemStack sign = event.getItemInHand();
- net.minecraft.server.v1_13_R2.ItemStack nmsSign = CraftItemStack.asNMSCopy(sign);
+ net.minecraft.server.v1_14_R1.ItemStack nmsSign = CraftItemStack.asNMSCopy(sign);
NBTTagCompound compound = (nmsSign.hasTag()) ? nmsSign.getTag() : new NBTTagCompound();
NBTTagCompound bet = compound.getCompound("BlockEntityTag");
String line1 = bet.getString("Text1");
@@ -64,7 +65,7 @@ public class SignBlocker extends FreedomService
return;
}
- if (event.getClickedBlock() != null && event.getClickedBlock().getType().equals(Material.SIGN) || event.getClickedBlock().getType().equals(Material.WALL_SIGN))
+ if (event.getClickedBlock() != null && Tag.SIGNS.getValues().contains(event.getClickedBlock().getType()))
{
event.setCancelled(true);
}
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 e644602f..27e25456 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_modifyitem.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_modifyitem.java
@@ -4,15 +4,15 @@ import java.util.ArrayList;
import java.util.List;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
-import net.minecraft.server.v1_13_R2.NBTTagCompound;
-import net.minecraft.server.v1_13_R2.NBTTagInt;
-import net.minecraft.server.v1_13_R2.NBTTagList;
-import net.minecraft.server.v1_13_R2.NBTTagString;
+import net.minecraft.server.v1_14_R1.NBTTagCompound;
+import net.minecraft.server.v1_14_R1.NBTTagInt;
+import net.minecraft.server.v1_14_R1.NBTTagList;
+import net.minecraft.server.v1_14_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_13_R2.inventory.CraftItemStack;
+import org.bukkit.craftbukkit.v1_14_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_13_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(item);
+ net.minecraft.server.v1_14_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_13_R2.ItemStack stack)
+ private NBTTagList getAttributeList(net.minecraft.server.v1_14_R1.ItemStack stack)
{
if (stack.getTag() == null)
{
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/httpd/module/Module_schematic.java b/src/main/java/me/totalfreedom/totalfreedommod/httpd/module/Module_schematic.java
index cef348c8..f83e8677 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/httpd/module/Module_schematic.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/httpd/module/Module_schematic.java
@@ -190,9 +190,9 @@ public class Module_schematic extends HTTPDModule
throw new SchematicTransferException("Can't resolve original file name.");
}
- if (tempFile.length() > FileUtils.ONE_KB * 64L)
+ if (tempFile.length() > FileUtils.ONE_MB )
{
- throw new SchematicTransferException("Schematic is too big (64kb max).");
+ throw new SchematicTransferException("Schematic is too big (1mb max).");
}
if (!SCHEMATIC_FILENAME_LC.matcher(origFileName.toLowerCase()).find())
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/util/Groups.java b/src/main/java/me/totalfreedom/totalfreedommod/util/Groups.java
index 4b44bfa0..4cbc8ec0 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/util/Groups.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/util/Groups.java
@@ -48,6 +48,7 @@ public class Groups
EntityType.BLAZE,
EntityType.CAVE_SPIDER,
EntityType.CHICKEN,
+ EntityType.CAT,
EntityType.COD,
EntityType.COW,
EntityType.CREEPER,
@@ -56,6 +57,7 @@ public class Groups
EntityType.ENDER_DRAGON,
EntityType.ENDERMAN,
EntityType.EVOKER,
+ EntityType.FOX,
EntityType.GHAST,
EntityType.GIANT,
EntityType.HUSK,
@@ -66,12 +68,15 @@ public class Groups
EntityType.MAGMA_CUBE,
EntityType.MUSHROOM_COW,
EntityType.OCELOT,
+ EntityType.PANDA,
EntityType.PARROT,
+ EntityType.PILLAGER,
EntityType.PHANTOM,
EntityType.PIG,
EntityType.PIG_ZOMBIE,
EntityType.POLAR_BEAR,
EntityType.PUFFERFISH,
+ EntityType.RAVAGER,
EntityType.SHEEP,
EntityType.SHULKER,
EntityType.SILVERFISH,
@@ -82,6 +87,7 @@ public class Groups
EntityType.SQUID,
EntityType.STRAY,
EntityType.TROPICAL_FISH,
+ EntityType.TRADER_LLAMA,
EntityType.TURTLE,
EntityType.VEX,
EntityType.VILLAGER,
@@ -89,6 +95,7 @@ public class Groups
EntityType.WITHER,
EntityType.WITHER_SKELETON,
EntityType.VINDICATOR,
+ EntityType.WANDERING_TRADER,
EntityType.WOLF,
EntityType.ZOMBIE);
}
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/world/AdminWorld.java b/src/main/java/me/totalfreedom/totalfreedommod/world/AdminWorld.java
index 2d478563..97a5ae48 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/world/AdminWorld.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/world/AdminWorld.java
@@ -67,7 +67,7 @@ public final class AdminWorld extends CustomWorld
world.setSpawnLocation(0, 50, 0);
final Block welcomeSignBlock = world.getBlockAt(0, 50, 0);
- welcomeSignBlock.setType(Material.SIGN);
+ welcomeSignBlock.setType(Material.OAK_SIGN);
org.bukkit.block.Sign welcomeSign = (org.bukkit.block.Sign)welcomeSignBlock.getState();
org.bukkit.material.Sign signData = (org.bukkit.material.Sign)welcomeSign.getData();
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/world/Flatlands.java b/src/main/java/me/totalfreedom/totalfreedommod/world/Flatlands.java
index 648cc689..937f54d1 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/world/Flatlands.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/world/Flatlands.java
@@ -45,7 +45,7 @@ public class Flatlands extends CustomWorld
world.setSpawnLocation(0, 50, 0);
final Block welcomeSignBlock = world.getBlockAt(0, 50, 0);
- welcomeSignBlock.setType(Material.SIGN);
+ welcomeSignBlock.setType(Material.OAK_SIGN);
org.bukkit.block.Sign welcomeSign = (org.bukkit.block.Sign)welcomeSignBlock.getState();
org.bukkit.material.Sign signData = (org.bukkit.material.Sign)welcomeSign.getData();
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/world/MasterBuilderWorld.java b/src/main/java/me/totalfreedom/totalfreedommod/world/MasterBuilderWorld.java
index 60b4abe9..65e34cc6 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/world/MasterBuilderWorld.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/world/MasterBuilderWorld.java
@@ -44,7 +44,7 @@ public final class MasterBuilderWorld extends CustomWorld
world.setSpawnLocation(0, 50, 0);
final Block welcomeSignBlock = world.getBlockAt(0, 50, 0);
- welcomeSignBlock.setType(Material.SIGN);
+ welcomeSignBlock.setType(Material.OAK_SIGN);
org.bukkit.block.Sign welcomeSign = (org.bukkit.block.Sign)welcomeSignBlock.getState();
org.bukkit.material.Sign signData = (org.bukkit.material.Sign)welcomeSign.getData();
diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml
index 4762c712..d332c2f9 100644
--- a/src/main/resources/config.yml
+++ b/src/main/resources/config.yml
@@ -208,6 +208,8 @@ blocked_commands:
- 's:b:/fill:_'
- 's:b:/flood:_'
- 's:b:/team:_'
+ - 's:b:/loot:_'
+ - 's:b:/schedule:_'
# Automatically wipe dropped objects
auto_wipe: true