MassiveCore - PermUtil --> PermissionUtil

This commit is contained in:
Olof Larsson 2016-05-21 12:36:48 +02:00
parent 6caa385eb5
commit f7183d440e
No known key found for this signature in database
GPG Key ID: BBEF14F97DA52474
7 changed files with 12 additions and 12 deletions

View File

@ -11,7 +11,7 @@ import com.massivecraft.massivecore.command.editor.annotation.EditorType;
import com.massivecraft.massivecore.command.type.TypeMillisDiff;
import com.massivecraft.massivecore.store.Entity;
import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.util.PermUtil;
import com.massivecraft.massivecore.util.PermissionUtil;
import com.massivecraft.massivecore.util.TimeUnit;
import com.massivecraft.massivecore.xlib.mongodb.WriteConcern;
@ -80,7 +80,7 @@ public class MassiveCoreMConf extends Entity<MassiveCoreMConf>
public int getTpdelay(Permissible permissible)
{
Integer ret = PermUtil.pickFirstVal(permissible, permissionToTpdelay);
Integer ret = PermissionUtil.pickFirstVal(permissible, permissionToTpdelay);
if (ret == null) ret = 0;
return ret;
}

View File

@ -2,7 +2,7 @@ package com.massivecraft.massivecore;
import org.bukkit.permissions.Permissible;
import com.massivecraft.massivecore.util.PermUtil;
import com.massivecraft.massivecore.util.PermissionUtil;
public enum MassiveCorePerm
{
@ -73,7 +73,7 @@ public enum MassiveCorePerm
public boolean has(Permissible permissible, boolean informSenderIfNot)
{
return PermUtil.has(permissible, this.node, informSenderIfNot);
return PermissionUtil.has(permissible, this.node, informSenderIfNot);
}
public boolean has(Permissible permissible)

View File

@ -31,7 +31,7 @@ import com.massivecraft.massivecore.command.type.Type;
import com.massivecraft.massivecore.mixin.MixinMessage;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.predicate.PredicateStartsWithIgnoreCase;
import com.massivecraft.massivecore.util.PermUtil;
import com.massivecraft.massivecore.util.PermissionUtil;
import com.massivecraft.massivecore.util.Txt;
public class MassiveCommand implements Active, PluginIdentifiableCommand
@ -739,7 +739,7 @@ public class MassiveCommand implements Active, PluginIdentifiableCommand
String perm = this.getDescPermission();
if (perm != null)
{
String pdesc = PermUtil.getDescription(perm);
String pdesc = PermissionUtil.getDescription(perm);
if (pdesc != null)
{
return pdesc;

View File

@ -3,7 +3,7 @@ package com.massivecraft.massivecore.command.requirement;
import org.bukkit.command.CommandSender;
import com.massivecraft.massivecore.command.MassiveCommand;
import com.massivecraft.massivecore.util.PermUtil;
import com.massivecraft.massivecore.util.PermissionUtil;
public class RequirementHasPerm extends RequirementAbstract
{
@ -36,7 +36,7 @@ public class RequirementHasPerm extends RequirementAbstract
@Override
public String createErrorMessage(CommandSender sender, MassiveCommand command)
{
return PermUtil.getDeniedMessage(this.perm);
return PermissionUtil.getDeniedMessage(this.perm);
}
}

View File

@ -16,7 +16,7 @@ import com.massivecraft.massivecore.mixin.MixinPlayed;
import com.massivecraft.massivecore.mixin.MixinVisibility;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.util.IdUtil;
import com.massivecraft.massivecore.util.PermUtil;
import com.massivecraft.massivecore.util.PermissionUtil;
public abstract class SenderEntity<E extends SenderEntity<E>> extends Entity<E> implements Named
{
@ -75,7 +75,7 @@ public abstract class SenderEntity<E extends SenderEntity<E>> extends Entity<E>
T ret = super.convertGet(value, defaultValue);
// Permission Requirement
if ( ! Objects.equal(value, defaultValue) && ! PermUtil.has(this.getSender(), permission)) return defaultValue;
if ( ! Objects.equal(value, defaultValue) && ! PermissionUtil.has(this.getSender(), permission)) return defaultValue;
// Return
return ret;

View File

@ -13,7 +13,7 @@ import com.massivecraft.massivecore.Lang;
import com.massivecraft.massivecore.MassiveCore;
import com.massivecraft.massivecore.event.EventMassiveCorePermissionDeniedFormat;
public class PermUtil
public class PermissionUtil
{
// -------------------------------------------- //
// HAS

View File

@ -126,7 +126,7 @@ public class SignUtil
if ( ! title.equalsIgnoreCase(lenientTitle)) return false;
// ... verify that the player has permission to create that type of sign ...
if ( ! PermUtil.has(player, permissionNode, true))
if ( ! PermissionUtil.has(player, permissionNode, true))
{
event.setCancelled(true);
return false;