1
0

admin item, fallback servergroup game

This commit is contained in:
labalityowo
2023-05-20 14:45:14 +07:00
parent 4822d26372
commit 3718febef3
6 changed files with 9 additions and 6 deletions

View File

@ -188,7 +188,7 @@ public class WorldData
TimingManager.stop("UnzipWorld creating folders");
TimingManager.start("UnzipWorld UnzipToDirectory");
ZipUtil.UnzipToDirectory("../../update/maps/Clans/Raids/" + RaidName + "/" + getFile() + ".zip", folder);
ZipUtil.UnzipToDirectory("update/maps/Clans/Raids/" + RaidName + "/" + getFile() + ".zip", folder);
TimingManager.stop("UnzipWorld UnzipToDirectory");
}

View File

@ -92,7 +92,7 @@ public class ServerGroup
_tournament = Boolean.valueOf(data.get("tournament"));
_tournamentPoints = Boolean.valueOf(data.get("tournamentPoints"));
_hardMaxPlayerCap = Boolean.valueOf(data.get("hardMaxPlayerCap"));
_games = data.get("games");
_games = data.getOrDefault("games", "Smash");
_modes = data.get("modes");
_boosterGroup = data.get("boosterGroup");
_serverType = data.getOrDefault("serverType", "dedicated");

View File

@ -219,6 +219,8 @@ public class Arcade extends JavaPlugin
//Updates
require(Updater.class);
MinecraftServer.getServer().getPropertyManager().setProperty("debug", false);
SpigotConfig.debug = false;
}

View File

@ -479,6 +479,8 @@ public abstract class Game extends ListenerComponent implements Lifetimed
_teamModule = new GameTeamModule();
_teamModule.register(this);
/*
registerDebugCommand("kit", Perm.DEBUG_COMMANDS, PermissionGroup.ADMIN, (caller, args) ->
{
String kit = Arrays.stream(args).collect(Collectors.joining(" "));
@ -504,6 +506,7 @@ public abstract class Game extends ListenerComponent implements Lifetimed
Announce(C.cWhiteB + caller.getName() + C.cAquaB + " reset cooldowns!");
});
*/
}
// You should never use this so please don't. Use Module.register instead

View File

@ -314,6 +314,7 @@ public class GameHostManager implements Listener
_host = event.getPlayer();
_hostRank = Manager.GetClients().Get(_host).getPrimaryGroup();
System.out.println("Game Host Joined.");
giveAdminItem(event.getPlayer());
//Limit player count!
if (Manager.GetServerConfig().MaxPlayers > getMaxPlayerCap())
@ -430,9 +431,6 @@ public class GameHostManager implements Listener
private void giveAdminItem(Player player)
{
if (Manager.GetGame() == null)
return;
if (UtilGear.isMat(player.getInventory().getItem(8), Material.SPECKLED_MELON))
return;

View File

@ -177,7 +177,7 @@ public class WorldData
TimingManager.stop("UnzipWorld creating folders");
TimingManager.start("UnzipWorld UnzipToDirectory");
ZipUtil.UnzipToDirectory("../../update/maps/" + Game.getName() + "/" + GetFile() + ".zip", folder);
ZipUtil.UnzipToDirectory("update/maps/" + Game.getName() + "/" + GetFile() + ".zip", folder);
TimingManager.stop("UnzipWorld UnzipToDirectory");
}