mirror of
https://github.com/Brettflan/WorldBorder.git
synced 2024-11-13 05:54:03 +01: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));
|
||||
}
|
||||
|
||||
public static String getPlayerBypassList()
|
||||
{
|
||||
if (bypassPlayers.isEmpty())
|
||||
return "<none>";
|
||||
String newString = bypassPlayers.toString();
|
||||
return newString.substring(1, newString.length() - 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static boolean isBorderTimerRunning()
|
||||
|
@ -787,6 +787,14 @@ public class WBCommand implements CommandExecutor
|
||||
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
|
||||
else
|
||||
{
|
||||
@ -850,6 +858,7 @@ public class WBCommand implements CommandExecutor
|
||||
}
|
||||
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+" reload" + clrDesc + " - re-load data from config.yml.");
|
||||
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] trim [freq] [pad] - trim world outside of 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> dynmap <on/off> - turn DynMap border display on or off.
|
||||
/<command> dynmapmsg <text> - DynMap border labels will show this.
|
||||
@ -59,6 +60,7 @@ permissions:
|
||||
worldborder.dynmap: true
|
||||
worldborder.dynmapmsg: true
|
||||
worldborder.bypass: true
|
||||
worldborder.bypasslist: true
|
||||
worldborder.wrap: true
|
||||
worldborder.portal: true
|
||||
worldborder.remount: true
|
||||
@ -128,3 +130,6 @@ permissions:
|
||||
worldborder.bypass:
|
||||
description: Can enable bypass mode to go beyond the border
|
||||
default: op
|
||||
worldborder.bypasslist:
|
||||
description: Can get list of players with border bypass enabled
|
||||
default: op
|
||||
|
Loading…
Reference in New Issue
Block a user