Mirror von
https://github.com/Moulberry/AxiomPaperPlugin.git
synchronisiert 2024-11-14 12:10:05 +01:00
Fix backwards compatibility
Dieser Commit ist enthalten in:
Ursprung
470b443ced
Commit
7fcdbcb9d1
@ -307,12 +307,12 @@ public class AxiomPaper extends JavaPlugin implements Listener {
|
||||
}
|
||||
|
||||
public boolean hasAxiomPermission(Player player) {
|
||||
return hasAxiomPermission(player, null);
|
||||
return hasAxiomPermission(player, null, false);
|
||||
}
|
||||
|
||||
public boolean hasAxiomPermission(Player player, String permission) {
|
||||
public boolean hasAxiomPermission(Player player, String permission, boolean strict) {
|
||||
if (player.hasPermission("axiom.*") || player.isOp()) {
|
||||
return true;
|
||||
return !strict || permission == null || player.hasPermission("axiom.all") || player.hasPermission(permission);
|
||||
} else if (permission != null && !player.hasPermission(permission)) {
|
||||
return false;
|
||||
}
|
||||
@ -320,11 +320,15 @@ public class AxiomPaper extends JavaPlugin implements Listener {
|
||||
}
|
||||
|
||||
public boolean canUseAxiom(Player player) {
|
||||
return canUseAxiom(player, null);
|
||||
return canUseAxiom(player, null, false);
|
||||
}
|
||||
|
||||
public boolean canUseAxiom(Player player, String permission) {
|
||||
return activeAxiomPlayers.contains(player.getUniqueId()) && hasAxiomPermission(player, permission);
|
||||
return canUseAxiom(player, permission, false);
|
||||
}
|
||||
|
||||
public boolean canUseAxiom(Player player, String permission, boolean strict) {
|
||||
return activeAxiomPlayers.contains(player.getUniqueId()) && hasAxiomPermission(player, permission, strict);
|
||||
}
|
||||
|
||||
public @Nullable RateLimiter getBlockBufferRateLimiter(UUID uuid) {
|
||||
|
@ -35,7 +35,7 @@ public class DeleteEntityPacketListener implements PluginMessageListener {
|
||||
}
|
||||
|
||||
private void process(Player player, byte[] message) {
|
||||
if (!this.plugin.canUseAxiom(player, "axiom.entity.delete")) {
|
||||
if (!this.plugin.canUseAxiom(player, "axiom.entity.delete", true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ public class ManipulateEntityPacketListener implements PluginMessageListener {
|
||||
}
|
||||
|
||||
private void process(Player player, byte[] message) {
|
||||
if (!this.plugin.canUseAxiom(player, "axiom.entity.manipulate")) {
|
||||
if (!this.plugin.canUseAxiom(player, "axiom.entity.manipulate", true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ public class MarkerNbtRequestPacketListener implements PluginMessageListener {
|
||||
}
|
||||
|
||||
private void process(Player player, byte[] message) {
|
||||
if (!this.plugin.canUseAxiom(player, "axiom.entity.manipulate")) {
|
||||
if (!this.plugin.canUseAxiom(player, "axiom.entity.manipulate", true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ public class SpawnEntityPacketListener implements PluginMessageListener {
|
||||
}
|
||||
|
||||
private void process(Player player, byte[] message) {
|
||||
if (!this.plugin.canUseAxiom(player, "axiom.entity.spawn")) {
|
||||
if (!this.plugin.canUseAxiom(player, "axiom.entity.spawn", true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -10,9 +10,11 @@ softdepend:
|
||||
- WorldGuard
|
||||
- PlotSquared
|
||||
permissions:
|
||||
axiom.*:
|
||||
axiom.all:
|
||||
description: Allows use of all default Axiom features
|
||||
default: op
|
||||
children:
|
||||
axiom.*: true
|
||||
axiom.use:
|
||||
description: Allows basic use of axiom
|
||||
default: op
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren