add debug command to end build time to BLD

This commit is contained in:
Spencer 2017-11-23 15:35:08 -05:00 committed by Alexander Meech
parent c114823905
commit 875c0a015b

View File

@ -9,6 +9,8 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.UUID;
import mineplex.core.account.permissions.Permission;
import mineplex.core.account.permissions.PermissionGroup;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Effect;
@ -113,6 +115,11 @@ import nautilus.game.arcade.stats.BlockPlaceStatTracker;
public class Build extends Game
{
public enum Perm implements Permission
{
DEBUG_BUILD_END_COMMAND
}
protected Map<Player, BuildData> _data = new HashMap<>();
protected Map<Player, Map<Player, Integer>> _votes = new HashMap<>();
@ -289,6 +296,17 @@ public class Build extends Game
_mobShop = new MobShop(getArcadeManager(), getArcadeManager().GetClients(), getArcadeManager().GetDonation());
_optionsShop = new OptionsShop(this, getArcadeManager(), getArcadeManager().GetClients(), getArcadeManager().GetDonation());
_shopItem = ItemStackFactory.Instance.CreateStack(Material.DIAMOND, (byte) 0, 1, C.cGreen + "Options");
registerDebugCommand("endbuildtime", Perm.DEBUG_BUILD_END_COMMAND, PermissionGroup.ADMIN, (caller, args) ->
{
if (_buildGameState != 0) {
caller.sendMessage(F.main("Debug", "You can't use that right now."));
return;
}
_buildTime = 0;
caller.sendMessage(F.main("Debug", "Ending build time..."));
});
}
@EventHandler