mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-22 13:09:47 +00:00
Fix CoFH-locked drawers crashing clients
This commit is contained in:
1 parent
ed6e5a4000
commit
d8c53d2060
1 file changed
+3
-4
+3
-4
@@ -5,7 +5,6 @@ import com.jaquadro.minecraft.storagedrawers.api.storage.attribute.IProtectable;
|
||||
import com.jaquadro.minecraft.storagedrawers.integration.ThermalFoundation;
|
||||
import com.jaquadro.minecraft.storagedrawers.security.DefaultSecurityProvider;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
public class CoFHSecurityProvider implements ISecurityProvider
|
||||
{
|
||||
@@ -31,9 +30,9 @@ public class CoFHSecurityProvider implements ISecurityProvider
|
||||
if (target.getOwner() == null)
|
||||
return true;
|
||||
|
||||
GameProfile ownerProfile = MinecraftServer.getServer().func_152358_ax().func_152652_a(target.getOwner());
|
||||
if (ownerProfile == null)
|
||||
return false;
|
||||
GameProfile ownerProfile = (profile.getId().equals(target.getOwner()))
|
||||
? new GameProfile(profile.getId(), profile.getName())
|
||||
: new GameProfile(target.getOwner(), null);
|
||||
|
||||
return foundation.playerHasAccess(profile.getName(), ownerProfile);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user