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 @Override
public void perform() { 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 // Adds bypass to admins and clean permission check
if (!fme.isAdminBypassing()) { if (!fme.isAdminBypassing()) {

View File

@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Conf; import com.massivecraft.factions.Conf;
import com.massivecraft.factions.struct.ChatMode; import com.massivecraft.factions.struct.ChatMode;
import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.struct.Role;
import com.massivecraft.factions.zcore.util.TL; import com.massivecraft.factions.zcore.util.TL;
public class CmdChat extends FCommand { 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.P;
import com.massivecraft.factions.struct.Permission; 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.Access;
import com.massivecraft.factions.zcore.fperms.PermissableAction; import com.massivecraft.factions.zcore.fperms.PermissableAction;
import com.massivecraft.factions.zcore.util.TL; 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.FLocation;
import com.massivecraft.factions.Faction; import com.massivecraft.factions.Faction;
import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.struct.Role;
import com.massivecraft.factions.util.SpiralTask; import com.massivecraft.factions.util.SpiralTask;
import com.massivecraft.factions.zcore.fperms.Access; import com.massivecraft.factions.zcore.fperms.Access;
import com.massivecraft.factions.zcore.fperms.PermissableAction; import com.massivecraft.factions.zcore.fperms.PermissableAction;
@ -45,7 +46,6 @@ public class CmdClaim extends FCommand {
} }
if (radius < 1) { if (radius < 1) {
msg(TL.COMMAND_CLAIM_INVALIDRADIUS); msg(TL.COMMAND_CLAIM_INVALIDRADIUS);
return; return;

View File

@ -4,6 +4,9 @@ import com.massivecraft.factions.Conf;
import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.FPlayers; import com.massivecraft.factions.FPlayers;
import com.massivecraft.factions.struct.Permission; 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 com.massivecraft.factions.zcore.util.TL;
import mkremins.fanciful.FancyMessage; import mkremins.fanciful.FancyMessage;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;

View File

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

View File

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

View File

@ -228,7 +228,6 @@ public class CmdFly extends FCommand {
} }
if (args.size() == 0) { if (args.size() == 0) {
toggleFlight(!fme.isFlying(), me); toggleFlight(!fme.isFlying(), me);
} else if (args.size() == 1) { } 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.Relation;
import com.massivecraft.factions.struct.Role; import com.massivecraft.factions.struct.Role;
import com.massivecraft.factions.util.WarmUpUtil; 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.SmokeUtil;
import com.massivecraft.factions.zcore.util.TL; import com.massivecraft.factions.zcore.util.TL;
import org.bukkit.Location; import org.bukkit.Location;

View File

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

View File

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

View File

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

View File

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

View File

@ -80,7 +80,7 @@ public class FactionsBlockListener implements Listener {
} }
if (event.getBlock().getType() == Material.LEGACY_MOB_SPAWNER) { if (event.getBlock().getType() == Material.LEGACY_MOB_SPAWNER) {
if (!fme.isAdminBypassing()) { 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) { if (access != Access.ALLOW && fme.getRole() != Role.ADMIN) {
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "mine spawners"); fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "mine spawners");
return; 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> spawnerSlots = P.p.getConfig().getIntegerList("fupgrades.MainMenu.Spawners.SpawnerItem.slots");
List<Integer> expSlots = P.p.getConfig().getIntegerList("fupgrades.MainMenu.EXP.EXPItem.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"); List<Integer> chestSlots = P.p.getConfig().getIntegerList("fupgrades.MainMenu.Chest.ChestItem.slots");
if (cropSlots != -1) {
for (int i = 0; i <= cropSlots.size() - 1; i++) { for (int i = 0; i <= cropSlots.size() - 1; i++) {
inventory.setItem(cropSlots.get(i), items[2]); inventory.setItem(cropSlots.get(i), items[2]);
} }
}
if (spawnerSlots != -1) {
for (int i = 0; i <= spawnerSlots.size() - 1; i++) { for (int i = 0; i <= spawnerSlots.size() - 1; i++) {
inventory.setItem(spawnerSlots.get(i), items[1]); inventory.setItem(spawnerSlots.get(i), items[1]);
} }
}
if (expSlots != -1) {
for (int i = 0; i <= expSlots.size() - 1; i++) { for (int i = 0; i <= expSlots.size() - 1; i++) {
inventory.setItem(expSlots.get(i), items[0]); inventory.setItem(expSlots.get(i), items[0]);
} }
}
if (chestSlots != -1) {
for (int i = 0; i <= chestSlots.size() - 1; i++) { for (int i = 0; i <= chestSlots.size() - 1; i++) {
inventory.setItem(chestSlots.get(i), items[3]); inventory.setItem(chestSlots.get(i), items[3]);
} }
}
fme.getPlayer().openInventory(inventory); 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_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_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_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"), 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. # It's suggested that you only turn this on at the direction of a developer.
debug: false debug: false
# Prevent find factions exploit # Prevent find factions exploit
# This will help limit how many times a player can be sent a map of factions. # 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. # 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.monitorlogins: true
factions.top: true factions.top: true
factions.togglealliancechat: true factions.togglealliancechat: true
factions.vault: true
factions.mapheight: true factions.mapheight: true
factions.ban: true factions.ban: true
factions.fly: true factions.fly: true