Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
5e774ad874
Commit
c8c4ef694e
@ -104,7 +104,7 @@ public class TPSLimitCommand extends SWCommand implements Enable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
|
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
|
||||||
private boolean permissionCheck(Player player) {
|
protected static boolean permissionCheck(Player player) {
|
||||||
if (!Permission.hasPermission(player, Permission.WORLD)) {
|
if (!Permission.hasPermission(player, Permission.WORLD)) {
|
||||||
BauSystem.MESSAGE.send("TPSLIMIT_NO_PERMS", player);
|
BauSystem.MESSAGE.send("TPSLIMIT_NO_PERMS", player);
|
||||||
return false;
|
return false;
|
||||||
|
@ -66,6 +66,7 @@ public class TickCommand extends SWCommand {
|
|||||||
|
|
||||||
@Register(value = {"step"}, description = "TICK_STEP_HELP")
|
@Register(value = {"step"}, description = "TICK_STEP_HELP")
|
||||||
public void stepCommand(Player p, @OptionalValue("1") int ticks) { // TODO: Fix OptionalValue
|
public void stepCommand(Player p, @OptionalValue("1") int ticks) { // TODO: Fix OptionalValue
|
||||||
|
if (!TPSLimitCommand.permissionCheck(p)) return;
|
||||||
if (ticksLeft != null) {
|
if (ticksLeft != null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -79,6 +80,7 @@ public class TickCommand extends SWCommand {
|
|||||||
|
|
||||||
@Register(value = {"warp"}, description = "TICK_WARP_HELP")
|
@Register(value = {"warp"}, description = "TICK_WARP_HELP")
|
||||||
public void warpCommand(Player p, int ticks) {
|
public void warpCommand(Player p, int ticks) {
|
||||||
|
if (!TPSLimitCommand.permissionCheck(p)) return;
|
||||||
if (ticksLeft != null) {
|
if (ticksLeft != null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren