Initial Commit
This commit is contained in:
parent
8b08c4f72a
commit
1fd3220e5e
@ -53,10 +53,12 @@ public class CmdInviteAlt extends FCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
Access access = myFaction.getAccess(target, PermissableAction.INVITEALT);
|
||||
if (access == Access.DENY || (access == Access.UNDEFINED && !assertMinRole(Role.MODERATOR))) {
|
||||
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "invitealt");
|
||||
return;
|
||||
if (!fme.isAdminBypassing()) {
|
||||
Access access = myFaction.getAccess(fme, PermissableAction.INVITE);
|
||||
if (access != Access.ALLOW && fme.getRole() != Role.LEADER) {
|
||||
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "manage invites");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (myFaction.isBanned(target)) {
|
||||
|
@ -62,9 +62,9 @@ public class CmdKickAlt extends FCommand{
|
||||
// requirements
|
||||
if (!Permission.KICK_ANY.has(sender)) {
|
||||
|
||||
Access access = myFaction.getAccess(fme, PermissableAction.KICKALT);
|
||||
Access access = myFaction.getAccess(fme, PermissableAction.KICK);
|
||||
if (access == Access.DENY || (access == Access.UNDEFINED && !assertMinRole(Role.MODERATOR))) {
|
||||
fme.msg(TL.GENERIC_NOPERMISSION, "kickalt");
|
||||
fme.msg(TL.GENERIC_NOPERMISSION, "kick");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -90,12 +90,12 @@ public class CmdKickAlt extends FCommand{
|
||||
}
|
||||
}
|
||||
|
||||
Access access = myFaction.getAccess(fme, PermissableAction.KICKALT);
|
||||
Access access = myFaction.getAccess(fme, PermissableAction.KICK);
|
||||
// This statement allows us to check if they've specifically denied it,
|
||||
// or default to
|
||||
// the old setting of allowing moderators to kick
|
||||
if (access == Access.DENY || (access == Access.UNDEFINED && !assertMinRole(Role.MODERATOR))) {
|
||||
fme.msg(TL.GENERIC_NOPERMISSION, "kickalt");
|
||||
fme.msg(TL.GENERIC_NOPERMISSION, "kick");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package com.massivecraft.factions.integration;
|
||||
|
||||
import com.earth2me.essentials.Teleport;
|
||||
import com.earth2me.essentials.Trade;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import net.ess3.api.IEssentials;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -41,6 +42,8 @@ public class Essentials {
|
||||
}
|
||||
|
||||
public static boolean isVanished(Player player) {
|
||||
return essentials != null && essentials.getUser(player).isVanished();
|
||||
if (essentials == null) return false;
|
||||
User user = essentials.getUser(player);
|
||||
return user != null && user.isVanished();
|
||||
}
|
||||
}
|
||||
|
@ -839,7 +839,7 @@ public class FactionsPlayerListener implements Listener {
|
||||
/// <summary>
|
||||
private static PermissableAction GetPermissionFromUsableBlock(Material material) {
|
||||
// Check for doors that might have diff material name in old version.
|
||||
if (material.name().contains("DOOR"))
|
||||
if (material.name().contains("DOOR") || material.name().contains("FENCE_GATE"))
|
||||
return PermissableAction.DOOR;
|
||||
if (material.name().toUpperCase().contains("BUTTON") || material.name().toUpperCase().contains("PRESSURE"))
|
||||
return PermissableAction.BUTTON;
|
||||
@ -929,9 +929,11 @@ public class FactionsPlayerListener implements Listener {
|
||||
case IRON_DOOR:
|
||||
case JUNGLE_DOOR:
|
||||
case SPRUCE_DOOR:
|
||||
|
||||
case ACACIA_FENCE_GATE:
|
||||
case BIRCH_FENCE_GATE:
|
||||
case DARK_OAK_FENCE_GATE:
|
||||
case OAK_FENCE_GATE:
|
||||
case JUNGLE_FENCE_GATE:
|
||||
case SPRUCE_FENCE_GATE:
|
||||
return PermissableAction.DOOR;
|
||||
|
@ -1,4 +0,0 @@
|
||||
package me.driftay.addons;
|
||||
|
||||
public class Utils {
|
||||
}
|
@ -521,8 +521,6 @@ fperm-gui:
|
||||
tntfill: 41
|
||||
chest: 42
|
||||
spawner: 38
|
||||
invitealt: 50
|
||||
kickalt: 48
|
||||
home: 49
|
||||
# Material to show, if the material is colorable eg: Wool, Stained Clay it will update with it's access color
|
||||
materials:
|
||||
@ -556,8 +554,6 @@ fperm-gui:
|
||||
chest: STAINED_GLASS
|
||||
spawner: STAINED_GLASS
|
||||
home: STAINED_GLASS
|
||||
invitealt: STAINED_GLASS
|
||||
kickalt: STAINED_GLASS
|
||||
# Same dummy items format as above
|
||||
dummy-items:
|
||||
'0':
|
||||
|
Loading…
Reference in New Issue
Block a user