Merge branch 'master' of ssh://dev.mineplex.com:7999/min/mineplex

This commit is contained in:
Chiss 2013-10-13 08:43:06 +11:00
commit 1fd894934a
6 changed files with 23 additions and 8 deletions

View File

@ -184,6 +184,11 @@ public class UtilInv
}
public static void DisallowMovementOf(InventoryClickEvent event, String name, Material type, byte data, boolean inform)
{
DisallowMovementOf(event, name, type, data, inform, false);
}
public static void DisallowMovementOf(InventoryClickEvent event, String name, Material type, byte data, boolean inform, boolean allInventorties)
{
/*
System.out.println("Inv Type: " + event.getInventory().getType());
@ -203,7 +208,7 @@ public class UtilInv
*/
//Do what you want in Crafting Inv
if (event.getInventory().getType() == InventoryType.CRAFTING)
if (!allInventorties && event.getInventory().getType() == InventoryType.CRAFTING)
return;
//Hotbar Swap

View File

@ -202,7 +202,7 @@ public class Explosion extends MiniPlugin
{
FallingBlock cur = fallingIterator.next();
if (!cur.isValid() || cur.getTicksLived() > 400)
if (cur.isDead() || !cur.isValid() || cur.getTicksLived() > 400)
{
fallingIterator.remove();

View File

@ -43,6 +43,7 @@ import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityTargetEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
@ -162,13 +163,24 @@ public class PetManager extends MiniClientPlugin<PetClient>
if (event.hasItem() && event.getItem().getType() == Material.BONE)
{
_petShop.attemptShopOpen(event.getPlayer());
event.setCancelled(true);
}
}
@EventHandler
public void preventWolfBone(PlayerInteractEntityEvent event)
{
if (event.getPlayer().getItemInHand().getType() == Material.BONE)
{
event.setCancelled(true);
event.getPlayer().updateInventory();
}
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerInventoryClick(InventoryClickEvent event)
{
UtilInv.DisallowMovementOf(event, "Pet Menu", Material.BONE, (byte)0, true);
UtilInv.DisallowMovementOf(event, "Pet Menu", Material.BONE, (byte)0, true, true);
}
@EventHandler

View File

@ -100,7 +100,7 @@ public class Hub extends JavaPlugin implements INautilusPlugin, IRelation
ClassShopManager shopManager = new ClassShopManager(this, classManager, skillManager, null);
new ClassCombatShop(shopManager, clientManager, donationManager, "Select Class Here");
new ClassCombatPurchaseShop(shopManager, clientManager, donationManager, "Skill Shop");
new ClassCombatPurchaseShop(shopManager, clientManager, donationManager, "Class Shop");
new ClassCombatCustomBuildShop(shopManager, clientManager, donationManager, "Class Setup");
//Updates

View File

@ -25,7 +25,7 @@ public class LobbyMenu extends ShopPageBase<ServerManager, LobbyShop> implements
public LobbyMenu(ServerManager plugin, LobbyShop lobbyShop, CoreClientManager clientManager, DonationManager donationManager, String name, Player player, String serverGroup)
{
super(plugin, lobbyShop, clientManager, donationManager, name, player, 27);
super(plugin, lobbyShop, clientManager, donationManager, name, player, 36);
_serverGroup = serverGroup;

View File

@ -402,8 +402,6 @@ public class ArcadeManager extends MiniPlugin implements IRelation
return GetServerConfig().MaxPlayers;
}
public void HubClock(Player player)
{
player.getInventory().setItem(8, ItemStackFactory.Instance.CreateStack(Material.WATCH, (byte)0, 1, (short)0, C.cGreen + "Return to Hub",
@ -416,7 +414,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
// Reserved Slot Check
if (Bukkit.getOnlinePlayers().length >= Bukkit.getServer().getMaxPlayers())
{
if (_clientManager.Get(event.getPlayer().getName()).GetRank().Has(event.getPlayer(), Rank.HELPER, false) || _donationManager.Get(event.getPlayer().getName()).OwnsUnknownPackage(_serverConfig.ServerType + " ULTRA"))
if (_clientManager.Get(event.getPlayer().getName()).GetRank().Has(event.getPlayer(), Rank.ULTRA, false) || _donationManager.Get(event.getPlayer().getName()).OwnsUnknownPackage(_serverConfig.ServerType + " ULTRA"))
{
event.allow();
event.setResult(PlayerLoginEvent.Result.ALLOWED);