Fixed all errors with Sevenja's new commits
This commit is contained in:
parent
799fef1f39
commit
d0cf88c9c6
@ -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()) {
|
||||||
|
@ -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 {
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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");
|
||||||
|
@ -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;
|
||||||
|
@ -54,7 +54,7 @@ public class CmdFly extends FCommand {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FPlayers.getInstance().getByPlayer(player).isVanished()) {
|
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.
|
// 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.
|
// But we can keep it as a config.
|
||||||
@ -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) {
|
||||||
|
@ -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;
|
||||||
|
@ -81,7 +81,7 @@ public class CmdInvite extends FCommand {
|
|||||||
|
|
||||||
message.send(target.getPlayer());
|
message.send(target.getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
myFaction.msg(TL.COMMAND_INVITE_INVITED, fme.describeTo(myFaction, true), target.describeTo(myFaction));
|
myFaction.msg(TL.COMMAND_INVITE_INVITED, fme.describeTo(myFaction, true), target.describeTo(myFaction));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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()) {
|
||||||
|
@ -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() {
|
||||||
|
@ -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);
|
||||||
|
@ -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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ public class FPromoteCommand extends FCommand {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (promotion == null) {
|
if (promotion == null) {
|
||||||
fme.msg(TL.COMMAND_PROMOTE_NOTTHATPLAYER);
|
fme.msg(TL.COMMAND_PROMOTE_NOTTHATPLAYER);
|
||||||
return;
|
return;
|
||||||
|
@ -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;
|
||||||
|
@ -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++) {
|
|
||||||
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);
|
fme.getPlayer().openInventory(inventory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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"),
|
||||||
|
@ -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.
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user