mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 04:02:06 -07:00
Update Upstream
This commit is contained in:
@@ -18,7 +18,7 @@ Optimized it to simply be a single get call cutting permission map
|
||||
lookups in half.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/permissions/PermissibleBase.java b/src/main/java/org/bukkit/permissions/PermissibleBase.java
|
||||
index 27c14c0f..72fff64e 100644
|
||||
index 497775f7..c94e4cdb 100644
|
||||
--- a/src/main/java/org/bukkit/permissions/PermissibleBase.java
|
||||
+++ b/src/main/java/org/bukkit/permissions/PermissibleBase.java
|
||||
@@ -0,0 +0,0 @@ public class PermissibleBase implements Permissible {
|
||||
@@ -50,6 +50,7 @@ index 27c14c0f..72fff64e 100644
|
||||
return perm.getDefault().getValue(isOp());
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
- public PermissionAttachment addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value) {
|
||||
+ public synchronized PermissionAttachment addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value) { // Paper - synchronized
|
||||
@@ -57,8 +58,8 @@ index 27c14c0f..72fff64e 100644
|
||||
throw new IllegalArgumentException("Permission name cannot be null");
|
||||
} else if (plugin == null) {
|
||||
@@ -0,0 +0,0 @@ public class PermissibleBase implements Permissible {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
- public PermissionAttachment addAttachment(@NotNull Plugin plugin) {
|
||||
+ public synchronized PermissionAttachment addAttachment(@NotNull Plugin plugin) { // Paper - synchronized
|
||||
@@ -66,26 +67,26 @@ index 27c14c0f..72fff64e 100644
|
||||
throw new IllegalArgumentException("Plugin cannot be null");
|
||||
} else if (!plugin.isEnabled()) {
|
||||
@@ -0,0 +0,0 @@ public class PermissibleBase implements Permissible {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
- public void removeAttachment(@NotNull PermissionAttachment attachment) {
|
||||
+ public synchronized void removeAttachment(@NotNull PermissionAttachment attachment) { // Paper - synchronized
|
||||
if (attachment == null) {
|
||||
throw new IllegalArgumentException("Attachment cannot be null");
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class PermissibleBase implements Permissible {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
- public void recalculatePermissions() {
|
||||
+ public synchronized void recalculatePermissions() { // Paper - synchronized
|
||||
clearPermissions();
|
||||
Set<Permission> defaults = Bukkit.getServer().getPluginManager().getDefaultPermissions(isOp());
|
||||
Bukkit.getServer().getPluginManager().subscribeToDefaultPerms(isOp(), parent);
|
||||
@@ -0,0 +0,0 @@ public class PermissibleBase implements Permissible {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
- public PermissionAttachment addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value, int ticks) {
|
||||
+ public synchronized PermissionAttachment addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value, int ticks) { // Paper
|
||||
@@ -93,8 +94,8 @@ index 27c14c0f..72fff64e 100644
|
||||
throw new IllegalArgumentException("Permission name cannot be null");
|
||||
} else if (plugin == null) {
|
||||
@@ -0,0 +0,0 @@ public class PermissibleBase implements Permissible {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
- public PermissionAttachment addAttachment(@NotNull Plugin plugin, int ticks) {
|
||||
+ public synchronized PermissionAttachment addAttachment(@NotNull Plugin plugin, int ticks) { // Paper - synchronized
|
||||
@@ -102,8 +103,8 @@ index 27c14c0f..72fff64e 100644
|
||||
throw new IllegalArgumentException("Plugin cannot be null");
|
||||
} else if (!plugin.isEnabled()) {
|
||||
@@ -0,0 +0,0 @@ public class PermissibleBase implements Permissible {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
- public Set<PermissionAttachmentInfo> getEffectivePermissions() {
|
||||
+ public synchronized Set<PermissionAttachmentInfo> getEffectivePermissions() { // Paper - synchronized
|
||||
|
Reference in New Issue
Block a user