Merge branch 'master' of ssh://184.154.0.242:7999/min/mineplex
This commit is contained in:
commit
6978a176b1
@ -39,6 +39,8 @@ public class UtilSkull
|
||||
name = "MHF_Blaze";
|
||||
else if (entity instanceof CaveSpider)
|
||||
name = "MHF_CaveSpider";
|
||||
else if (entity instanceof Spider)
|
||||
name = "MHF_Spider";
|
||||
else if (entity instanceof Chicken)
|
||||
name = "MHF_Chicken";
|
||||
else if (entity instanceof MushroomCow)
|
||||
|
@ -15,6 +15,7 @@ import org.bukkit.entity.Boat;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.entity.ItemFrame;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Minecart;
|
||||
import org.bukkit.entity.Painting;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -1249,11 +1250,14 @@ public class Build extends SoloGame
|
||||
{
|
||||
for (Entity e : buildData.Entities)
|
||||
{
|
||||
if (e.equals(event.getRightClicked()))
|
||||
if (e instanceof LivingEntity || e instanceof Minecart || e instanceof Boat)
|
||||
{
|
||||
_mobShop.attemptShopOpen(player, buildData, e);
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
if (e.equals(event.getRightClicked()))
|
||||
{
|
||||
_mobShop.attemptShopOpen(player, buildData, e);
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public class MobPage extends ShopPageBase<ArcadeManager, MobShop>
|
||||
|
||||
public MobPage(ArcadeManager plugin, MobShop shop, CoreClientManager clientManager, DonationManager donationManager, Player player, BuildData buildData, Entity entity)
|
||||
{
|
||||
super(plugin, shop, clientManager, donationManager, "Mob Options", player, 18);
|
||||
super(plugin, shop, clientManager, donationManager, "Mob Options", player, 9);
|
||||
|
||||
_buildData = buildData;
|
||||
_entity = entity;
|
||||
@ -41,34 +41,34 @@ public class MobPage extends ShopPageBase<ArcadeManager, MobShop>
|
||||
@Override
|
||||
protected void buildPage()
|
||||
{
|
||||
byte entityData = UtilSkull.getSkullData(_entity);
|
||||
// byte entityData = UtilSkull.getSkullData(_entity);
|
||||
|
||||
// Add Skull delete button
|
||||
final String entityName = _entity.getType().getName();
|
||||
ShopItem head = new ShopItem(Material.SKULL_ITEM, entityData, entityName, new String[] {C.cGray + "Right Click to Delete Entity" }, 0, false, false);
|
||||
if (UtilSkull.isPlayerHead(entityData))
|
||||
{
|
||||
SkullMeta meta = ((SkullMeta) head.getItemMeta());
|
||||
meta.setOwner(UtilSkull.getPlayerHeadName(_entity));
|
||||
head.setItemMeta(meta);
|
||||
}
|
||||
// ShopItem head = new ShopItem(Material.SKULL_ITEM, entityData, entityName, new String[] {C.cGray + "Right Click to Delete Entity" }, 0, false, false);
|
||||
// if (UtilSkull.isPlayerHead(entityData))
|
||||
// {
|
||||
// SkullMeta meta = ((SkullMeta) head.getItemMeta());
|
||||
// meta.setOwner(UtilSkull.getPlayerHeadName(_entity));
|
||||
// head.setItemMeta(meta);
|
||||
// }
|
||||
|
||||
addButton(4, head, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
if (clickType == ClickType.RIGHT)
|
||||
{
|
||||
_buildData.removeEntity(_entity);
|
||||
UtilPlayer.message(player, F.main("Game", "Entity Deleted"));
|
||||
player.closeInventory();
|
||||
}
|
||||
}
|
||||
});
|
||||
// addButton(4, head, new IButton()
|
||||
// {
|
||||
// @Override
|
||||
// public void onClick(Player player, ClickType clickType)
|
||||
// {
|
||||
// if (clickType == ClickType.RIGHT)
|
||||
// {
|
||||
// _buildData.removeEntity(_entity);
|
||||
// UtilPlayer.message(player, F.main("Game", "Entity Deleted"));
|
||||
// player.closeInventory();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
int buttonSlot = 11;
|
||||
int buttonSlot = 1;
|
||||
if (_entity instanceof Ageable)
|
||||
{
|
||||
final Ageable ageable = ((Ageable) _entity);
|
||||
@ -154,10 +154,22 @@ public class MobPage extends ShopPageBase<ArcadeManager, MobShop>
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
ShopItem deleteButton = new ShopItem(Material.TNT, "Delete " + entityName, null, 0, false);
|
||||
addButton(8, deleteButton, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
if (clickType == ClickType.RIGHT)
|
||||
{
|
||||
_buildData.removeEntity(_entity);
|
||||
UtilPlayer.message(player, F.main("Game", "Entity Deleted"));
|
||||
player.closeInventory();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ public class OptionsPage extends ShopPageBase<ArcadeManager, OptionsShop>
|
||||
protected void buildPage()
|
||||
{
|
||||
|
||||
ShopItem ground = new ShopItem(Material.CLAY, "Change Ground", 0, false);
|
||||
ShopItem ground = new ShopItem(Material.GRASS, "Change Ground", 0, false);
|
||||
ShopItem particles = new ShopItem(Material.NETHER_STAR, "Particles", 0, false);
|
||||
ShopItem weather = new ShopItem(Material.FEATHER, "Weather", 0, false);
|
||||
ShopItem time = new ShopItem(Material.WATCH, "Time of Day", 0, false);
|
||||
|
Loading…
Reference in New Issue
Block a user