Package com.forgeessentials.util

Examples of com.forgeessentials.util.UserIdent


        line = FunctionHelper.replaceAllIgnoreCase(line, "%month%", "" + cal.get(Calendar.MONTH));
        line = FunctionHelper.replaceAllIgnoreCase(line, "%year%", "" + cal.get(Calendar.YEAR));

        //line = FunctionHelper.replaceAllIgnoreCase(line, "%rank%", FunctionHelper.getGroupRankString(playerName));

        line = FunctionHelper.replaceAllIgnoreCase(line, "%playerPrefix%", FunctionHelper.formatColors(FunctionHelper.getPlayerPrefixSuffix(new UserIdent(playerName), false)).trim());
        line = FunctionHelper.replaceAllIgnoreCase(line, "%playerSuffix%", FunctionHelper.formatColors(FunctionHelper.getPlayerPrefixSuffix(new UserIdent(playerName), true)).trim());
        line = FunctionHelper.replaceAllIgnoreCase(line, "%groupPrefix%", FunctionHelper.formatColors(FunctionHelper.getPlayerGroupPrefixSuffix(new UserIdent(playerName), false)).trim());
        line = FunctionHelper.replaceAllIgnoreCase(line, "%groupSuffix%", FunctionHelper.formatColors(FunctionHelper.getPlayerGroupPrefixSuffix(new UserIdent(playerName), true)).trim());

        // Player stuff
        EntityPlayer player = FMLCommonHandler.instance().getSidedDelegate().getServer().getConfigurationManager().func_152612_a(playerName);
        if (player != null) {
            line = FunctionHelper.replaceAllIgnoreCase(line, "%playername%", player.getDisplayName()); // username
View Full Code Here


    public boolean checkPermission(IContext context, String permissionNode)
    {
        if (contextIsConsole(context))
            return true;

        UserIdent ident = null;
        EntityPlayer player = contextGetPlayerOrCommandPlayer(context);
        WorldPoint loc = null;
        WorldArea area = null;
        int dim = 0;

        if (player != null)
        {
            ident = new UserIdent(player);
            // TODO: should be changed to context.getDimension()
            dim = player.dimension;
        }

        if (context.getTargetLocationStart() != null)
View Full Code Here

    // ------------------------------------------------------------

    @Override
    public boolean checkPermission(EntityPlayer player, String permissionNode)
    {
        UserIdent ident = new UserIdent(player);
        return checkBooleanPermission(getPermission(ident, new WorldPoint(player), null, getPlayerGroups(ident), permissionNode, false));
    }
View Full Code Here

    }

    @Override
    public String getPermissionProperty(EntityPlayer player, String permissionNode)
    {
        UserIdent ident = new UserIdent(player);
        return getPermission(ident, new WorldPoint(player), null, getPlayerGroups(ident), permissionNode, true);
    }
View Full Code Here

    }

    @SubscribeEvent(priority = EventPriority.LOW)
    public void onZoneChange(PlayerChangedZone event)
    {
        String exitMsg = APIRegistry.perms.getUserPermissionProperty(new UserIdent(event.entityPlayer), event.beforeZone, FEPermissions.ZONE_EXIT_MESSAGE);
        if (exitMsg != null)
        {
            OutputHandler.sendMessage(event.entityPlayer, FunctionHelper.formatColors(exitMsg));
        }
        String entryMsg = APIRegistry.perms.getUserPermissionProperty(new UserIdent(event.entityPlayer), event.afterZone, FEPermissions.ZONE_ENTRY_MESSAGE);
        if (entryMsg != null)
        {
            OutputHandler.sendMessage(event.entityPlayer, FunctionHelper.formatColors(entryMsg));
        }
    }
View Full Code Here

public class InventoryGrave extends InventoryBasic {
    private Grave grave;

    public InventoryGrave(Grave grave)
    {
        super(new UserIdent(grave.owner).getUsername() + "'s grave.", false, grave.getSize());
        this.grave = grave;
    }
View Full Code Here

        {
            return;
        }
        if (grave.protEnable)
        {
            UserIdent owner = new UserIdent(grave.owner);
            if (owner.hasPlayer())
            {
                //createPlayerSkull(owner.getPlayer(), worldObj, point.getX(), point.getY(), point.getZ());
                worldObj.setBlock(point.getX(), point.getY(), point.getZ(), Blocks.chest);
            }
        }
View Full Code Here

    {
      OutputHandler.chatConfirmation(sender, "Usage: /setspawn here|bed|clear");
    }
    else
    {
      UserIdent ident = new UserIdent(sender);
      switch (args[0].toLowerCase()) {
      case "here":
        APIRegistry.perms.setPlayerPermissionProperty(ident, FEPermissions.SPAWN, new WorldPoint(sender).toString());
        break;
      case "bed":
View Full Code Here

                    return;
                }

                if (!map.containsKey(args[1]))
        {
          Integer prop = APIRegistry.perms.getUserPermissionPropertyInt(new UserIdent(sender), PERM_LIMIT_PROP);
          if (prop == null || prop == -1)
          {
            map.put(args[1], new PWarp(sender.getPersistentID().toString(), args[1], new WarpPoint(sender)));
            OutputHandler.chatConfirmation(sender, "Personal warp sucessfully added.");
          }
View Full Code Here

  private String getLimit(String target)
  {
    if (target.startsWith("p:"))
    {
      return APIRegistry.perms.getUserPermissionProperty(new UserIdent(target.replaceFirst("p:", "")), PERM_LIMIT_PROP);
    }
    else if (target.startsWith("g:"))
    {
      return APIRegistry.perms.getUserPermissionProperty(new UserIdent(target.replaceFirst("g:", "")), PERM_LIMIT_PROP);
    }
    else
    {
      return "";
    }
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.