Fixed OPs not having global permissions on secured storage systems
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
- Fixed network nodes not respecting redstone mode (raoulvdberge)
|
- Fixed network nodes not respecting redstone mode (raoulvdberge)
|
||||||
- Fixed "Clear" and "Create Pattern" buttons not working correctly when using Grid Filter tabs (raoulvdberge)
|
- Fixed "Clear" and "Create Pattern" buttons not working correctly when using Grid Filter tabs (raoulvdberge)
|
||||||
- Fixed Wrench in Dismantling Mode voiding Storage Block contents (raoulvdberge)
|
- Fixed Wrench in Dismantling Mode voiding Storage Block contents (raoulvdberge)
|
||||||
|
- Fixed OPs not having global permissions on secured storage systems (raoulvdberge)
|
||||||
|
|
||||||
### 1.4
|
### 1.4
|
||||||
- Added Security Manager (raoulvdberge)
|
- Added Security Manager (raoulvdberge)
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import com.raoulvdberge.refinedstorage.api.network.security.ISecurityCardContain
|
|||||||
import com.raoulvdberge.refinedstorage.api.network.security.ISecurityManager;
|
import com.raoulvdberge.refinedstorage.api.network.security.ISecurityManager;
|
||||||
import com.raoulvdberge.refinedstorage.api.network.security.Permission;
|
import com.raoulvdberge.refinedstorage.api.network.security.Permission;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.server.management.UserListOps;
|
||||||
|
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -22,7 +24,9 @@ public class SecurityManager implements ISecurityManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasPermission(Permission permission, EntityPlayer player) {
|
public boolean hasPermission(Permission permission, EntityPlayer player) {
|
||||||
if (cards.isEmpty()) {
|
UserListOps ops = FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getOppedPlayers();
|
||||||
|
|
||||||
|
if (cards.isEmpty() || ops.getEntry(player.getGameProfile()) != null) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user