mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-04-14 07:05:54 +02:00
Command+perms rename: tempkick to denylogin and unkick to allowlogin.
Aliases are still set for commands and permissions, so this should not break things.
This commit is contained in:
parent
c99612154c
commit
e0f81b43b6
@ -15,8 +15,8 @@ import fr.neatmonster.nocheatplus.command.actions.BanCommand;
|
||||
import fr.neatmonster.nocheatplus.command.actions.KickCommand;
|
||||
import fr.neatmonster.nocheatplus.command.actions.KickListCommand;
|
||||
import fr.neatmonster.nocheatplus.command.actions.TellCommand;
|
||||
import fr.neatmonster.nocheatplus.command.actions.TempKickCommand;
|
||||
import fr.neatmonster.nocheatplus.command.actions.UnKickCommand;
|
||||
import fr.neatmonster.nocheatplus.command.actions.DenyLoginCommand;
|
||||
import fr.neatmonster.nocheatplus.command.actions.AllowLoginCommand;
|
||||
import fr.neatmonster.nocheatplus.command.actions.delay.DelayCommand;
|
||||
import fr.neatmonster.nocheatplus.command.admin.CommandsCommand;
|
||||
import fr.neatmonster.nocheatplus.command.admin.InfoCommand;
|
||||
@ -94,9 +94,9 @@ public class NoCheatPlusCommand extends BaseCommand{
|
||||
new ReloadCommand(plugin, notifyReload),
|
||||
new RemovePlayerCommand(plugin),
|
||||
new TellCommand(plugin),
|
||||
new TempKickCommand(plugin),
|
||||
new DenyLoginCommand(plugin),
|
||||
new UnexemptCommand(plugin),
|
||||
new UnKickCommand(plugin),
|
||||
new AllowLoginCommand(plugin),
|
||||
}){
|
||||
addSubCommands(cmd);
|
||||
rootLabels.add(cmd.label);
|
||||
|
@ -10,10 +10,11 @@ import fr.neatmonster.nocheatplus.NCPAPIProvider;
|
||||
import fr.neatmonster.nocheatplus.command.BaseCommand;
|
||||
import fr.neatmonster.nocheatplus.permissions.Permissions;
|
||||
|
||||
public class UnKickCommand extends BaseCommand {
|
||||
public class AllowLoginCommand extends BaseCommand {
|
||||
|
||||
public UnKickCommand(JavaPlugin plugin) {
|
||||
super(plugin, "unkick", Permissions.COMMAND_UNKICK);
|
||||
public AllowLoginCommand(JavaPlugin plugin) {
|
||||
super(plugin, "allowlogin", Permissions.COMMAND_ALLOWLOGIN,
|
||||
new String[]{"unkick"});
|
||||
}
|
||||
|
||||
@Override
|
@ -14,11 +14,11 @@ import fr.neatmonster.nocheatplus.logging.LogUtil;
|
||||
import fr.neatmonster.nocheatplus.permissions.Permissions;
|
||||
import fr.neatmonster.nocheatplus.players.DataManager;
|
||||
|
||||
public class TempKickCommand extends BaseCommand {
|
||||
public class DenyLoginCommand extends BaseCommand {
|
||||
|
||||
public TempKickCommand(JavaPlugin plugin) {
|
||||
super(plugin, "tempkick", Permissions.COMMAND_TEMPKICK,
|
||||
new String[]{"tkick", "tempban", "tban",});
|
||||
public DenyLoginCommand(JavaPlugin plugin) {
|
||||
super(plugin, "denylogin", Permissions.COMMAND_DENYLOGIN,
|
||||
new String[]{"tempkick", "tkick", "tempban", "tban",});
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -38,12 +38,12 @@ public class TempKickCommand extends BaseCommand {
|
||||
final String reason;
|
||||
if (args.length > 3) reason = AbstractCommand.join(args, 3);
|
||||
else reason = "";
|
||||
tempKick(sender, name, finalDuration, reason);
|
||||
denyLogin(sender, name, finalDuration, reason);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
protected void tempKick(CommandSender sender, String name, long duration, String reason){
|
||||
protected void denyLogin(CommandSender sender, String name, long duration, String reason){
|
||||
Player player = DataManager.getPlayer(name);
|
||||
NCPAPIProvider.getNoCheatPlusAPI().denyLogin(name, duration);
|
||||
if (player == null) return;
|
@ -20,8 +20,8 @@ public class CommandsCommand extends BaseCommand {
|
||||
final String[] moreCommands = new String[]{
|
||||
"/<command> ban [delay=(ticks)] (player) [(reason)...]: ban player",
|
||||
"/<command> kick [delay=(ticks)] (player) [(reason)...]: kick player",
|
||||
"/<command> tempkick [delay=(ticks)] (player) (minutes) [(reason)...]",
|
||||
"/<command> unkick (player): Allow a player to login again.",
|
||||
"/<command> denylogin [delay=(ticks)] (player) (minutes) [(reason)...]",
|
||||
"/<command> allowlogin (player): Allow a player to login again.",
|
||||
"/<command> kicklist: Show temporarily kicked players.",
|
||||
"/<command> tell [delay=(ticks)] (player) (message)...: tell a message",
|
||||
"/<command> delay [delay=(ticks)] (command)...: delay a command",
|
||||
|
@ -37,13 +37,13 @@ public class Permissions {
|
||||
public static final String COMMAND_VERSION = COMMAND + ".version";
|
||||
|
||||
// Auxiliary Command permissions.
|
||||
public static final String COMMAND_ALLOWLOGIN = COMMAND + ".allowlogin";
|
||||
public static final String COMMAND_BAN = COMMAND + ".ban";
|
||||
public static final String COMMAND_DELAY = COMMAND + ".delay";
|
||||
public static final String COMMAND_DENYLOGIN = COMMAND + ".denylogin";
|
||||
public static final String COMMAND_KICK = COMMAND + ".kick";
|
||||
public static final String COMMAND_KICKLIST = COMMAND + ".kicklist";
|
||||
public static final String COMMAND_TELL = COMMAND + ".tell";
|
||||
public static final String COMMAND_TEMPKICK = COMMAND + ".tempkick";
|
||||
public static final String COMMAND_UNKICK = COMMAND + ".unkick";
|
||||
|
||||
// Permissions for the individual checks.
|
||||
public static final String CHECKS = NOCHEATPLUS + ".checks";
|
||||
|
@ -289,23 +289,32 @@ permissions:
|
||||
description: Allow use of the ncp tell command.
|
||||
nocheatplus.command.delay:
|
||||
description: Allow use of the ncp delay command.
|
||||
nocheatplus.command.tempkick:
|
||||
description: Allow use of the ncp tempkick command.
|
||||
nocheatplus.command.unkick:
|
||||
description: Allow use of the ncp unkick command.
|
||||
nocheatplus.command.denylogin:
|
||||
description: Allow use of the ncp denylogin command.
|
||||
nocheatplus.command.allowlogin:
|
||||
description: Allow use of the ncp allowlogin command.
|
||||
nocheatplus.command.version:
|
||||
description: Allow use of the ncp version command.
|
||||
nocheatplus.command.removeplayer:
|
||||
description: Allow use of the ncp removeplayer command.
|
||||
nocheatplus.command.commands:
|
||||
description: Allow use of the ncp commands command.
|
||||
# Legacy:
|
||||
nocheatplus.command.tempkick:
|
||||
description: Obsolete, use nocheatplus.command.denylogin instead.
|
||||
children:
|
||||
nocheatplus.command.denylogin: true
|
||||
nocheatplus.command.unkick:
|
||||
description: Obsolete, use nocheatplus.command.allowlogin instead.
|
||||
children:
|
||||
nocheatplus.command.allowlogin: true
|
||||
|
||||
# Bypass permissions (other than checks):
|
||||
nocheatplus.bypass:
|
||||
description: Bypass other features than checks.
|
||||
children:
|
||||
nocheatplus.bypass.denylogin:
|
||||
description: Bypass the login denial, such as exists with the ncp tempkick command.
|
||||
description: Bypass the login denial, such as exists with the ncp denylogin command.
|
||||
|
||||
# Various shortcuts:
|
||||
nocheatplus.shortcut:
|
||||
@ -333,9 +342,7 @@ permissions:
|
||||
description: 'Permissions for "safe" administration, excluding rather critical operations like reload and action commands like ban/delay (arbitrary console commands!). Fit for "heavy" mods, include temp-kicking and exemptions, does bypass login-denial.'
|
||||
children:
|
||||
nocheatplus.shortcut.monitor: true
|
||||
nocheatplus.command.tempkick: true
|
||||
nocheatplus.command.kick: true
|
||||
nocheatplus.command.unkick: true
|
||||
nocheatplus.command.allowlogin: true
|
||||
nocheatplus.command.exempt: true
|
||||
nocheatplus.command.unexempt: true
|
||||
nocheatplus.command.removeplayer: true
|
||||
@ -378,71 +385,71 @@ permissions:
|
||||
|
||||
# Left in for compatibility reasons:
|
||||
nocheatplus.admin.notify:
|
||||
description: DEPRECATED, use nocheatplus.command.notify and/or nocheatplus.notify instead.
|
||||
description: Obsolete, use nocheatplus.command.notify and/or nocheatplus.notify instead.
|
||||
children:
|
||||
nocheatplus.command.notify: true
|
||||
nocheatplus.admin.reload:
|
||||
description: DEPRECATED, use nocheatplus.command.reload instead.
|
||||
description: Obsolete, use nocheatplus.command.reload instead.
|
||||
children:
|
||||
nocheatplus.command.reload: true
|
||||
nocheatplus.admin.info:
|
||||
description: DEPRECATED, use nocheatplus.command.info instead.
|
||||
description: Obsolete, use nocheatplus.command.info instead.
|
||||
children:
|
||||
nocheatplus.command.info: true
|
||||
nocheatplus.admin.exemptions:
|
||||
description: DEPRECATED, use nocheatplus.command.exemptions instead.
|
||||
description: Obsolete, use nocheatplus.command.exemptions instead.
|
||||
children:
|
||||
nocheatplus.command.exemptions: true
|
||||
nocheatplus.admin.exempt:
|
||||
description: DEPRECATED, use nocheatplus.command.exempt instead.
|
||||
description: Obsolete, use nocheatplus.command.exempt instead.
|
||||
children:
|
||||
nocheatplus.command.exempt: true
|
||||
nocheatplus.admin.unexempt:
|
||||
description: DEPRECATED, use nocheatplus.command.unexempt instead.
|
||||
description: Obsolete, use nocheatplus.command.unexempt instead.
|
||||
children:
|
||||
nocheatplus.command.unexempt: true
|
||||
nocheatplus.admin.ban:
|
||||
description: DEPRECATED, use nocheatplus.command.ban instead.
|
||||
description: Obsolete, use nocheatplus.command.ban instead.
|
||||
children:
|
||||
nocheatplus.command.ban: true
|
||||
nocheatplus.admin.kick:
|
||||
description: DEPRECATED, use nocheatplus.command.kick instead.
|
||||
description: Obsolete, use nocheatplus.command.kick instead.
|
||||
children:
|
||||
nocheatplus.command.kick: true
|
||||
nocheatplus.admin.kicklist:
|
||||
description: DEPRECATED, use nocheatplus.command.kicklist instead.
|
||||
description: Obsolete, use nocheatplus.command.kicklist instead.
|
||||
children:
|
||||
nocheatplus.command.kicklist: true
|
||||
nocheatplus.admin.lag:
|
||||
description: DEPRECATED, use nocheatplus.command.lag instead.
|
||||
description: Obsolete, use nocheatplus.command.lag instead.
|
||||
children:
|
||||
nocheatplus.command.lag: true
|
||||
nocheatplus.admin.tell:
|
||||
description: DEPRECATED, use nocheatplus.command.tell instead.
|
||||
description: Obsolete, use nocheatplus.command.tell instead.
|
||||
children:
|
||||
nocheatplus.command.tell: true
|
||||
nocheatplus.admin.delay:
|
||||
description: DEPRECATED, use nocheatplus.command.delay instead.
|
||||
description: Obsolete, use nocheatplus.command.delay instead.
|
||||
children:
|
||||
nocheatplus.command.delay: true
|
||||
nocheatplus.admin.tempkick:
|
||||
description: DEPRECATED, use nocheatplus.command.tempkick instead.
|
||||
description: Obsolete, use nocheatplus.command.denylogin instead.
|
||||
children:
|
||||
nocheatplus.command.tempkick: true
|
||||
nocheatplus.command.denylogin: true
|
||||
nocheatplus.admin.unkick:
|
||||
description: DEPRECATED, use nocheatplus.command.unkick instead.
|
||||
description: Obsolete, use nocheatplus.command.allowlogin instead.
|
||||
children:
|
||||
nocheatplus.command.unkick: true
|
||||
nocheatplus.command.allowlogin: true
|
||||
nocheatplus.admin.version:
|
||||
description: DEPRECATED, use nocheatplus.command.version instead.
|
||||
description: Obsolete, use nocheatplus.command.version instead.
|
||||
children:
|
||||
nocheatplus.command.version: true
|
||||
nocheatplus.admin.removeplayer:
|
||||
description: DEPRECATED, use nocheatplus.command.removeplayer instead.
|
||||
description: Obsolete, use nocheatplus.command.removeplayer instead.
|
||||
children:
|
||||
nocheatplus.command.removeplayer: true
|
||||
nocheatplus.admin.commands:
|
||||
description: DEPRECATED, use nocheatplus.command.commands instead.
|
||||
description: Obsolete, use nocheatplus.command.commands instead.
|
||||
children:
|
||||
nocheatplus.command.commands: true
|
||||
|
Loading…
Reference in New Issue
Block a user