mirror of
https://github.com/RonanPlugins/BetterRTP.git
synced 2026-11-27 16:24:33 +00:00
small patch
This commit is contained in:
1 parent
86b2e3508b
commit
15fc3eba67
8 files changed
+15
-117
No files matched your search
@@ -49,9 +49,10 @@ public interface PermissionCheck {
|
||||
|
||||
String getNode();
|
||||
|
||||
@Getter
|
||||
class PermissionResult {
|
||||
@Getter private final boolean passed;
|
||||
@Getter private final String string;
|
||||
private final boolean passed;
|
||||
private final String string;
|
||||
PermissionResult(String string, boolean passed) {
|
||||
this.passed = passed;
|
||||
this.string = string;
|
||||
|
||||
@@ -2,6 +2,7 @@ package me.SuperRonanCraft.BetterRTP.references;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum PermissionNode implements PermissionCheck {
|
||||
|
||||
ADMIN("admin"),
|
||||
@@ -25,7 +26,7 @@ public enum PermissionNode implements PermissionCheck {
|
||||
DEVELOPER("DEVELOPER_PERM"),
|
||||
;
|
||||
|
||||
@Getter private final String node;
|
||||
private final String node;
|
||||
|
||||
PermissionNode(String node) {
|
||||
this.node = PermissionCheck.getPrefix() + node;
|
||||
|
||||
@@ -16,93 +16,3 @@ public class Permissions {
|
||||
}
|
||||
|
||||
}
|
||||
//Moved to PermissionNode.NODE
|
||||
/*private final String pre = "betterrtp.";
|
||||
|
||||
public boolean getUse(CommandSender sendi) {
|
||||
return checkPerm(pre + "use", sendi);
|
||||
}
|
||||
|
||||
public boolean getBypassEconomy(CommandSender sendi) {
|
||||
return checkPerm(pre + "bypass.economy", sendi);
|
||||
}
|
||||
|
||||
public boolean getBypassHunger(CommandSender sendi) {
|
||||
return checkPerm(pre + "bypass.hunger", sendi);
|
||||
}
|
||||
|
||||
public boolean getBypassCooldown(CommandSender sendi) {
|
||||
return checkPerm(pre + "bypass.cooldown", sendi);
|
||||
}
|
||||
|
||||
public boolean getBypassDelay(CommandSender sendi) {
|
||||
return checkPerm(pre + "bypass.delay", sendi);
|
||||
}
|
||||
|
||||
public boolean getReload(CommandSender sendi) {
|
||||
return checkPerm(pre + "reload", sendi);
|
||||
}
|
||||
|
||||
public boolean getSettings(CommandSender sendi) {
|
||||
return checkPerm(pre + "settings", sendi);
|
||||
}
|
||||
|
||||
public boolean getInfo(CommandSender sendi) {
|
||||
return checkPerm(pre + "info", sendi);
|
||||
}
|
||||
|
||||
public boolean getUpdate(CommandSender sendi) {
|
||||
return checkPerm(pre + "updater", sendi);
|
||||
}
|
||||
|
||||
public boolean getRtpOther(CommandSender sendi) {
|
||||
return checkPerm(pre + "player", sendi);
|
||||
}
|
||||
|
||||
public boolean getBiome(CommandSender sendi) {
|
||||
return checkPerm(pre + "biome", sendi);
|
||||
}
|
||||
|
||||
public boolean getWorld(CommandSender sendi) {
|
||||
return checkPerm(pre + "world", sendi);
|
||||
}
|
||||
|
||||
public boolean getSignCreate(CommandSender sendi) {
|
||||
return checkPerm(pre + "sign", sendi);
|
||||
}
|
||||
|
||||
public boolean getTest(CommandSender sendi) {
|
||||
return checkPerm(pre + "test", sendi);
|
||||
}
|
||||
|
||||
public boolean getVersion(CommandSender sendi) {
|
||||
return checkPerm(pre + "version", sendi);
|
||||
}
|
||||
|
||||
public boolean getAWorld(CommandSender sendi, String world) {
|
||||
if (checkPerm(pre + "world.*", sendi))
|
||||
return true;
|
||||
else if (world == null) {
|
||||
for (World w : Bukkit.getWorlds())
|
||||
if (checkPerm(pre + "world." + w.getName(), sendi))
|
||||
return true;
|
||||
} else
|
||||
return checkPerm(pre + "world." + world, sendi);
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean getEdit(CommandSender sendi) {
|
||||
return checkPerm(pre + "edit", sendi);
|
||||
}
|
||||
|
||||
public boolean getLocation(CommandSender sendi) {
|
||||
return checkPerm(pre + "location", sendi);
|
||||
}
|
||||
|
||||
public boolean getLocation(CommandSender sendi, String location) {
|
||||
return checkPerm(pre + "location." + location, sendi);
|
||||
}
|
||||
|
||||
public boolean getPermissionGroup(CommandSender sendi, String group) {
|
||||
return checkPerm(pre + "group." + group, sendi);
|
||||
}*/
|
||||
+1
-2
@@ -17,8 +17,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.*;
|
||||
|
||||
public class WorldPlayer implements RTPWorld, RTPWorld_Defaulted {
|
||||
private boolean useWorldborder;
|
||||
private boolean RTPOnDeath;
|
||||
private boolean useWorldborder, RTPOnDeath;
|
||||
private int CenterX, CenterZ, maxRad, minRad, price, min_y, max_y;
|
||||
private long cooldown;
|
||||
private List<String> Biomes;
|
||||
|
||||
@@ -28,9 +28,11 @@ public class SoftDepends {
|
||||
|
||||
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
static public class RegionPlugin {
|
||||
@Getter @Setter private boolean respecting;
|
||||
@Getter @Setter private boolean enabled;
|
||||
private boolean respecting;
|
||||
private boolean enabled;
|
||||
}
|
||||
|
||||
private void debug(String str) {
|
||||
|
||||
Reference in new issue
Block a user