Fixes for build game + fix clans compile
This commit is contained in:
parent
910cdff935
commit
244ffece8a
@ -12,7 +12,7 @@ public class UtilParticle
|
|||||||
{
|
{
|
||||||
public enum ParticleType
|
public enum ParticleType
|
||||||
{
|
{
|
||||||
ANGRY_VILLAGER("angryVillager"),
|
ANGRY_VILLAGER("angryVillager", "Angry Villager", Material.SAPLING, (byte) 0),
|
||||||
|
|
||||||
BLOCK_CRACK("blockcrack_1_0")
|
BLOCK_CRACK("blockcrack_1_0")
|
||||||
{
|
{
|
||||||
@ -117,16 +117,59 @@ public class UtilParticle
|
|||||||
WITCH_MAGIC("witchMagic");
|
WITCH_MAGIC("witchMagic");
|
||||||
|
|
||||||
public String particleName;
|
public String particleName;
|
||||||
|
private boolean _friendlyData;
|
||||||
|
private String _friendlyName;
|
||||||
|
private Material _material;
|
||||||
|
private byte _data;
|
||||||
|
|
||||||
ParticleType(String particleName)
|
ParticleType(String particleName)
|
||||||
{
|
{
|
||||||
this.particleName = 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)
|
public String getParticle(Material type, int data)
|
||||||
{
|
{
|
||||||
return particleName;
|
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,
|
private static PacketPlayOutWorldParticles getPacket(String particleName, Location location, float offsetX, float offsetY,
|
||||||
|
@ -6,6 +6,7 @@ import net.minecraft.server.v1_7_R4.MinecraftServer;
|
|||||||
import mineplex.core.account.CoreClientManager;
|
import mineplex.core.account.CoreClientManager;
|
||||||
import mineplex.core.antihack.AntiHack;
|
import mineplex.core.antihack.AntiHack;
|
||||||
import mineplex.core.blockrestore.BlockRestore;
|
import mineplex.core.blockrestore.BlockRestore;
|
||||||
|
import mineplex.core.chat.Chat;
|
||||||
import mineplex.core.command.CommandCenter;
|
import mineplex.core.command.CommandCenter;
|
||||||
import mineplex.core.donation.DonationManager;
|
import mineplex.core.donation.DonationManager;
|
||||||
import mineplex.core.explosion.Explosion;
|
import mineplex.core.explosion.Explosion;
|
||||||
@ -78,7 +79,8 @@ public class Clans extends JavaPlugin
|
|||||||
BlockRestore blockRestore = new BlockRestore(this);
|
BlockRestore blockRestore = new BlockRestore(this);
|
||||||
|
|
||||||
IgnoreManager ignoreManager = new IgnoreManager(this, _clientManager, preferenceManager, portal);
|
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 MemoryFix(this);
|
||||||
new Explosion(this, blockRestore);
|
new Explosion(this, blockRestore);
|
||||||
|
@ -686,6 +686,8 @@ public class Build extends SoloGame
|
|||||||
{
|
{
|
||||||
data.Particles.put(event.getPlayer().getLocation(), particleType);
|
data.Particles.put(event.getPlayer().getLocation(), particleType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ public class ParticlesPage extends ShopPageBase<ArcadeManager, OptionsShop>
|
|||||||
int index = 0;
|
int index = 0;
|
||||||
for (final UtilParticle.ParticleType particleType : UtilParticle.ParticleType.values())
|
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);
|
ShopItem shopItem = new ShopItem(particleType.getMaterial(), particleType.getFriendlyName(), null, 0, false);
|
||||||
addButton(index, shopItem, new IButton()
|
addButton(index, shopItem, new IButton()
|
||||||
|
Loading…
Reference in New Issue
Block a user