File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 11package com .fastasyncworldedit .bukkit ;
22
33import com .sk89q .worldedit .bukkit .WorldEditPlugin ;
4+ import org .bukkit .OfflinePlayer ;
45import org .bukkit .entity .Player ;
56import org .bukkit .permissions .PermissibleBase ;
67import org .bukkit .permissions .PermissionAttachment ;
@@ -19,7 +20,10 @@ public BukkitPermissionAttachmentManager(WorldEditPlugin plugin) {
1920 this .plugin = plugin ;
2021 }
2122
22- public PermissionAttachment getOrAddAttachment (@ Nullable final Player p ) {
23+ public PermissionAttachment getOrAddAttachment (@ Nullable Player p ) {
24+ if (p instanceof OfflinePlayer offline ) {
25+ p = offline .getPlayer ();
26+ }
2327 if (p == null ) {
2428 return null ;
2529 }
You can’t perform that action at this time.
0 commit comments