Disabled Lag

This commit is contained in:
alisolarflare 2016-12-02 22:13:37 -05:00
parent 8972f7513f
commit 52b9880713
5 changed files with 10 additions and 7 deletions

View file

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

View file

@ -88,7 +88,7 @@ public class FlairColouringAPI {
colourChanger = "§2";
break;
case LIGHT_BLUE:
colourChanger = "&b";
colourChanger = "§b";
break;
case CYAN:
colourChanger = "§3";

View file

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

View file

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

View file

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