Package com.forgeessentials.util.selections

Examples of com.forgeessentials.util.selections.WorldPoint


        x = mop.blockX;
        y = mop.blockY;
        z = mop.blockZ;

        WorldPoint point = new WorldPoint(player.dimension, x, y, z);
        if (!APIRegistry.perms.checkUserPermission(new UserIdent(player), point, getPermissionNode()))
        {
            OutputHandler.chatError(player, "Insufficient permissions.");
            return;
        }
View Full Code Here


        {
            if (!(player.getCurrentEquippedItem().getItem().getUnlocalizedName().equals(info.getWandID()))) return;
            if (player.getCurrentEquippedItem().getItemDamage() != info.getWandDmg()) return;
        }

        WorldPoint point = new WorldPoint(player.dimension, event.x, event.y, event.z);
        if (!APIRegistry.perms.checkUserPermission(new UserIdent(player), point, "fe.core.pos"))
        {
            OutputHandler.chatError(player,
                    "You have insufficient permissions to do that. If you believe you received this message in error, please talk to a server admin.");
            return;
View Full Code Here

    // Player info
    String playerPrefix = FunctionHelper.formatColors(FunctionHelper.getPlayerPrefixSuffix(new UserIdent(event.player), false));
    String playerSuffix = FunctionHelper.formatColors(FunctionHelper.getPlayerPrefixSuffix(new UserIdent(event.player), true));
    String groupPrefix = FunctionHelper.formatColors(FunctionHelper.getPlayerGroupPrefixSuffix(new UserIdent(event.player), false));
    String groupSuffix = FunctionHelper.formatColors(FunctionHelper.getPlayerGroupPrefixSuffix(new UserIdent(event.player), true));
    String zoneID = APIRegistry.perms.getZonesAt(new WorldPoint(event.player)).get(0).getName();
    String rank = "";


        // It may be beneficial to make this a public function. -RlonRyan
        String format = ConfigChat.chatFormat;
View Full Code Here

        {
            // player -> player
            EntityPlayer target = (EntityPlayer) e.target;
            if (!APIRegistry.perms.checkUserPermission(new UserIdent(target), ModuleProtection.PERM_PVP)
                    || !APIRegistry.perms.checkUserPermission(sourceIdent, ModuleProtection.PERM_PVP)
                    || !APIRegistry.perms.checkUserPermission(sourceIdent, new WorldPoint(target), ModuleProtection.PERM_PVP))
            {
                e.setCanceled(true);
            }
        }

        // player -> entity
        Entity target = e.target;
        WorldPoint targetPos = new WorldPoint(e.target);

        String permission = ModuleProtection.PERM_DAMAGE_TO + "." + target.getClass().getSimpleName();
        if (ModuleProtection.isDebugMode(source))
            OutputHandler.chatNotification(source, permission);
        if (!APIRegistry.perms.checkUserPermission(sourceIdent, targetPos, permission))
View Full Code Here

       
        if (e.source.getEntity() instanceof EntityPlayer)
        {
            // player -> living
            EntityPlayer source = (EntityPlayer) e.source.getEntity();
            WorldPoint point = new WorldPoint(e.entityLiving);

//            String permission = ModuleProtection.PERM_DAMAGE_TO + "." + e.entityLiving.getClass().getSimpleName();
//            if (ModuleProtection.isDebugMode(source))
//                OutputHandler.chatNotification(source, permission);
//            if (!APIRegistry.perms.checkUserPermission(new UserIdent(source), point, ModuleProtection.PERM_INTERACT_ENTITY))
View Full Code Here

        Block block = e.world.getBlock(e.x, e.y, e.z);
        String permission = ModuleProtection.PERM_BREAK + "." + block.getUnlocalizedName() + "." + block.getDamageValue(e.world, e.x, e.y, e.z);
        if (ModuleProtection.isDebugMode(e.getPlayer()))
            OutputHandler.chatNotification(e.getPlayer(), permission);
        WorldPoint point = new WorldPoint(e.getPlayer().dimension, e.x, e.y, e.z);
        if (!APIRegistry.perms.checkUserPermission(new UserIdent(e.getPlayer()), point, ModuleProtection.PERM_OVERRIDE_BREAK)
                && !APIRegistry.perms.checkUserPermission(new UserIdent(e.getPlayer()), point, permission))
        {
            e.setCanceled(true);
        }
View Full Code Here

        UserIdent ident = new UserIdent(e.player);
        Block block = e.world.getBlock(e.x, e.y, e.z);
        String permission = ModuleProtection.PERM_PLACE + "." + block.getUnlocalizedName() + "." + block.getDamageValue(e.world, e.x, e.y, e.z);
        if (ModuleProtection.isDebugMode(e.player))
            OutputHandler.chatNotification(e.player, permission);
        WorldPoint point = new WorldPoint(e.player.dimension, e.x, e.y, e.z);
        if (!APIRegistry.perms.checkUserPermission(ident, point, ModuleProtection.PERM_OVERRIDE_PLACE)
                && !APIRegistry.perms.checkUserPermission(ident, point, permission))
        {
            e.setCanceled(true);
        }
View Full Code Here

        {
            Block block = e.world.getBlock(b.x, b.y, b.z);
            String permission = ModuleProtection.PERM_PLACE + "." + block.getUnlocalizedName() + "." + block.getDamageValue(e.world, e.x, e.y, e.z);
            if (ModuleProtection.isDebugMode(e.player))
                OutputHandler.chatNotification(e.player, permission);
            WorldPoint point = new WorldPoint(e.player.dimension, b.x, b.y, b.z);
            if (!APIRegistry.perms.checkUserPermission(new UserIdent(e.player), point, ModuleProtection.PERM_OVERRIDE_PLACE)
                    && !APIRegistry.perms.checkUserPermission(new UserIdent(e.player), point, permission))
            {
                e.setCanceled(true);
                return;
View Full Code Here

        if (FMLCommonHandler.instance().getEffectiveSide().isClient())
            return;

        UserIdent ident = new UserIdent(e.entityPlayer);

        WorldPoint point;
        if (e.action == RIGHT_CLICK_AIR)
        {
            MovingObjectPosition mop = FunctionHelper.getPlayerLookingSpot(e.entityPlayer);
            if (mop == null)
                point = new WorldPoint(e.entityPlayer.dimension, e.x, e.y, e.z);
            else
                point = new WorldPoint(e.entityPlayer.dimension, mop.blockX, mop.blockY, mop.blockZ);
        }
        else
            point = new WorldPoint(e.entityPlayer.dimension, e.x, e.y, e.z);

        // Check for block interaction
        if (e.action == RIGHT_CLICK_BLOCK)
        {
            Block block = e.world.getBlock(e.x, e.y, e.z);
View Full Code Here

    {
        if (FMLCommonHandler.instance().getEffectiveSide().isClient())
            return;

        UserIdent ident = new UserIdent(e.entityPlayer);
        WorldPoint point = new WorldPoint(e.entityPlayer.dimension, (int) e.target.posX, (int) e.target.posY, (int) e.target.posZ);
        String permission = ModuleProtection.PERM_INTERACT_ENTITY + "." + e.target.getClass().getSimpleName();
        if (ModuleProtection.isDebugMode(e.entityPlayer))
            OutputHandler.chatNotification(e.entityPlayer, permission);
        if (!APIRegistry.perms.checkUserPermission(ident, point, ModuleProtection.PERM_OVERRIDE_INTERACT_ENTITY)
                && !APIRegistry.perms.checkUserPermission(ident, point, ModuleProtection.PERM_INTERACT_ENTITY))
View Full Code Here

TOP

Related Classes of com.forgeessentials.util.selections.WorldPoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.