diff --git a/pom.xml b/pom.xml index af3de63..b45a05b 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.pretzel.dev VillagerTradeLimiter - 1.2.0 + 1.2.1 1.8 diff --git a/src/com/pretzel/dev/villagertradelimiter/VillagerTradeLimiter.java b/src/com/pretzel/dev/villagertradelimiter/VillagerTradeLimiter.java index d837305..f433fa0 100644 --- a/src/com/pretzel/dev/villagertradelimiter/VillagerTradeLimiter.java +++ b/src/com/pretzel/dev/villagertradelimiter/VillagerTradeLimiter.java @@ -57,7 +57,7 @@ public class VillagerTradeLimiter extends JavaPlugin { final CommandBase vtl = new CommandBase("villagertradelimiter", "villagertradelimiter.use", p -> this.help(p)); vtl.addSub(new CommandBase("reload", "villagertradelimiter.reload", p -> { loadSettings(); - p.sendMessage(reloaded); + if(p != null) p.sendMessage(reloaded); })); this.getCommand("villagertradelimiter").setExecutor(vtl); this.getCommand("villagertradelimiter").setTabCompleter(vtl); diff --git a/src/com/pretzel/dev/villagertradelimiter/listeners/PlayerListener.java b/src/com/pretzel/dev/villagertradelimiter/listeners/PlayerListener.java index 1813287..0b9a748 100644 --- a/src/com/pretzel/dev/villagertradelimiter/listeners/PlayerListener.java +++ b/src/com/pretzel/dev/villagertradelimiter/listeners/PlayerListener.java @@ -24,8 +24,8 @@ import java.util.List; public class PlayerListener implements Listener { private static final Material[] MATERIALS = new Material[] { Material.IRON_HELMET, Material.IRON_CHESTPLATE, Material.IRON_LEGGINGS, Material.IRON_BOOTS, Material.BELL, Material.CHAINMAIL_HELMET, Material.CHAINMAIL_CHESTPLATE, Material.CHAINMAIL_LEGGINGS, Material.CHAINMAIL_BOOTS, Material.SHIELD, Material.DIAMOND_HELMET, Material.DIAMOND_CHESTPLATE, Material.DIAMOND_LEGGINGS, Material.DIAMOND_BOOTS, Material.FILLED_MAP, Material.FISHING_ROD, Material.LEATHER_HELMET, Material.LEATHER_CHESTPLATE, Material.LEATHER_LEGGINGS, Material.LEATHER_BOOTS, Material.LEATHER_HORSE_ARMOR, Material.SADDLE, Material.ENCHANTED_BOOK, Material.STONE_AXE, Material.STONE_SHOVEL, Material.STONE_PICKAXE, Material.STONE_HOE, Material.IRON_AXE, Material.IRON_SHOVEL, Material.IRON_PICKAXE, Material.DIAMOND_AXE, Material.DIAMOND_SHOVEL, Material.DIAMOND_PICKAXE, Material.DIAMOND_HOE, Material.IRON_SWORD, Material.DIAMOND_SWORD }; - private VillagerTradeLimiter instance; - private NMS nms; + private final VillagerTradeLimiter instance; + private final NMS nms; public PlayerListener(VillagerTradeLimiter instance) { this.instance = instance; diff --git a/src/com/pretzel/dev/villagertradelimiter/nms/NMS.java b/src/com/pretzel/dev/villagertradelimiter/nms/NMS.java index 75e58fd..31e589f 100644 --- a/src/com/pretzel/dev/villagertradelimiter/nms/NMS.java +++ b/src/com/pretzel/dev/villagertradelimiter/nms/NMS.java @@ -1,7 +1,6 @@ package com.pretzel.dev.villagertradelimiter.nms; import com.pretzel.dev.villagertradelimiter.lib.Util; -import org.bukkit.ChatColor; import java.lang.reflect.Method; import java.util.HashMap; diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 74514c4..3863eae 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,6 +1,6 @@ #---------------------------------------------------------------------------------# # VTL ~ VillagerTradeLimiter # -# Version: 1.2.0 # +# Version: 1.2.1 # # By: PretzelJohn # #---------------------------------------------------------------------------------# diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index c081021..72a55be 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: VillagerTradeLimiter author: PretzelJohn main: com.pretzel.dev.villagertradelimiter.VillagerTradeLimiter -version: 1.2.0 +version: 1.2.1 api-version: 1.14 commands: