Fixed all errors with Sevenja's new commits

This commit is contained in:
ProSavage 2018-08-04 20:32:36 -05:00
parent 799fef1f39
commit d0cf88c9c6
20 changed files with 34 additions and 35 deletions

View File

@ -33,11 +33,6 @@ public class CmdBan extends FCommand {
@Override
public void perform() {
Access access = myFaction.getAccess(fme, PermissableAction.BAN);
if (access == Access.DENY) {
fme.msg(TL.GENERIC_NOPERMISSION, "ban");
return;
}
// Adds bypass to admins and clean permission check
if (!fme.isAdminBypassing()) {

View File

@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Conf;
import com.massivecraft.factions.struct.ChatMode;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.struct.Role;
import com.massivecraft.factions.zcore.util.TL;
public class CmdChat extends FCommand {

View File

@ -2,6 +2,7 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.P;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.struct.Role;
import com.massivecraft.factions.zcore.fperms.Access;
import com.massivecraft.factions.zcore.fperms.PermissableAction;
import com.massivecraft.factions.zcore.util.TL;

View File

@ -4,6 +4,7 @@ import com.massivecraft.factions.Conf;
import com.massivecraft.factions.FLocation;
import com.massivecraft.factions.Faction;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.struct.Role;
import com.massivecraft.factions.util.SpiralTask;
import com.massivecraft.factions.zcore.fperms.Access;
import com.massivecraft.factions.zcore.fperms.PermissableAction;
@ -45,7 +46,6 @@ public class CmdClaim extends FCommand {
}
if (radius < 1) {
msg(TL.COMMAND_CLAIM_INVALIDRADIUS);
return;

View File

@ -4,6 +4,9 @@ import com.massivecraft.factions.Conf;
import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.FPlayers;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.struct.Role;
import com.massivecraft.factions.zcore.fperms.Access;
import com.massivecraft.factions.zcore.fperms.PermissableAction;
import com.massivecraft.factions.zcore.util.TL;
import mkremins.fanciful.FancyMessage;
import org.bukkit.ChatColor;

View File

@ -4,6 +4,8 @@ import com.massivecraft.factions.Faction;
import com.massivecraft.factions.P;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.struct.Role;
import com.massivecraft.factions.zcore.fperms.Access;
import com.massivecraft.factions.zcore.fperms.PermissableAction;
import com.massivecraft.factions.zcore.util.TL;
import org.bukkit.Bukkit;
@ -16,7 +18,6 @@ public class CmdDisband extends FCommand {
private static HashMap<String, String> disbandMap = new HashMap<>();
public CmdDisband() {
super();
this.aliases.add("disband");

View File

@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.P;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.struct.Role;
import com.massivecraft.factions.util.WarmUpUtil;
import com.massivecraft.factions.util.WarpGUI;
import com.massivecraft.factions.zcore.fperms.Access;

View File

@ -54,7 +54,7 @@ public class CmdFly extends FCommand {
continue;
}
}
if (FPlayers.getInstance().getByPlayer(player).isVanished()) {
// Actually, vanished players (such as admins) should not display particles to prevent others from knowing their vanished assistance for moderation.
// But we can keep it as a config.
@ -228,7 +228,6 @@ public class CmdFly extends FCommand {
}
if (args.size() == 0) {
toggleFlight(!fme.isFlying(), me);
} else if (args.size() == 1) {

View File

@ -6,6 +6,8 @@ import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.struct.Relation;
import com.massivecraft.factions.struct.Role;
import com.massivecraft.factions.util.WarmUpUtil;
import com.massivecraft.factions.zcore.fperms.Access;
import com.massivecraft.factions.zcore.fperms.PermissableAction;
import com.massivecraft.factions.zcore.util.SmokeUtil;
import com.massivecraft.factions.zcore.util.TL;
import org.bukkit.Location;

View File

@ -81,7 +81,7 @@ public class CmdInvite extends FCommand {
message.send(target.getPlayer());
}
myFaction.msg(TL.COMMAND_INVITE_INVITED, fme.describeTo(myFaction, true), target.describeTo(myFaction));
}

View File

@ -35,7 +35,6 @@ public class CmdSetFWarp extends FCommand {
return;
}
Access access = myFaction.getAccess(fme, PermissableAction.SETWARP);
// This statement allows us to check if they've specifically denied it, or default to
// the old setting of allowing moderators to set warps.
if (!fme.isAdminBypassing()) {

View File

@ -1,9 +1,7 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Faction;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.zcore.util.TL;
import org.bukkit.ChatColor;
public class CmdStealth extends FCommand {
public CmdStealth() {

View File

@ -43,7 +43,6 @@ public class CmdTntFill extends FCommand {
}
msg(TL.COMMAND_TNTFILL_HEADER);
int radius = argAsInt(0, 16);
int amount = argAsInt(1, 16);

View File

@ -128,8 +128,7 @@ public class CmdUnclaim extends FCommand {
}
if (targetFaction.getAccess(fme,PermissableAction.TERRITORY) == Access.DENY) {
if (targetFaction.getAccess(fme, PermissableAction.TERRITORY) == Access.DENY) {
return false;
}

View File

@ -63,7 +63,7 @@ public class FPromoteCommand extends FCommand {
return;
}
}
if (promotion == null) {
fme.msg(TL.COMMAND_PROMOTE_NOTTHATPLAYER);
return;

View File

@ -80,7 +80,7 @@ public class FactionsBlockListener implements Listener {
}
if (event.getBlock().getType() == Material.LEGACY_MOB_SPAWNER) {
if (!fme.isAdminBypassing()) {
Access access = myFaction.getAccess(fme, PermissableAction.SPAWNER);
Access access = fme.getFaction().getAccess(fme, PermissableAction.SPAWNER);
if (access != Access.ALLOW && fme.getRole() != Role.ADMIN) {
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "mine spawners");
return;

View File

@ -41,26 +41,24 @@ public class FUpgradesGUI implements Listener {
List<Integer> spawnerSlots = P.p.getConfig().getIntegerList("fupgrades.MainMenu.Spawners.SpawnerItem.slots");
List<Integer> expSlots = P.p.getConfig().getIntegerList("fupgrades.MainMenu.EXP.EXPItem.slots");
List<Integer> chestSlots = P.p.getConfig().getIntegerList("fupgrades.MainMenu.Chest.ChestItem.slots");
if (cropSlots != -1) {
for (int i = 0; i <= cropSlots.size() - 1; i++) {
inventory.setItem(cropSlots.get(i), items[2]);
}
for (int i = 0; i <= cropSlots.size() - 1; i++) {
inventory.setItem(cropSlots.get(i), items[2]);
}
if (spawnerSlots != -1) {
for (int i = 0; i <= spawnerSlots.size() - 1; i++) {
inventory.setItem(spawnerSlots.get(i), items[1]);
}
for (int i = 0; i <= spawnerSlots.size() - 1; i++) {
inventory.setItem(spawnerSlots.get(i), items[1]);
}
if (expSlots != -1) {
for (int i = 0; i <= expSlots.size() - 1; i++) {
inventory.setItem(expSlots.get(i), items[0]);
}
for (int i = 0; i <= expSlots.size() - 1; i++) {
inventory.setItem(expSlots.get(i), items[0]);
}
if (chestSlots != -1) {
for (int i = 0; i <= chestSlots.size() - 1; i++) {
inventory.setItem(chestSlots.get(i), items[3]);
}
for (int i = 0; i <= chestSlots.size() - 1; i++) {
inventory.setItem(chestSlots.get(i), items[3]);
}
fme.getPlayer().openInventory(inventory);
}

View File

@ -505,6 +505,8 @@ public enum TL {
COMMAND_NOACCESS("&c&l[!]&7 You don't have access to that."),
COMMAND_PROMOTE_NOTTHATPLAYER("&c&l[!]&7 That player &ccannot&7 be promoted."),
COMMAND_PROMOTE_NOT_ALLOWED("&c&l[!]&7 You cannot promote to the same rank as yourself!"),
COMMAND_PROMOTE_NOTSELF("&c&l[!]&7 You cannot manage your own rank."),
COMMAND_PROMOTE_NOT_SAME("&c&l[!]&7 You cannot promote to the same rank as yourself!"),
COMMAND_POWER_TOSHOW("to show player power info"),

View File

@ -12,6 +12,8 @@
# It's suggested that you only turn this on at the direction of a developer.
debug: false
# Prevent find factions exploit
# This will help limit how many times a player can be sent a map of factions.
# Set this to the cooldown you want, in miliseconds, for a map to be shown to a player.

View File

@ -102,7 +102,6 @@ permissions:
factions.monitorlogins: true
factions.top: true
factions.togglealliancechat: true
factions.vault: true
factions.mapheight: true
factions.ban: true
factions.fly: true