Update Upstream

This commit is contained in:
Spottedleaf
2019-05-05 19:58:04 -07:00
parent 52cd8744e0
commit f9f71eb14e
321 changed files with 809 additions and 856 deletions

View File

@@ -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