Added /e bridge <seconds> PC-17
This commit is contained in:
parent
6c0d18662f
commit
67e844db29
@ -1943,4 +1943,10 @@ public class Bridge extends TeamGame implements OreObsfucation
|
|||||||
{
|
{
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setBridgeTime(int time)
|
||||||
|
{
|
||||||
|
_bridgeTime = time;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@ import mineplex.core.updater.event.UpdateEvent;
|
|||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.events.PlayerDeathOutEvent;
|
import nautilus.game.arcade.events.PlayerDeathOutEvent;
|
||||||
|
import nautilus.game.arcade.game.games.bridge.Bridge;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -494,6 +495,44 @@ public class EventModule extends MiniPlugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (args[0].equalsIgnoreCase("bridge"))
|
||||||
|
{
|
||||||
|
if (!(Manager.GetGame() instanceof Bridge))
|
||||||
|
{
|
||||||
|
UtilPlayer.message(event.getPlayer(), F.main("Event", "You can only drop the bridges in Bridges!"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (((Bridge) Manager.GetGame()).isBridgesDown())
|
||||||
|
{
|
||||||
|
UtilPlayer.message(event.getPlayer(), F.main("Event", "The bridges have already dropped!"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int seconds = 10;
|
||||||
|
|
||||||
|
if (args.length > 1)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
seconds = Integer.parseInt(args[1]);
|
||||||
|
}
|
||||||
|
catch (NumberFormatException e)
|
||||||
|
{
|
||||||
|
UtilPlayer.message(event.getPlayer(), F.main("Event", "Invalid integer for seconds!"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (seconds < 0)
|
||||||
|
{
|
||||||
|
UtilPlayer.message(event.getPlayer(), F.main("Event", "Seconds must be greater than 0!"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
((Bridge) Manager.GetGame()).setBridgeTime((int) ((System.currentTimeMillis() - Manager.GetGame().GetStateTime()) + seconds * 1000));
|
||||||
|
UtilPlayer.message(event.getPlayer(), F.main("Event", "Bridges will drop in " + F.elem(seconds + " Seconds") + "!"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void listSettings(Player player)
|
public void listSettings(Player player)
|
||||||
|
Loading…
Reference in New Issue
Block a user