forked from SteamWar/SteamWar
Add subcommand to reload gamemodes without full softreload
This commit is contained in:
@@ -21,7 +21,10 @@ package de.steamwar.velocitycore.commands;
|
||||
|
||||
import com.velocitypowered.api.proxy.server.RegisteredServer;
|
||||
import com.velocitypowered.api.proxy.server.ServerInfo;
|
||||
import de.steamwar.messages.Chatter;
|
||||
import de.steamwar.messages.Message;
|
||||
import de.steamwar.sql.UserPerm;
|
||||
import de.steamwar.velocitycore.ArenaMode;
|
||||
import de.steamwar.velocitycore.VelocityCore;
|
||||
import de.steamwar.command.SWCommand;
|
||||
import de.steamwar.command.SWCommandUtils;
|
||||
@@ -79,6 +82,14 @@ public class DevCommand extends SWCommand {
|
||||
sender.getPlayer().createConnectionRequest(server).fireAndForget();
|
||||
}
|
||||
|
||||
@Register(value = "reloadmodes")
|
||||
public void reloadModes(Chatter sender) {
|
||||
if(!sender.user().hasPerm(UserPerm.ADMINISTRATION))
|
||||
return;
|
||||
|
||||
ArenaMode.init();
|
||||
}
|
||||
|
||||
@ClassValidator(value = PlayerChatter.class, local = true)
|
||||
public TypeValidator<PlayerChatter> punishmentGuardChecker() {
|
||||
return (sender, value, messageSender) -> {
|
||||
|
||||
Reference in New Issue
Block a user