use ConcurrentHashMap

Dieser Commit ist enthalten in:
dordsor21 2020-10-01 16:48:02 +01:00
Ursprung 40717c23c4
Commit 197e08a937
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B

Datei anzeigen

@ -1,15 +1,15 @@
package com.sk89q.worldedit.bukkit; package com.sk89q.worldedit.bukkit;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.permissions.PermissionAttachment; import org.bukkit.permissions.PermissionAttachment;
public class BukkitPermissionAttachmentManager { public class BukkitPermissionAttachmentManager {
private final WorldEditPlugin plugin; private final WorldEditPlugin plugin;
private final Map<Player, PermissionAttachment> attachments = new HashMap<>(); private final Map<Player, PermissionAttachment> attachments = new ConcurrentHashMap<>();
public BukkitPermissionAttachmentManager(WorldEditPlugin plugin) { public BukkitPermissionAttachmentManager(WorldEditPlugin plugin) {
this.plugin = plugin; this.plugin = plugin;