Added a bunch of fixes from github requests
This commit is contained in:
parent
241a16bc2a
commit
6205bbca9f
@ -33,6 +33,7 @@ public class CmdShowInvites extends FCommand {
|
||||
String name = fp != null ? fp.getName() : id;
|
||||
msg.then(name + " ").color(ChatColor.WHITE).tooltip(TL.COMMAND_SHOWINVITES_CLICKTOREVOKE.format(name)).command("/" + Conf.baseCommandAliases.get(0) + " deinvite " + name);
|
||||
}
|
||||
context.sendFancyMessage(msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,6 +5,7 @@ import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.fperms.Access;
|
||||
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.Material;
|
||||
|
||||
public class CmdUnban extends FCommand {
|
||||
|
||||
@ -48,7 +49,7 @@ public class CmdUnban extends FCommand {
|
||||
context.faction.unban(target);
|
||||
|
||||
context.msg(TL.COMMAND_UNBAN_UNBANNED, context.fPlayer.getName(), target.getName());
|
||||
target.msg(TL.COMMAND_UNBAN_TARGET, context.faction.getTag(target));
|
||||
target.msg(TL.COMMAND_UNBAN_TARGETUNBANNED, context.faction.getTag(target));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,7 +47,9 @@ import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryCloseEvent;
|
||||
import org.bukkit.event.inventory.InventoryDragEvent;
|
||||
import org.bukkit.event.player.*;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
import org.bukkit.util.NumberConversions;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
|
@ -31,7 +31,17 @@ public class FInfoSidebar extends FSidebarProvider {
|
||||
|
||||
ListIterator<String> it = lines.listIterator();
|
||||
while (it.hasNext()) {
|
||||
it.set(replaceTags(faction, fplayer, it.next()));
|
||||
String next = it.next();
|
||||
if (next == null) {
|
||||
it.remove();
|
||||
continue;
|
||||
}
|
||||
String replaced = replaceTags(faction, fplayer, next);
|
||||
if (replaced == null) {
|
||||
it.remove();
|
||||
} else {
|
||||
it.set(replaced);
|
||||
}
|
||||
}
|
||||
return lines;
|
||||
}
|
||||
|
@ -210,8 +210,12 @@ public class ClipPlaceholderAPIManager extends PlaceholderExpansion implements R
|
||||
return String.valueOf(faction.getMaxVaults());
|
||||
case "faction_relation_color":
|
||||
return fPlayer.getColorTo(faction).toString();
|
||||
case "faction_grace_time":
|
||||
return String.valueOf(TimerManager.getRemaining(FactionsPlugin.getInstance().getTimerManager().graceTimer.getRemaining(), true));
|
||||
case "grace_time":
|
||||
if(FactionsPlugin.getInstance().getTimerManager().graceTimer.getRemaining() >= 0) {
|
||||
return String.valueOf(TimerManager.getRemaining(FactionsPlugin.getInstance().getTimerManager().graceTimer.getRemaining(), true));
|
||||
} else {
|
||||
return TL.GRACE_DISABLED_PLACEHOLDER.toString();
|
||||
}
|
||||
case "faction_name_at_location":
|
||||
Faction factionAtLocation = Board.getInstance().getFactionAt(new FLocation(player.getLocation()));
|
||||
return factionAtLocation != null ? factionAtLocation.getTag() : Factions.getInstance().getWilderness().getTag();
|
||||
|
@ -28,7 +28,7 @@ public class FDisbandFrame {
|
||||
private Gui gui;
|
||||
|
||||
public FDisbandFrame(Faction faction) {
|
||||
this.gui = new Gui(FactionsPlugin.getInstance(), 1, "Confirm Disband");
|
||||
this.gui = new Gui(FactionsPlugin.getInstance(), 1, ChatColor.translateAlternateColorCodes('&', Objects.requireNonNull(FactionsPlugin.getInstance().getConfig().getString("f-disband-gui.title"))));
|
||||
}
|
||||
|
||||
public void buildGUI(FPlayer fPlayer) {
|
||||
|
@ -728,12 +728,10 @@ public abstract class MemoryFPlayer implements FPlayer {
|
||||
|
||||
public void sendFactionHereMessage(Faction from) {
|
||||
Faction toShow = Board.getInstance().getFactionAt(getLastStoodAt());
|
||||
boolean showChat = true;
|
||||
if (showInfoBoard(toShow)) {
|
||||
FScoreboard.get(this).setTemporarySidebar(new FInfoSidebar(toShow));
|
||||
showChat = FactionsPlugin.getInstance().getConfig().getBoolean("scoreboard.also-send-chat", true);
|
||||
}
|
||||
if (showChat)
|
||||
if (FactionsPlugin.getInstance().getConfig().getBoolean("scoreboard.also-send-chat", true))
|
||||
this.sendMessage(FactionsPlugin.getInstance().txt.parse(TL.FACTION_LEAVE.format(from.getTag(this), toShow.getTag(this))));
|
||||
}
|
||||
|
||||
|
@ -972,7 +972,7 @@ public enum TL {
|
||||
COMMAND_UNBAN_NOTBANNED("&7%s &cisn't banned. Not doing anything."),
|
||||
COMMAND_UNBAN_TARGET_IN_OTHER_FACTION("&c%1$s is not in your faction!"),
|
||||
COMMAND_UNBAN_UNBANNED("&e%1$s &cunbanned &7%2$s"),
|
||||
COMMAND_UNBAN_TARGET("&aYou were unbanned from &r%s"),
|
||||
COMMAND_UNBAN_TARGETUNBANNED("&aYou were unbanned from &r%s"),
|
||||
|
||||
COMMAND_UNCLAIM_SAFEZONE_SUCCESS("Safe zone was unclaimed."),
|
||||
COMMAND_UNCLAIM_SAFEZONE_NOPERM("This is a safe zone. You lack permissions to unclaim."),
|
||||
@ -1121,6 +1121,7 @@ public enum TL {
|
||||
GENERIC_YOUMUSTBE("&cYour must be atleast %1$s to do this!"),
|
||||
GENERIC_MEMBERONLY("&cYou must be in a faction to do this!"),
|
||||
GENERIC_WORLDGUARD("&cThis area is worldguard protected."),
|
||||
GRACE_DISABLED_PLACEHOLDER("Disabled"),
|
||||
|
||||
// MISSION_CREATED_COOLDOWN("&c&l[!] &7Due to your immediate faction creation, you may not start missions for &b%1$s minutes&7!"),
|
||||
MISSION_MISSION_STARTED("&f%1$s &dstarted the %2$s &fmission"),
|
||||
|
@ -753,6 +753,7 @@ Falling-Block-Fix:
|
||||
# +------------------------------------------------------+ #
|
||||
############################################################
|
||||
f-disband-gui:
|
||||
title: '&7Confirm Disband'
|
||||
confirm-item:
|
||||
Type: LIME_STAINED_GLASS_PANE
|
||||
Name: '&a&lConfirm'
|
||||
|
Loading…
Reference in New Issue
Block a user