mirror of
https://github.com/GTNewHorizons/StructureLib.git
synced 2026-11-18 19:29:19 +00:00
Spotless apply
This commit is contained in:
1 parent
dfe910ebd3
commit
b4b6f4e5eb
4 files changed
+124
-93
No files matched your search
@@ -1,8 +1,9 @@
|
||||
package com.gtnewhorizon.structurelib.xmod;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import serverutils.data.ClaimedChunks;
|
||||
import serverutils.lib.data.ForgePlayer;
|
||||
import serverutils.lib.data.ForgeTeam;
|
||||
@@ -13,11 +14,15 @@ public class ServerUtilitiesCompat {
|
||||
|
||||
@Optional.Method(modid = "serverutilities")
|
||||
public static boolean checkPermission(World world, EntityPlayer actor, int x, int z) {
|
||||
final ForgeTeam owningTeam = ClaimedChunks.instance.getChunkTeam(new ChunkDimPos(x >> 4, z >> 4, world.provider.dimensionId));
|
||||
final ForgeTeam owningTeam = ClaimedChunks.instance
|
||||
.getChunkTeam(new ChunkDimPos(x >> 4, z >> 4, world.provider.dimensionId));
|
||||
if (owningTeam == null) {
|
||||
return true;
|
||||
}
|
||||
final ForgePlayer currentPlayer = new ForgePlayer(Universe.get(), actor.getUniqueID(), actor.getCommandSenderName());
|
||||
final ForgePlayer currentPlayer = new ForgePlayer(
|
||||
Universe.get(),
|
||||
actor.getUniqueID(),
|
||||
actor.getCommandSenderName());
|
||||
return owningTeam.isAlly(currentPlayer) || owningTeam.isMember(currentPlayer);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user