From 52b9880713e0038782b198638e902562749156aa Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Fri, 2 Dec 2016 22:13:37 -0500 Subject: [PATCH] Disabled Lag --- src/alisolarflare/AliPresents.java | 3 +-- .../components/flaircolouring/FlairColouringAPI.java | 2 +- .../components/flaircolouring/FlairColouringComponent.java | 2 +- .../components/flaircolouring/letterdyes/LetterDye.java | 3 --- .../flaircolouring/letterdyes/LetterDyeListener.java | 7 +++++++ 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/alisolarflare/AliPresents.java b/src/alisolarflare/AliPresents.java index 6b0d4de..f283e7b 100644 --- a/src/alisolarflare/AliPresents.java +++ b/src/alisolarflare/AliPresents.java @@ -13,7 +13,6 @@ import alisolarflare.components.flaircolouring.FlairColouringComponent; import alisolarflare.components.gpowers.GPowerComponent; import alisolarflare.components.insurance.InsuranceComponent; import alisolarflare.components.magic.MagicComponent; -import alisolarflare.components.metrics.MetricsComponent; public class AliPresents extends JavaPlugin{ public void onEnable(){ @@ -30,7 +29,7 @@ public class AliPresents extends JavaPlugin{ new GPowerComponent().register(this); new InsuranceComponent().register(this); new MagicComponent().register(this); - new MetricsComponent().register(this); + //new MetricsComponent().register(this); logger.info(pdfFile.getName() + " has fully registered (V." + pdfFile.getVersion()+ ")."); diff --git a/src/alisolarflare/components/flaircolouring/FlairColouringAPI.java b/src/alisolarflare/components/flaircolouring/FlairColouringAPI.java index 759f761..293da95 100644 --- a/src/alisolarflare/components/flaircolouring/FlairColouringAPI.java +++ b/src/alisolarflare/components/flaircolouring/FlairColouringAPI.java @@ -88,7 +88,7 @@ public class FlairColouringAPI { colourChanger = "§2"; break; case LIGHT_BLUE: - colourChanger = "&b"; + colourChanger = "§b"; break; case CYAN: colourChanger = "§3"; diff --git a/src/alisolarflare/components/flaircolouring/FlairColouringComponent.java b/src/alisolarflare/components/flaircolouring/FlairColouringComponent.java index d9c28fa..5b07a57 100644 --- a/src/alisolarflare/components/flaircolouring/FlairColouringComponent.java +++ b/src/alisolarflare/components/flaircolouring/FlairColouringComponent.java @@ -27,6 +27,6 @@ public class FlairColouringComponent extends Component { registerListener(plugin, new PortalListener(plugin, this)); registerListener(plugin, new PlayerProximityLoop(plugin, this)); - registerListener(plugin, new LetterDyeListener((Essentials) Bukkit.getPluginManager().getPlugin("Essentials"))); + //registerListener(plugin, new LetterDyeListener((Essentials) Bukkit.getPluginManager().getPlugin("Essentials"))); } } diff --git a/src/alisolarflare/components/flaircolouring/letterdyes/LetterDye.java b/src/alisolarflare/components/flaircolouring/letterdyes/LetterDye.java index 68f9b88..3b90335 100644 --- a/src/alisolarflare/components/flaircolouring/letterdyes/LetterDye.java +++ b/src/alisolarflare/components/flaircolouring/letterdyes/LetterDye.java @@ -7,9 +7,6 @@ import org.bukkit.inventory.meta.ItemMeta; public class LetterDye { public static boolean isLetterDye(ItemStack item){ - if(item.getType() != Material.INK_SACK) return false; - if(item.getItemMeta().hasEnchant(Enchantment.LUCK) && (item.getItemMeta().getEnchantLevel(Enchantment.LUCK) == 10)) return false; - if(item.getItemMeta().getDisplayName() == "LetterDye") return false; return true; } public static ItemStack getLetterDye(){ diff --git a/src/alisolarflare/components/flaircolouring/letterdyes/LetterDyeListener.java b/src/alisolarflare/components/flaircolouring/letterdyes/LetterDyeListener.java index 3befee2..8bb5aa8 100644 --- a/src/alisolarflare/components/flaircolouring/letterdyes/LetterDyeListener.java +++ b/src/alisolarflare/components/flaircolouring/letterdyes/LetterDyeListener.java @@ -1,9 +1,12 @@ package alisolarflare.components.flaircolouring.letterdyes; +import org.bukkit.Material; +import org.bukkit.enchantments.Enchantment; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.ItemStack; import org.bukkit.material.Dye; import com.earth2me.essentials.Essentials; @@ -20,6 +23,10 @@ public class LetterDyeListener implements Listener{ public void onLetterDye(PlayerInteractEvent event){ if((event.getAction() == Action.PHYSICAL)) return; if (LetterDye.isLetterDye(event.getItem())) return; + ItemStack item = event.getItem(); + if(item.getType() != Material.INK_SACK) return; + if(item.getItemMeta().hasEnchant(Enchantment.LUCK) && (item.getItemMeta().getEnchantLevel(Enchantment.LUCK) == 10)) return; + if(item.getItemMeta().getDisplayName() == "LetterDye") return; Dye dye = (Dye) event.getItem().getData(); User user = essentials.getUser(event.getPlayer());