Disabled Lag
This commit is contained in:
parent
8972f7513f
commit
52b9880713
5 changed files with 10 additions and 7 deletions
|
@ -13,7 +13,6 @@ import alisolarflare.components.flaircolouring.FlairColouringComponent;
|
||||||
import alisolarflare.components.gpowers.GPowerComponent;
|
import alisolarflare.components.gpowers.GPowerComponent;
|
||||||
import alisolarflare.components.insurance.InsuranceComponent;
|
import alisolarflare.components.insurance.InsuranceComponent;
|
||||||
import alisolarflare.components.magic.MagicComponent;
|
import alisolarflare.components.magic.MagicComponent;
|
||||||
import alisolarflare.components.metrics.MetricsComponent;
|
|
||||||
|
|
||||||
public class AliPresents extends JavaPlugin{
|
public class AliPresents extends JavaPlugin{
|
||||||
public void onEnable(){
|
public void onEnable(){
|
||||||
|
@ -30,7 +29,7 @@ public class AliPresents extends JavaPlugin{
|
||||||
new GPowerComponent().register(this);
|
new GPowerComponent().register(this);
|
||||||
new InsuranceComponent().register(this);
|
new InsuranceComponent().register(this);
|
||||||
new MagicComponent().register(this);
|
new MagicComponent().register(this);
|
||||||
new MetricsComponent().register(this);
|
//new MetricsComponent().register(this);
|
||||||
|
|
||||||
|
|
||||||
logger.info(pdfFile.getName() + " has fully registered (V." + pdfFile.getVersion()+ ").");
|
logger.info(pdfFile.getName() + " has fully registered (V." + pdfFile.getVersion()+ ").");
|
||||||
|
|
|
@ -88,7 +88,7 @@ public class FlairColouringAPI {
|
||||||
colourChanger = "§2";
|
colourChanger = "§2";
|
||||||
break;
|
break;
|
||||||
case LIGHT_BLUE:
|
case LIGHT_BLUE:
|
||||||
colourChanger = "&b";
|
colourChanger = "§b";
|
||||||
break;
|
break;
|
||||||
case CYAN:
|
case CYAN:
|
||||||
colourChanger = "§3";
|
colourChanger = "§3";
|
||||||
|
|
|
@ -27,6 +27,6 @@ public class FlairColouringComponent extends Component {
|
||||||
|
|
||||||
registerListener(plugin, new PortalListener(plugin, this));
|
registerListener(plugin, new PortalListener(plugin, this));
|
||||||
registerListener(plugin, new PlayerProximityLoop(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")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,9 +7,6 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
public class LetterDye {
|
public class LetterDye {
|
||||||
public static boolean isLetterDye(ItemStack item){
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
public static ItemStack getLetterDye(){
|
public static ItemStack getLetterDye(){
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
package alisolarflare.components.flaircolouring.letterdyes;
|
package alisolarflare.components.flaircolouring.letterdyes;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.material.Dye;
|
import org.bukkit.material.Dye;
|
||||||
|
|
||||||
import com.earth2me.essentials.Essentials;
|
import com.earth2me.essentials.Essentials;
|
||||||
|
@ -20,6 +23,10 @@ public class LetterDyeListener implements Listener{
|
||||||
public void onLetterDye(PlayerInteractEvent event){
|
public void onLetterDye(PlayerInteractEvent event){
|
||||||
if((event.getAction() == Action.PHYSICAL)) return;
|
if((event.getAction() == Action.PHYSICAL)) return;
|
||||||
if (LetterDye.isLetterDye(event.getItem())) 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();
|
Dye dye = (Dye) event.getItem().getData();
|
||||||
User user = essentials.getUser(event.getPlayer());
|
User user = essentials.getUser(event.getPlayer());
|
||||||
|
|
Loading…
Reference in a new issue