parent
282219fb4c
commit
85522cddca
|
@ -10,11 +10,13 @@ public class CloseButton implements IButton
|
|||
public void ClickedLeft(Player player)
|
||||
{
|
||||
player.closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 13");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ClickedRight(Player player)
|
||||
{
|
||||
player.closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 19");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -426,6 +426,7 @@ public class PunishPage extends CraftInventoryCustom implements Listener
|
|||
{
|
||||
_plugin.AddPunishment(_target, category, _reason, _player, severity, ban, punishTime);
|
||||
_player.closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 429");
|
||||
ClosePunish();
|
||||
}
|
||||
|
||||
|
@ -451,6 +452,7 @@ public class PunishPage extends CraftInventoryCustom implements Listener
|
|||
{
|
||||
punishment.Remove(_player.getName(), _reason);
|
||||
_player.closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 455");
|
||||
ClosePunish();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -181,6 +181,7 @@ public abstract class ShopBase<PluginType extends MiniPlugin> implements Listene
|
|||
PlayerPageMap.get(event.getPlayer().getName()).Dispose();
|
||||
|
||||
event.getPlayer().closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 184");
|
||||
CloseShopForPlayer(event.getPlayer());
|
||||
|
||||
PlayerPageMap.remove(event.getPlayer().getName());
|
||||
|
@ -199,6 +200,8 @@ public abstract class ShopBase<PluginType extends MiniPlugin> implements Listene
|
|||
SetCurrentPageForPlayer(player, page);
|
||||
|
||||
player.openInventory(page);
|
||||
|
||||
System.out.println(this.getClass().getName() + " - player.openInventory(page);");
|
||||
}
|
||||
|
||||
public void SetCurrentPageForPlayer(Player player, ShopPageBase<PluginType, ? extends ShopBase<PluginType>> page)
|
||||
|
|
|
@ -104,7 +104,11 @@ public class ConfirmationPage<PluginType extends MiniPlugin, ShopType extends Sh
|
|||
if (_returnPage != null)
|
||||
Shop.OpenPageForPlayer(player, _returnPage);
|
||||
else
|
||||
{
|
||||
player.closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 109");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void BuildSquareAt(int slot, ShopItem item, IButton button)
|
||||
|
@ -288,6 +292,7 @@ public class ConfirmationPage<PluginType extends MiniPlugin, ShopType extends Sh
|
|||
else if (Player != null)
|
||||
{
|
||||
Player.closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 291");
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
|
|
|
@ -135,6 +135,7 @@ public class QueuePage extends ShopPageBase<QueueManager, QueueShop>
|
|||
if (_closeOnNextUpdate)
|
||||
{
|
||||
Player.closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 138");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -187,6 +188,7 @@ public class QueuePage extends ShopPageBase<QueueManager, QueueShop>
|
|||
Plugin.respondToInvite(player, false);
|
||||
|
||||
player.closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 191");
|
||||
}
|
||||
|
||||
private void buildSquareAt(int slot, ShopItem item, IButton button)
|
||||
|
|
|
@ -56,6 +56,8 @@ public class ClassCombatShop extends ShopBase<ClassShopManager>
|
|||
{
|
||||
if (!CanOpenShop(player))
|
||||
return false;
|
||||
|
||||
System.out.println(this.getClass().getName() + " - I CAN OPEN SHOP");
|
||||
|
||||
OpenedShop.add(player.getName());
|
||||
|
||||
|
|
|
@ -149,6 +149,7 @@ public class CustomBuildPage extends ShopPageBase<ClassShopManager, ClassCombatS
|
|||
clientClass.EquipCustomBuild(customBuild);
|
||||
|
||||
Player.closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 152");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
|
|
@ -99,15 +99,15 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||
private ProjectileManager _projectileManager;
|
||||
|
||||
private Portal _portal;
|
||||
private ArcadeShop _arcadeShop;
|
||||
private ArcadeShop _arcadeShop;
|
||||
|
||||
// Managers
|
||||
// Managers
|
||||
private GameFactory _gameFactory;
|
||||
private GameCreationManager _gameCreationManager;
|
||||
private GameGemManager _gameGemManager;
|
||||
private GameManager _gameManager;
|
||||
private GameManager _gameManager;
|
||||
private GameLobbyManager _gameLobbyManager;
|
||||
private GameWorldManager _gameWorldManager;
|
||||
private GameWorldManager _gameWorldManager;
|
||||
private ServerStatusManager _serverStatusManager;
|
||||
private InventoryManager _inventoryManager;
|
||||
private CosmeticManager _cosmeticManager;
|
||||
|
@ -686,7 +686,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||
|
||||
public void openClassShop(Player player)
|
||||
{
|
||||
_classShop.attemptShopOpen(player);
|
||||
_classShop.attemptShopOpen(player);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
|
|
@ -100,5 +100,6 @@ public class TeamArmorAddon extends MiniPlugin
|
|||
|
||||
event.setCancelled(true);
|
||||
event.getWhoClicked().closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 103");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1065,7 +1065,7 @@ public abstract class Game implements Listener
|
|||
return 0;
|
||||
}
|
||||
|
||||
public void AddStat(Player player, String stat, int amount, boolean global)
|
||||
public void AddStat(Player player, String stat, int amount, boolean limitTo1, boolean global)
|
||||
{
|
||||
if (!_stats.containsKey(player))
|
||||
_stats.put(player, new HashMap<String, Integer>());
|
||||
|
@ -1079,7 +1079,7 @@ public abstract class Game implements Listener
|
|||
if (_stats.get(player).containsKey(stat))
|
||||
past = _stats.get(player).get(stat);
|
||||
|
||||
_stats.get(player).put(stat, past + amount);
|
||||
_stats.get(player).put(stat, limitTo1 ? Math.max(1, past + amount) : past + amount);
|
||||
}
|
||||
|
||||
public NautHashMap<Player, HashMap<String, Integer>> GetStats()
|
||||
|
|
|
@ -61,7 +61,7 @@ public class ChampionsDominate extends Domination
|
|||
{
|
||||
SetKit(player, GetKits()[2], true);
|
||||
player.closeInventory();
|
||||
System.out.println("Closing inventory from validate kit");
|
||||
System.out.println(this.getClass().getName() + " 64");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ public class ChampionsTDM extends TeamDeathmatch
|
|||
{
|
||||
SetKit(player, GetKits()[2], true);
|
||||
player.closeInventory();
|
||||
System.out.println("Closing inventory from validate kit");
|
||||
System.out.println(this.getClass().getName() + " 61");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ public class KitKnight extends Kit
|
|||
{
|
||||
"Knight of the realm, extremely good at",
|
||||
"defending and surviving.",
|
||||
},
|
||||
},
|
||||
new Perk[]
|
||||
{
|
||||
|
||||
|
|
|
@ -164,6 +164,7 @@ public class TeamDeathmatch extends TeamGame
|
|||
{
|
||||
SetKit(player, GetKits()[2], true);
|
||||
player.closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 167");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ public class Spleef extends SoloGame
|
|||
|
||||
public void BlockFade(Block block, Player player)
|
||||
{
|
||||
AddStat(player, "BlocksBroken", 1, false);
|
||||
AddStat(player, "BlocksBroken", 1, false, false);
|
||||
|
||||
UtilPlayer.hunger(player, 1);
|
||||
|
||||
|
|
|
@ -264,6 +264,7 @@ public class GameFlagManager implements Listener
|
|||
{
|
||||
event.setCancelled(true);
|
||||
event.getWhoClicked().closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 267");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1147,6 +1147,7 @@ public class GameLobbyManager implements IPacketRunnable, Listener
|
|||
{
|
||||
event.setCancelled(true);
|
||||
event.getWhoClicked().closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 1150");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -150,6 +150,7 @@ public class GamePlayerManager implements Listener
|
|||
{
|
||||
event.setCancelled(true);
|
||||
event.getWhoClicked().closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 153");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -81,12 +81,14 @@ public class MiscManager implements Listener
|
|||
{
|
||||
event.setCancelled(true);
|
||||
player.closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 84");
|
||||
}
|
||||
|
||||
else if (Manager.GetGame().IsLive() && !Manager.GetGame().IsAlive(player) && !((CraftPlayer)player).getHandle().spectating)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
player.closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 91");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,5 +16,6 @@ public class InventoryClose extends Action
|
|||
public void CustomAction(Player player)
|
||||
{
|
||||
player.closeInventory();
|
||||
System.out.println(this.getClass().getName() + " 19");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue