fixing chat and test commands.
This commit is contained in:
parent
0f8028f6e6
commit
4abad9e1c4
@ -462,12 +462,13 @@ public class TypeWars extends TeamGame
|
||||
{
|
||||
if(GetState() != GameState.Live)
|
||||
return;
|
||||
|
||||
if(!Manager.GetClients().Get(event.getPlayer()).GetRank().has(event.getPlayer(), Rank.DEVELOPER, true))
|
||||
return;
|
||||
|
||||
if(event.getMessage().contains("/Money"))
|
||||
{
|
||||
|
||||
if(!Manager.GetClients().Get(event.getPlayer()).GetRank().has(event.getPlayer(), Rank.DEVELOPER, true))
|
||||
return;
|
||||
|
||||
_moneyMap.put(event.getPlayer(), 1000);
|
||||
UtilPlayer.message(event.getPlayer(), F.main("Money", "You got some Money"));
|
||||
event.setCancelled(true);
|
||||
@ -476,6 +477,9 @@ public class TypeWars extends TeamGame
|
||||
|
||||
if(event.getMessage().contains("/Boss"))
|
||||
{
|
||||
if(!Manager.GetClients().Get(event.getPlayer()).GetRank().has(event.getPlayer(), Rank.DEVELOPER, true))
|
||||
return;
|
||||
|
||||
if(!IsPlaying(event.getPlayer()))
|
||||
return;
|
||||
|
||||
@ -820,32 +824,36 @@ public class TypeWars extends TeamGame
|
||||
if(!GetPlayers(true).contains(event.getPlayer()))
|
||||
return;
|
||||
|
||||
Minion minion = getFarestMininion(event.getPlayer(), event.getMessage());
|
||||
|
||||
Bukkit.getPluginManager().callEvent(new TypeAttemptEvent(event.getPlayer(), event.getMessage(), minion != null));
|
||||
|
||||
if(minion == null)
|
||||
return;
|
||||
|
||||
MinionKillEvent minionEvent = new MinionKillEvent(event.getPlayer(), minion, KillType.TYPED);
|
||||
Bukkit.getPluginManager().callEvent(minionEvent);
|
||||
|
||||
if(minionEvent.isCancelled())
|
||||
return;
|
||||
|
||||
killMinion(minion, event.getPlayer());
|
||||
|
||||
int spawned = _minionsSpawned.get(GetTeam(event.getPlayer()));
|
||||
_minionsSpawned.put(GetTeam(event.getPlayer()), spawned + 1);
|
||||
|
||||
if(_playerTitles.contains(event.getPlayer()))
|
||||
try
|
||||
{
|
||||
_playerTitles.remove(event.getPlayer());
|
||||
UtilTextMiddle.clear(event.getPlayer());
|
||||
Minion minion = getFarestMininion(event.getPlayer(), event.getMessage());
|
||||
|
||||
Bukkit.getPluginManager().callEvent(new TypeAttemptEvent(event.getPlayer(), event.getMessage(), minion != null));
|
||||
|
||||
if(minion == null)
|
||||
return;
|
||||
|
||||
MinionKillEvent minionEvent = new MinionKillEvent(event.getPlayer(), minion, KillType.TYPED);
|
||||
Bukkit.getPluginManager().callEvent(minionEvent);
|
||||
|
||||
if(minionEvent.isCancelled())
|
||||
return;
|
||||
|
||||
killMinion(minion, event.getPlayer());
|
||||
|
||||
int spawned = _minionsSpawned.get(GetTeam(event.getPlayer()));
|
||||
_minionsSpawned.put(GetTeam(event.getPlayer()), spawned + 1);
|
||||
|
||||
if(_playerTitles.contains(event.getPlayer()))
|
||||
{
|
||||
_playerTitles.remove(event.getPlayer());
|
||||
UtilTextMiddle.clear(event.getPlayer());
|
||||
}
|
||||
UtilTextMiddle.display("", C.cGreen + "+$" + minion.getMoney(), event.getPlayer());
|
||||
_moneyMap.put(event.getPlayer(), _moneyMap.get(event.getPlayer()) + minion.getMoney());
|
||||
return;
|
||||
}
|
||||
UtilTextMiddle.display("", C.cGreen + "+$" + minion.getMoney(), event.getPlayer());
|
||||
_moneyMap.put(event.getPlayer(), _moneyMap.get(event.getPlayer()) + minion.getMoney());
|
||||
return;
|
||||
catch (Exception ex) {}
|
||||
}
|
||||
|
||||
public enum KillType
|
||||
|
Loading…
Reference in New Issue
Block a user