diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilParticle.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilParticle.java index 0cd02d837..df8cd78a2 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilParticle.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilParticle.java @@ -12,7 +12,7 @@ public class UtilParticle { public enum ParticleType { - ANGRY_VILLAGER("angryVillager"), + ANGRY_VILLAGER("angryVillager", "Angry Villager", Material.SAPLING, (byte) 0), BLOCK_CRACK("blockcrack_1_0") { @@ -117,16 +117,59 @@ public class UtilParticle WITCH_MAGIC("witchMagic"); public String particleName; + private boolean _friendlyData; + private String _friendlyName; + private Material _material; + private byte _data; ParticleType(String particleName) { this.particleName = particleName; + _friendlyData = false; + } + + ParticleType(String particleName, String friendlyName, Material material, byte data) + { + _friendlyData = true; + _friendlyName = friendlyName; + _material = material; + _data = data; } public String getParticle(Material type, int data) { return particleName; } + + public boolean hasFriendlyData() + { + return _friendlyData; + } + + public String getFriendlyName() + { + return _friendlyName; + } + + public Material getMaterial() + { + return _material; + } + + public byte getData() + { + return _data; + } + + public static ParticleType getFromFriendlyName(String name) + { + for (ParticleType type : values()) + { + if (type.hasFriendlyData() && type.getFriendlyName().equals(name)) + return type; + } + return null; + } } private static PacketPlayOutWorldParticles getPacket(String particleName, Location location, float offsetX, float offsetY, diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java index 6c61713e8..899cbc101 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java @@ -6,6 +6,7 @@ import net.minecraft.server.v1_7_R4.MinecraftServer; import mineplex.core.account.CoreClientManager; import mineplex.core.antihack.AntiHack; import mineplex.core.blockrestore.BlockRestore; +import mineplex.core.chat.Chat; import mineplex.core.command.CommandCenter; import mineplex.core.donation.DonationManager; import mineplex.core.explosion.Explosion; @@ -78,7 +79,8 @@ public class Clans extends JavaPlugin BlockRestore blockRestore = new BlockRestore(this); IgnoreManager ignoreManager = new IgnoreManager(this, _clientManager, preferenceManager, portal); - new MessageManager(this, _clientManager, preferenceManager, ignoreManager, punish, new FriendManager(this, _clientManager, preferenceManager, portal)); + Chat chat = new Chat(this, _clientManager, preferenceManager, serverStatusManager.getCurrentServerName()); + new MessageManager(this, _clientManager, preferenceManager, ignoreManager, punish, new FriendManager(this, _clientManager, preferenceManager, portal), chat); new MemoryFix(this); new Explosion(this, blockRestore); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/build/Build.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/build/Build.java index 907c717cf..1b607c9aa 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/build/Build.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/build/Build.java @@ -686,6 +686,8 @@ public class Build extends SoloGame { data.Particles.put(event.getPlayer().getLocation(), particleType); } + + event.setCancelled(true); } else { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/build/gui/page/ParticlesPage.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/build/gui/page/ParticlesPage.java index fd3bfa24f..4afc50e15 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/build/gui/page/ParticlesPage.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/build/gui/page/ParticlesPage.java @@ -46,7 +46,7 @@ public class ParticlesPage extends ShopPageBase int index = 0; for (final UtilParticle.ParticleType particleType : UtilParticle.ParticleType.values()) { - if (particleType.shouldDisplayGuis()) + if (particleType.hasFriendlyData()) { ShopItem shopItem = new ShopItem(particleType.getMaterial(), particleType.getFriendlyName(), null, 0, false); addButton(index, shopItem, new IButton()