Merge branch 'thanos-mineware' into develop
This commit is contained in:
commit
7cc44c8bfc
@ -29,7 +29,6 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
|||||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||||
import org.bukkit.event.player.PlayerArmorStandManipulateEvent;
|
import org.bukkit.event.player.PlayerArmorStandManipulateEvent;
|
||||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
|
||||||
import org.bukkit.event.player.PlayerDropItemEvent;
|
import org.bukkit.event.player.PlayerDropItemEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.event.player.PlayerMoveEvent;
|
import org.bukkit.event.player.PlayerMoveEvent;
|
||||||
@ -42,7 +41,6 @@ import org.bukkit.scheduler.BukkitRunnable;
|
|||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import mineplex.core.common.Rank;
|
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.UtilAction;
|
import mineplex.core.common.util.UtilAction;
|
||||||
@ -1497,73 +1495,73 @@ public class BawkBawkBattles extends TeamGame implements IThrown
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
// @EventHandler
|
||||||
public void debugCommands(PlayerCommandPreprocessEvent event)
|
// public void debugCommands(PlayerCommandPreprocessEvent event)
|
||||||
{
|
// {
|
||||||
Player player = event.getPlayer();
|
// Player player = event.getPlayer();
|
||||||
String message = event.getMessage();
|
// String message = event.getMessage();
|
||||||
|
//
|
||||||
if (Manager.GetClients().hasRank(player, Rank.SNR_MODERATOR))
|
// if (Manager.GetClients().hasRank(player, Rank.SNR_MODERATOR))
|
||||||
{
|
// {
|
||||||
if (message.startsWith("/restrict"))
|
// if (message.startsWith("/restrict"))
|
||||||
{
|
// {
|
||||||
String[] pieces = message.split(" ");
|
// String[] pieces = message.split(" ");
|
||||||
|
//
|
||||||
if (pieces.length > 1)
|
// if (pieces.length > 1)
|
||||||
{
|
// {
|
||||||
String challenge = F.combine(pieces, 1, null, false).trim();
|
// String challenge = F.combine(pieces, 1, null, false).trim();
|
||||||
|
//
|
||||||
if (_list.restrict(challenge))
|
// if (_list.restrict(challenge))
|
||||||
{
|
// {
|
||||||
UtilPlayer.message(player, F.main("Game", "Restricted to " + F.elem(challenge) + " challenge."));
|
// UtilPlayer.message(player, F.main("Game", "Restricted to " + F.elem(challenge) + " challenge."));
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
UtilPlayer.message(player, F.main("Game", "Could not find any challenge by that name."));
|
// UtilPlayer.message(player, F.main("Game", "Could not find any challenge by that name."));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
UtilPlayer.message(player, F.main("Game", "All challenge restrictions were cleared."));
|
// UtilPlayer.message(player, F.main("Game", "All challenge restrictions were cleared."));
|
||||||
_list.unrestrict();
|
// _list.unrestrict();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
event.setCancelled(true);
|
// event.setCancelled(true);
|
||||||
}
|
// }
|
||||||
else if (message.startsWith("/skip"))
|
// else if (message.startsWith("/skip"))
|
||||||
{
|
// {
|
||||||
if (IsLive())
|
// if (IsLive())
|
||||||
{
|
// {
|
||||||
endCurrentChallenge();
|
// endCurrentChallenge();
|
||||||
|
//
|
||||||
Announce(C.cAqua + C.Bold + player.getName() + " skipped this challenge.");
|
// Announce(C.cAqua + C.Bold + player.getName() + " skipped this challenge.");
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
UtilPlayer.message(player, F.main("Game", "You cannot skip a challenge if the game is not started."));
|
// UtilPlayer.message(player, F.main("Game", "You cannot skip a challenge if the game is not started."));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
event.setCancelled(true);
|
// event.setCancelled(true);
|
||||||
}
|
// }
|
||||||
else if (message.startsWith("/lose"))
|
// else if (message.startsWith("/lose"))
|
||||||
{
|
// {
|
||||||
if (IsLive() && _challenge != null && IsAlive(player))
|
// if (IsLive() && _challenge != null && IsAlive(player))
|
||||||
{
|
// {
|
||||||
setLives(player, 0);
|
// setLives(player, 0);
|
||||||
_challenge.getData().addLostPlayer(player);
|
// _challenge.getData().addLostPlayer(player);
|
||||||
_deathEffect.playDeath(player, player.getLocation());
|
// _deathEffect.playDeath(player, player.getLocation());
|
||||||
GetScoreboard().ResetScore(player.getName());
|
// GetScoreboard().ResetScore(player.getName());
|
||||||
_chickenAttack.start(player);
|
// _chickenAttack.start(player);
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
UtilPlayer.message(player, F.main("Game", "You cannot lose at this time."));
|
// UtilPlayer.message(player, F.main("Game", "You cannot lose at this time."));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
event.setCancelled(true);
|
// event.setCancelled(true);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helper methods
|
* Helper methods
|
||||||
|
Loading…
Reference in New Issue
Block a user