Package com.forgeessentials.util

Examples of com.forgeessentials.util.UserIdent


    public void entityInteractEvent(EntityInteractEvent e)
    {
        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)
View Full Code Here


    public void playerChangedZoneEvent(PlayerChangedZone e)
    {
        if (FMLCommonHandler.instance().getEffectiveSide().isClient())
            return;
        EntityPlayerMP player = (EntityPlayerMP) e.entityPlayer;
        UserIdent ident = new UserIdent(player);

        checkPlayerInventory(player);

        GameType gm = stringToGameType(APIRegistry.perms.getUserPermissionProperty(ident, ModuleProtection.PERM_GAMEMODE));
        if (gm == GameType.NOT_SET)
View Full Code Here

        }
    }

    public static GameType getGamemode(EntityPlayer player)
    {
        return stringToGameType(APIRegistry.perms.getUserPermissionProperty(new UserIdent(player), ModuleProtection.PERM_GAMEMODE));
    }
View Full Code Here

        return stringToGameType(APIRegistry.perms.getUserPermissionProperty(new UserIdent(player), ModuleProtection.PERM_GAMEMODE));
    }

    public static boolean anyCreativeModeAtPoint(EntityPlayer player, WorldPoint point)
    {
        if (stringToGameType(APIRegistry.perms.getUserPermissionProperty(new UserIdent(player), point, ModuleProtection.PERM_GAMEMODE)) == GameType.CREATIVE)
            return true;
        for (String group : APIRegistry.perms.getServerZone().getGroups())
        {
            if (stringToGameType(APIRegistry.perms.getGroupPermissionProperty(group, point, ModuleProtection.PERM_GAMEMODE)) == GameType.CREATIVE)
                return true;
View Full Code Here

    public static boolean isInventoryItemBanned(EntityPlayer player, ItemStack stack)
    {
        String permission = ModuleProtection.PERM_INVENTORY + "." + stack.getUnlocalizedName() + "." + stack.getItemDamage();
        // if (ModuleProtection.isDebugMode(player))
        // OutputHandler.chatNotification(player, permission);
        return !APIRegistry.perms.checkUserPermission(new UserIdent(player), permission);
    }
View Full Code Here

                    if (username == null && uuid == null)
                    {
                        OutputHandler.felog.severe("User identification missing in " + path.getAbsolutePath());
                        continue;
                    }
                    UserIdent ident = new UserIdent(uuid, username);

                    // Load permissions
                    PermissionList permissions = zone.getOrCreatePlayerPermissions(ident);
                    for (Entry permission : p.entrySet())
                    {
View Full Code Here

TOP

Related Classes of com.forgeessentials.util.UserIdent

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.