mirror of
https://github.com/PryPurity/WorldBorder.git
synced 2024-09-27 03:52:37 +02:00
New command /wb bypasslist, which outputs a list of all players who have border bypass enabled. Requires new permission "worldborder.bypasslist".
This commit is contained in:
parent
541facb5db
commit
567385ff1c
@ -355,6 +355,14 @@ public class Config
|
|||||||
setPlayerBypass(player, !isPlayerBypassing(player));
|
setPlayerBypass(player, !isPlayerBypassing(player));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getPlayerBypassList()
|
||||||
|
{
|
||||||
|
if (bypassPlayers.isEmpty())
|
||||||
|
return "<none>";
|
||||||
|
String newString = bypassPlayers.toString();
|
||||||
|
return newString.substring(1, newString.length() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static boolean isBorderTimerRunning()
|
public static boolean isBorderTimerRunning()
|
||||||
|
@ -787,6 +787,14 @@ public class WBCommand implements CommandExecutor
|
|||||||
sender.sendMessage("Border bypass is now " + enabledColored(bypassing) + ".");
|
sender.sendMessage("Border bypass is now " + enabledColored(bypassing) + ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// "bypasslist" command from player or console
|
||||||
|
else if (split.length == 1 && split[0].equalsIgnoreCase("bypasslist"))
|
||||||
|
{
|
||||||
|
if (!Config.HasPermission(player, "bypasslist")) return true;
|
||||||
|
|
||||||
|
sender.sendMessage("Players with border bypass enabled: " + Config.getPlayerBypassList());
|
||||||
|
}
|
||||||
|
|
||||||
// we couldn't decipher any known commands, so show help
|
// we couldn't decipher any known commands, so show help
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -850,6 +858,7 @@ public class WBCommand implements CommandExecutor
|
|||||||
}
|
}
|
||||||
if (page == 0 || page == 4)
|
if (page == 0 || page == 4)
|
||||||
{
|
{
|
||||||
|
sender.sendMessage(cmd+" bypasslist " + clrDesc + " - list players with border bypass enabled.");
|
||||||
sender.sendMessage(cmd+" portal " + clrReq + "<on|off>" + clrDesc + " - turn portal redirection on or off.");
|
sender.sendMessage(cmd+" portal " + clrReq + "<on|off>" + clrDesc + " - turn portal redirection on or off.");
|
||||||
sender.sendMessage(cmd+" reload" + clrDesc + " - re-load data from config.yml.");
|
sender.sendMessage(cmd+" reload" + clrDesc + " - re-load data from config.yml.");
|
||||||
sender.sendMessage(cmd+" debug " + clrReq + "<on|off>" + clrDesc + " - turn console debug output on or off.");
|
sender.sendMessage(cmd+" debug " + clrReq + "<on|off>" + clrDesc + " - turn console debug output on or off.");
|
||||||
|
@ -32,6 +32,7 @@ commands:
|
|||||||
/<command> [world] fill [freq] [pad] [force] - generate world to border.
|
/<command> [world] fill [freq] [pad] [force] - generate world to border.
|
||||||
/<command> [world] trim [freq] [pad] - trim world outside of border.
|
/<command> [world] trim [freq] [pad] - trim world outside of border.
|
||||||
/<command> bypass [player] [on/off] - let player go beyond border.
|
/<command> bypass [player] [on/off] - let player go beyond border.
|
||||||
|
/<command> bypasslist - list players with border bypass enabled.
|
||||||
/<command> remount <amount> - delay before remounting after knockback.
|
/<command> remount <amount> - delay before remounting after knockback.
|
||||||
/<command> dynmap <on/off> - turn DynMap border display on or off.
|
/<command> dynmap <on/off> - turn DynMap border display on or off.
|
||||||
/<command> dynmapmsg <text> - DynMap border labels will show this.
|
/<command> dynmapmsg <text> - DynMap border labels will show this.
|
||||||
@ -59,6 +60,7 @@ permissions:
|
|||||||
worldborder.dynmap: true
|
worldborder.dynmap: true
|
||||||
worldborder.dynmapmsg: true
|
worldborder.dynmapmsg: true
|
||||||
worldborder.bypass: true
|
worldborder.bypass: true
|
||||||
|
worldborder.bypasslist: true
|
||||||
worldborder.wrap: true
|
worldborder.wrap: true
|
||||||
worldborder.portal: true
|
worldborder.portal: true
|
||||||
worldborder.remount: true
|
worldborder.remount: true
|
||||||
@ -128,3 +130,6 @@ permissions:
|
|||||||
worldborder.bypass:
|
worldborder.bypass:
|
||||||
description: Can enable bypass mode to go beyond the border
|
description: Can enable bypass mode to go beyond the border
|
||||||
default: op
|
default: op
|
||||||
|
worldborder.bypasslist:
|
||||||
|
description: Can get list of players with border bypass enabled
|
||||||
|
default: op
|
||||||
|
Loading…
Reference in New Issue
Block a user