Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd94b45347 | ||
|
|
28b07fc6a4 | ||
|
|
11ea9bc1aa | ||
|
|
7f922fef28 | ||
|
|
81ef43768d | ||
|
|
1a19ee77ba | ||
|
|
0444517eec | ||
|
|
03077b62ba | ||
|
|
d98c647397 | ||
|
|
e9923344a2 | ||
|
|
cdc07ed5eb | ||
|
|
7b94367eb4 |
21
pom.xml
21
pom.xml
@@ -4,7 +4,7 @@
|
||||
|
||||
<groupId>com.massivecraft</groupId>
|
||||
<artifactId>Factions</artifactId>
|
||||
<version>1.6.9.5-2.3.8-RC</version>
|
||||
<version>1.6.9.5-2.3.9-RC</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>SaberFactions</name>
|
||||
@@ -41,10 +41,6 @@
|
||||
<configuration>
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>com.github.cryptomorin</pattern>
|
||||
<shadedPattern>com.massivecraft.factions.shade.github.cryptomorin</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>com.github.stefvanschie.inventoryframework</pattern>
|
||||
<shadedPattern>com.massivecraft.factions.shade.stefvanschie.inventoryframework</shadedPattern>
|
||||
@@ -112,8 +108,7 @@
|
||||
<dependency>
|
||||
<groupId>com.github.stefvanschie.inventoryframework</groupId>
|
||||
<artifactId>IF</artifactId>
|
||||
<version>0.5.8</version>
|
||||
<scope>compile</scope>
|
||||
<version>0.5.19</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
@@ -143,18 +138,6 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.cryptomorin</groupId>
|
||||
<artifactId>XSeries</artifactId>
|
||||
<version>5.3.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>2.10.6</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.ocpsoft.prettytime</groupId>
|
||||
<artifactId>prettytime</artifactId>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.massivecraft.factions;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.massivecraft.factions.integration.dynmap.DynmapStyle;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.massivecraft.factions.zcore.fperms.DefaultPermissions;
|
||||
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
||||
import org.bukkit.ChatColor;
|
||||
@@ -103,11 +103,6 @@ public class Conf {
|
||||
public static boolean worldGuardChecking = false;
|
||||
public static boolean worldGuardBuildPriority = false;
|
||||
|
||||
//SHIELDS
|
||||
public static boolean useFShieldSystem = true;
|
||||
public static int shieldTimeHours = 12;
|
||||
public static int shieldFrameChangeCooldownHours = 24;
|
||||
|
||||
//RADIUS CLAIMING
|
||||
public static boolean useRadiusClaimSystem = true;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.massivecraft.factions;
|
||||
|
||||
import com.massivecraft.factions.cmd.shields.struct.frame.ShieldFramePersistence;
|
||||
import com.massivecraft.factions.event.FactionDisbandEvent.PlayerDisbandReason;
|
||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
import com.massivecraft.factions.iface.RelationParticipator;
|
||||
@@ -60,24 +59,6 @@ public interface Faction extends EconomyParticipator {
|
||||
|
||||
void setDiscord(String link);
|
||||
|
||||
boolean isProtected();
|
||||
|
||||
void setProtected();
|
||||
|
||||
void setUnprotected();
|
||||
|
||||
ShieldFramePersistence getShieldFrame();
|
||||
|
||||
void setupShieldChange(ShieldFramePersistence frame);
|
||||
|
||||
boolean pendingShieldChange();
|
||||
|
||||
long getShieldChangeTime();
|
||||
|
||||
ShieldFramePersistence getNewFrame();
|
||||
|
||||
void applyShield();
|
||||
|
||||
void checkPerms();
|
||||
|
||||
double getReinforcedArmor();
|
||||
|
||||
@@ -14,9 +14,6 @@ import com.massivecraft.factions.cmd.chest.AntiChestListener;
|
||||
import com.massivecraft.factions.cmd.reserve.ListParameterizedType;
|
||||
import com.massivecraft.factions.cmd.reserve.ReserveAdapter;
|
||||
import com.massivecraft.factions.cmd.reserve.ReserveObject;
|
||||
import com.massivecraft.factions.cmd.shields.struct.ShieldTCMP;
|
||||
import com.massivecraft.factions.cmd.shields.struct.frame.ShieldFrame;
|
||||
import com.massivecraft.factions.cmd.shields.struct.tasks.ShieldManagement;
|
||||
import com.massivecraft.factions.discord.Discord;
|
||||
import com.massivecraft.factions.discord.DiscordListener;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
@@ -183,7 +180,7 @@ public class FactionsPlugin extends MPlugin {
|
||||
}
|
||||
|
||||
saveDefaultConfig();
|
||||
reloadConfig();
|
||||
this.reloadConfig();
|
||||
//Start wait task executor
|
||||
WaitExecutor.startTask();
|
||||
// Load Conf from disk
|
||||
@@ -196,7 +193,6 @@ public class FactionsPlugin extends MPlugin {
|
||||
|
||||
com.massivecraft.factions.integration.Essentials.setup();
|
||||
hookedPlayervaults = setupPlayervaults();
|
||||
new ShieldTCMP();
|
||||
FPlayers.getInstance().load();
|
||||
Factions.getInstance().load();
|
||||
|
||||
@@ -220,7 +216,6 @@ public class FactionsPlugin extends MPlugin {
|
||||
|
||||
Board.getInstance().load();
|
||||
Board.getInstance().clean();
|
||||
new ShieldManagement();
|
||||
//Load command aliases
|
||||
Aliases.load();
|
||||
// Add Base Commands
|
||||
@@ -430,7 +425,6 @@ public class FactionsPlugin extends MPlugin {
|
||||
.registerTypeAdapter(Inventory.class, new InventoryTypeAdapter())
|
||||
.registerTypeAdapter(ReserveObject.class, new ReserveAdapter())
|
||||
.registerTypeAdapter(Location.class, new LocationTypeAdapter())
|
||||
.registerTypeAdapter(ShieldFrame.class, new ShieldFrameAdapter())
|
||||
.registerTypeAdapterFactory(EnumTypeAdapter.ENUM_FACTORY);
|
||||
}
|
||||
|
||||
@@ -488,6 +482,7 @@ public class FactionsPlugin extends MPlugin {
|
||||
Conf.save();
|
||||
}
|
||||
|
||||
|
||||
public Economy getEcon() {
|
||||
RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
|
||||
return rsp.getProvider();
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.util.ParticleEffect;
|
||||
import com.massivecraft.factions.util.VisualizeUtil;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -88,7 +88,7 @@ public class CmdShow extends FCommand {
|
||||
Faction finalFaction = faction;
|
||||
instance.getServer().getScheduler().runTaskAsynchronously(instance, () -> {
|
||||
for (String raw : finalShow) {
|
||||
String parsed = TagUtil.parsePlain(finalFaction, context.fPlayer, raw); // use relations
|
||||
String parsed = instance.getConfig().getBoolean("relational-show", true) ? TagUtil.parsePlain(finalFaction, context.fPlayer, raw) : TagUtil.parsePlain(finalFaction, raw); // use relations
|
||||
if (parsed == null) {
|
||||
continue; // Due to minimal f show.
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.massivecraft.factions.cmd.relational.CmdRelationTruce;
|
||||
import com.massivecraft.factions.cmd.reserve.CmdReserve;
|
||||
import com.massivecraft.factions.cmd.roles.CmdDemote;
|
||||
import com.massivecraft.factions.cmd.roles.CmdPromote;
|
||||
import com.massivecraft.factions.cmd.shields.CmdShield;
|
||||
import com.massivecraft.factions.cmd.tnt.CmdTnt;
|
||||
import com.massivecraft.factions.cmd.tnt.CmdTntFill;
|
||||
import com.massivecraft.factions.cmd.wild.CmdWild;
|
||||
@@ -172,7 +171,6 @@ public class FCmdRoot extends FCommand implements CommandExecutor {
|
||||
public CmdClaimFill cmdClaimFill = new CmdClaimFill();
|
||||
public CmdNotifications cmdNotifications = new CmdNotifications();
|
||||
public CmdFriendlyFire cmdFriendlyFire = new CmdFriendlyFire();
|
||||
public CmdShield cmdShield = new CmdShield();
|
||||
|
||||
//Variables to know if we already setup certain sub commands
|
||||
public Boolean discordEnabled = false;
|
||||
@@ -308,7 +306,6 @@ public class FCmdRoot extends FCommand implements CommandExecutor {
|
||||
this.addSubCommand(this.cmdLookup);
|
||||
this.addSubCommand(this.cmdNotifications);
|
||||
this.addSubCommand(this.cmdFriendlyFire);
|
||||
this.addSubCommand(this.cmdShield);
|
||||
addVariableCommands();
|
||||
if (CommodoreProvider.isSupported()) brigadierManager.build();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.cmd.audit;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import org.bukkit.Material;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.massivecraft.factions.cmd.check;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.massivecraft.factions.zcore.frame.FactionGUI;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.DyeColor;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.massivecraft.factions.cmd.check;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.massivecraft.factions.zcore.frame.FactionGUI;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
@@ -31,13 +31,16 @@ public class CmdUnclaim extends FCommand {
|
||||
|
||||
this.requirements = new CommandRequirements.Builder(Permission.UNCLAIM)
|
||||
.playerOnly()
|
||||
.memberOnly()
|
||||
.withAction(PermissableAction.TERRITORY)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
if (!context.fPlayer.isAdminBypassing() && !context.fPlayer.hasFaction()) {
|
||||
context.fPlayer.msg(TL.GENERIC_MEMBERONLY);
|
||||
return;
|
||||
}
|
||||
|
||||
if (context.args.size() == 2) {
|
||||
Faction target = context.argAsFaction(1);
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.massivecraft.factions.cmd.shields;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.cmd.CommandContext;
|
||||
import com.massivecraft.factions.cmd.CommandRequirements;
|
||||
import com.massivecraft.factions.cmd.FCommand;
|
||||
import com.massivecraft.factions.cmd.shields.struct.frame.ShieldFrame;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
|
||||
/**
|
||||
* Factions - Developed by ImCarib.
|
||||
* All rights reserved 2020.
|
||||
* Creation Date: 5/23/2020
|
||||
*/
|
||||
|
||||
public class CmdShield extends FCommand {
|
||||
|
||||
public CmdShield() {
|
||||
this.aliases.add("shield");
|
||||
this.requirements = new CommandRequirements.Builder(Permission.SHIELD)
|
||||
.playerOnly()
|
||||
.memberOnly()
|
||||
.withAction(PermissableAction.SHIELD)
|
||||
.build();
|
||||
}
|
||||
|
||||
public void perform(CommandContext context) {
|
||||
if (!Conf.useFShieldSystem) {
|
||||
context.msg(TL.GENERIC_DISABLED);
|
||||
return;
|
||||
}
|
||||
|
||||
(new ShieldFrame()).build(context.fPlayer);
|
||||
}
|
||||
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_SHIELD_DESCRIPTION;
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package com.massivecraft.factions.cmd.shields.struct;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.cmd.shields.struct.frame.ShieldFramePersistence;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* Factions - Developed by ImCarib.
|
||||
* All rights reserved 2020.
|
||||
* Creation Date: 5/23/2020
|
||||
*/
|
||||
|
||||
public class ShieldTCMP {
|
||||
private static ShieldTCMP instance;
|
||||
|
||||
private List<ShieldFramePersistence> frames = new ArrayList<>();
|
||||
|
||||
public ShieldTCMP() {
|
||||
instance = this;
|
||||
for (int x = 0; x <= 23; x++) {
|
||||
int end = (x + Conf.shieldTimeHours > 23) ? (x + Conf.shieldTimeHours - 24) : (x + Conf.shieldTimeHours);
|
||||
this.frames.add(new ShieldFramePersistence(x, end));
|
||||
}
|
||||
}
|
||||
|
||||
public static ShieldTCMP getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public ShieldFramePersistence getByStart(int start) {
|
||||
if (start > 23) return null;
|
||||
return this.frames.get(start);
|
||||
}
|
||||
|
||||
public List<ShieldFramePersistence> getFrames() {
|
||||
return this.frames;
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
package com.massivecraft.factions.cmd.shields.struct.frame;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.github.stefvanschie.inventoryframework.Gui;
|
||||
import com.github.stefvanschie.inventoryframework.GuiItem;
|
||||
import com.github.stefvanschie.inventoryframework.pane.PaginatedPane;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.cmd.shields.struct.tasks.ShieldManagement;
|
||||
import com.massivecraft.factions.util.ItemBuilder;
|
||||
import com.massivecraft.factions.util.Placeholder;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Factions - Developed by ImCarib.
|
||||
* All rights reserved 2020.
|
||||
* Creation Date: 5/23/2020
|
||||
*/
|
||||
|
||||
public class ShieldConfirmationFrame {
|
||||
private Gui gui;
|
||||
|
||||
public ShieldConfirmationFrame() {
|
||||
this.gui = new Gui(FactionsPlugin.getInstance(),
|
||||
FactionsPlugin.getInstance().getConfig().getInt("Shields.Frame.Change.Size"),
|
||||
FactionsPlugin.getInstance().color(FactionsPlugin.getInstance().getConfig().getString("Shields.Frame.Change.Title")));
|
||||
}
|
||||
|
||||
public void build(FPlayer fme, ShieldFramePersistence frame) {
|
||||
PaginatedPane pane = new PaginatedPane(0, 0, 9, this.gui.getRows());
|
||||
List<GuiItem> GUIItems = new ArrayList<>();
|
||||
for (int x = 0; x <= this.gui.getRows() * 9 - 1; ) {
|
||||
GUIItems.add(new GuiItem(XMaterial.AIR.parseItem(), e -> e.setCancelled(true)));
|
||||
x++;
|
||||
}
|
||||
ItemStack[] assets = buildAssets(frame);
|
||||
GUIItems.set(4, new GuiItem(assets[0], e -> e.setCancelled(true)));
|
||||
GUIItems.set(11, new GuiItem(assets[1], e -> {
|
||||
e.setCancelled(true);
|
||||
fme.getFaction().setupShieldChange(frame);
|
||||
(new ShieldFrame()).build(fme);
|
||||
}));
|
||||
GUIItems.set(15, new GuiItem(assets[2], e -> {
|
||||
e.setCancelled(true);
|
||||
(new ShieldFrame()).build(fme);
|
||||
}));
|
||||
pane.populateWithGuiItems(GUIItems);
|
||||
this.gui.addPane(pane);
|
||||
this.gui.update();
|
||||
this.gui.show(fme.getPlayer());
|
||||
}
|
||||
|
||||
private ItemStack[] buildAssets(ShieldFramePersistence frame) {
|
||||
String path = "Shields.Frame.Change.Items.";
|
||||
return new ItemStack[]{new ItemBuilder(
|
||||
XMaterial.matchXMaterial(FactionsPlugin.getInstance().getConfig().getString(path + "Info.Type")).get().parseItem())
|
||||
.name(FactionsPlugin.getInstance().getConfig().getString(path + "Info.Display-Name"))
|
||||
.lore(FactionsPlugin.getInstance().replacePlaceholders(FactionsPlugin.getInstance().getConfig().getStringList(path + "Info.Lore"),
|
||||
new Placeholder("{start-time}", frame.getStartTime()),
|
||||
new Placeholder("{end-time}", frame.getEndTime()),
|
||||
new Placeholder("{current-time}", ShieldManagement.getCurrentTime()))).build(),
|
||||
|
||||
new ItemBuilder(
|
||||
XMaterial.matchXMaterial(FactionsPlugin.getInstance().getConfig().getString(path + "Accept.Type")).get().parseItem())
|
||||
.name(FactionsPlugin.getInstance().getConfig().getString(path + "Accept.Display-Name"))
|
||||
.lore(FactionsPlugin.getInstance().getConfig().getStringList(path + "Accept.Lore")).build(),
|
||||
|
||||
new ItemBuilder(XMaterial.matchXMaterial(FactionsPlugin.getInstance().getConfig().getString(path + "Deny.Type")).get().parseItem())
|
||||
.name(FactionsPlugin.getInstance().getConfig().getString(path + "Deny.Display-Name"))
|
||||
.lore(FactionsPlugin.getInstance().getConfig().getStringList(path + "Deny.Lore")).build()};
|
||||
}
|
||||
}
|
||||
@@ -1,171 +0,0 @@
|
||||
package com.massivecraft.factions.cmd.shields.struct.frame;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.github.stefvanschie.inventoryframework.Gui;
|
||||
import com.github.stefvanschie.inventoryframework.GuiItem;
|
||||
import com.github.stefvanschie.inventoryframework.pane.PaginatedPane;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.cmd.shields.struct.ShieldTCMP;
|
||||
import com.massivecraft.factions.cmd.shields.struct.tasks.ShieldManagement;
|
||||
import com.massivecraft.factions.util.ItemBuilder;
|
||||
import com.massivecraft.factions.util.Placeholder;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Factions - Developed by ImCarib.
|
||||
* All rights reserved 2020.
|
||||
* Creation Date: 5/21/2020
|
||||
*/
|
||||
public class ShieldFrame {
|
||||
public Gui gui;
|
||||
|
||||
public ShieldFrame() {
|
||||
this.gui = new Gui(FactionsPlugin.getInstance(), 5, FactionsPlugin.getInstance().color(FactionsPlugin.getInstance().getConfig().getString("Shields.Frame.Main-Menu.Title")));
|
||||
}
|
||||
|
||||
public static String formatTimeMilliseconds(long milliseconds) {
|
||||
long seconds = milliseconds / 1000L;
|
||||
long minutes = seconds / 60L;
|
||||
seconds %= 60L;
|
||||
long hours = minutes / 60L;
|
||||
minutes %= 60L;
|
||||
long days = hours / 24L;
|
||||
hours %= 24L;
|
||||
long months = days / 31L;
|
||||
days %= 31L;
|
||||
if (months != 0L)
|
||||
return months + "M " + days + "d " + hours + "h ";
|
||||
if (days != 0L)
|
||||
return days + "d " + hours + "h " + minutes + "m ";
|
||||
if (hours != 0L)
|
||||
return hours + "h " + minutes + "m " + seconds + "s";
|
||||
if (minutes != 0L)
|
||||
return minutes + "m " + seconds + "s";
|
||||
if (seconds != 0L)
|
||||
return seconds + "s";
|
||||
return "";
|
||||
}
|
||||
|
||||
public void build(FPlayer fme) {
|
||||
PaginatedPane pane = new PaginatedPane(0, 0, 9, this.gui.getRows());
|
||||
List<GuiItem> GUIItems = new ArrayList<>();
|
||||
for (int x = 0; x <= this.gui.getRows() * 9 - 1; x++)
|
||||
GUIItems.add(new GuiItem(new ItemStack(Material.AIR), e -> e.setCancelled(true)));
|
||||
for (int slot : FactionsPlugin.getInstance().getConfig().getIntegerList("Shields.Frame.Frame-Type.Barrier.Slots")) {
|
||||
GUIItems.set(slot, new GuiItem(buildBarrierDummyItem(), e -> e.setCancelled(true)));
|
||||
}
|
||||
int x = 0;
|
||||
for (ShieldFramePersistence frame : ShieldTCMP.getInstance().getFrames()) {
|
||||
ItemStack item = buildShieldFrames(fme.getFaction(), frame);
|
||||
if (fme.getFaction().getShieldFrame() != null &&
|
||||
fme.getFaction().getShieldFrame().equals(frame)) {
|
||||
GUIItems.set(x, new GuiItem(item, e -> e.setCancelled(true)));
|
||||
x++;
|
||||
continue;
|
||||
}
|
||||
if (fme.getFaction().getNewFrame() != null &&
|
||||
fme.getFaction().getNewFrame().equals(frame)) {
|
||||
GUIItems.set(x, new GuiItem(item, e -> e.setCancelled(true)));
|
||||
x++;
|
||||
continue;
|
||||
}
|
||||
GUIItems.set(x, new GuiItem(item, e -> {
|
||||
e.setCancelled(true);
|
||||
(new ShieldConfirmationFrame()).build(fme, frame);
|
||||
}));
|
||||
x++;
|
||||
}
|
||||
ItemStack[] assets = getAssets(fme.getFaction());
|
||||
GUIItems.set(39, new GuiItem(assets[0], e -> e.setCancelled(true)));
|
||||
GUIItems.set(41, new GuiItem(assets[1], e -> e.setCancelled(true)));
|
||||
pane.populateWithGuiItems(GUIItems);
|
||||
this.gui.addPane(pane);
|
||||
this.gui.update();
|
||||
this.gui.show(fme.getPlayer());
|
||||
}
|
||||
|
||||
private ItemStack[] getAssets(Faction f) {
|
||||
ItemStack change;
|
||||
ConfigurationSection sec = FactionsPlugin.getInstance().getConfig().getConfigurationSection("Shields.Frame.Frame-Type.");
|
||||
assert sec != null;
|
||||
ItemStack info = (new ItemBuilder(XMaterial.matchXMaterial(sec.getString("Info-Item.Type")).get().parseItem()).name(sec.getString("Info-Item.Display-Name")).lore(sec.getStringList("Info-Item.Lore")).build());
|
||||
if (f.pendingShieldChange()) {
|
||||
change = (new ItemBuilder(XMaterial.matchXMaterial(sec.getString("Shield-Pending.Type")).get().parseItem()).name(sec.getString("Shield-Pending.Display-Name")).lore(FactionsPlugin.getInstance().replacePlaceholders(sec.getStringList("Shield-Pending.Lore"),
|
||||
new Placeholder("{remaining-time}", timeUntilChange(f)),
|
||||
new Placeholder("{new-start}", f.getNewFrame().getStartTime()),
|
||||
new Placeholder("{new-end}", f.getNewFrame().getEndTime())))).build();
|
||||
} else {
|
||||
change = (new ItemBuilder(XMaterial.matchXMaterial(sec.getString("NoShield-Pending.Type")).get().parseItem()).name(sec.getString("NoShield-Pending.Display-Name")).lore(sec.getStringList("NoShield-Pending.Lore")).build());
|
||||
}
|
||||
return new ItemStack[]{info, change};
|
||||
}
|
||||
|
||||
private String timeUntilChange(Faction f) {
|
||||
long time = f.getShieldChangeTime();
|
||||
time -= System.currentTimeMillis();
|
||||
return formatTimeMilliseconds(time);
|
||||
}
|
||||
|
||||
private ItemStack buildShieldFrames(Faction faction, ShieldFramePersistence frame) {
|
||||
ConfigurationSection config = FactionsPlugin.getInstance().getConfig().getConfigurationSection("Shields.Frame.Frame-Type");
|
||||
if (faction.getShieldFrame() != null && faction.getShieldFrame().equals(frame)) {
|
||||
ItemStack item = XMaterial.matchXMaterial(config.getString("Current-Frame.Type")).get().parseItem();
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setLore(FactionsPlugin.getInstance().colorList(FactionsPlugin.getInstance().replacePlaceholders(config.getStringList("Current-Frame.Lore"),
|
||||
new Placeholder("{time-currently}", ShieldManagement.getCurrentTime()),
|
||||
new Placeholder("{remaining-time}", timeUntilChange(faction)),
|
||||
new Placeholder("{start-time}", frame.getStartTime()),
|
||||
new Placeholder("{end-time}", frame.getEndTime()))));
|
||||
meta.setDisplayName(FactionsPlugin.getInstance().color(config.getString("Current-Frame.Display-Name")));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
if (faction.getNewFrame() != null && faction.getNewFrame().equals(frame)) {
|
||||
ItemStack item = XMaterial.matchXMaterial(config.getString("New-Frame.Type")).get().parseItem();
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setLore(FactionsPlugin.getInstance().colorList(FactionsPlugin.getInstance().replacePlaceholders(config.getStringList("New-Frame.Lore"),
|
||||
new Placeholder("{time-currently}", ShieldManagement.getCurrentTime()),
|
||||
new Placeholder("{remaining-time}", timeUntilChange(faction)),
|
||||
new Placeholder("{start-time}", frame.getStartTime()),
|
||||
new Placeholder("{end-time}", frame.getEndTime()))));
|
||||
meta.setDisplayName(FactionsPlugin.getInstance().color(config.getString("New-Frame.Display-Name")));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
ItemStack item = XMaterial.matchXMaterial(config.getString("Regular-Frame.Type")).get().parseItem();
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setLore(FactionsPlugin.getInstance().colorList(FactionsPlugin.getInstance().replacePlaceholders(config.getStringList("Regular-Frame.Lore"),
|
||||
new Placeholder("{time-currently}", ShieldManagement.getCurrentTime()),
|
||||
new Placeholder("{remaining-time}", timeUntilChange(faction)),
|
||||
new Placeholder("{start-time}", frame.getStartTime()),
|
||||
new Placeholder("{end-time}", frame.getEndTime()))));
|
||||
meta.setDisplayName(FactionsPlugin.getInstance().color(config.getString("Regular-Frame.Display-Name")));
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
private ItemStack buildBarrierDummyItem() {
|
||||
ConfigurationSection config = FactionsPlugin.getInstance().getConfig().getConfigurationSection("Shields.Frame.Frame-Type.Barrier.");
|
||||
ItemStack item = XMaterial.matchXMaterial(config.getString("Type")).get().parseItem();
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
if (meta != null) {
|
||||
List<String> lore = new ArrayList<>();
|
||||
for (String s : config.getStringList("Lore")) lore.add(FactionsPlugin.getInstance().color(s));
|
||||
meta.setLore(lore);
|
||||
meta.setDisplayName(FactionsPlugin.getInstance().color(Objects.requireNonNull(config.getString("Name"))));
|
||||
item.setItemMeta(meta);
|
||||
}
|
||||
return item;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
package com.massivecraft.factions.cmd.shields.struct.frame;
|
||||
|
||||
import com.massivecraft.factions.cmd.shields.struct.tasks.ShieldManagement;
|
||||
|
||||
/**
|
||||
* Factions - Developed by ImCarib.
|
||||
* All rights reserved 2020.
|
||||
* Creation Date: 5/23/2020
|
||||
*/
|
||||
|
||||
public class ShieldFramePersistence {
|
||||
private int start;
|
||||
|
||||
private int end;
|
||||
|
||||
public ShieldFramePersistence(int start, int end) {
|
||||
this.start = start;
|
||||
this.end = end;
|
||||
}
|
||||
|
||||
public int getEndParsed() {
|
||||
return this.end;
|
||||
}
|
||||
|
||||
public int getStartParsed() {
|
||||
return this.start;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return toClockFormat(this.start);
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return toClockFormat(this.end);
|
||||
}
|
||||
|
||||
public boolean isHourProtected(int hour) {
|
||||
if (this.end < this.start) return hour >= this.start;
|
||||
|
||||
return (hour >= this.start && hour < this.end);
|
||||
}
|
||||
|
||||
public boolean isProtectedCurrent() {
|
||||
return isHourProtected(ShieldManagement.getCurrentHour());
|
||||
}
|
||||
|
||||
public String toClockFormat(int x) {
|
||||
if (x == 0) return "12:00 am";
|
||||
if (x == 12) return "12:00 pm";
|
||||
if (x > 12) return (x - 12) + ":00 pm";
|
||||
return x + ":00 am";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
package com.massivecraft.factions.cmd.shields.struct.tasks;
|
||||
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.cmd.shields.struct.ShieldTCMP;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.DateTimeZone;
|
||||
|
||||
/**
|
||||
* Factions - Developed by ImCarib.
|
||||
* All rights reserved 2020.
|
||||
* Creation Date: 5/23/2020
|
||||
*/
|
||||
|
||||
public class ShieldManagement implements Runnable {
|
||||
private static DateTimeZone zone = DateTimeZone.forID("Canada/Eastern");
|
||||
private int lastHour;
|
||||
|
||||
public ShieldManagement() {
|
||||
new ShieldTCMP();
|
||||
this.lastHour = 25;
|
||||
Bukkit.getScheduler().scheduleSyncRepeatingTask(FactionsPlugin.getInstance(), this, 20L, 1200L);
|
||||
}
|
||||
|
||||
public static int getCurrentHour() {
|
||||
DateTime time = new DateTime(zone);
|
||||
return time.getHourOfDay();
|
||||
}
|
||||
|
||||
public static String getCurrentTime() {
|
||||
DateTime time = new DateTime(zone);
|
||||
int hour = time.getHourOfDay();
|
||||
if (hour == 0) hour = 12;
|
||||
|
||||
if (hour > 12)
|
||||
return (hour - 12) + ":" + ((time.getMinuteOfHour() < 10) ? ("0" + time.getMinuteOfHour()) : Integer.valueOf(time.getMinuteOfHour())) + " pm";
|
||||
|
||||
return hour + ":" + ((time.getMinuteOfHour() < 10) ? ("0" + time.getMinuteOfHour()) : Integer.valueOf(time.getMinuteOfHour())) + " am";
|
||||
}
|
||||
|
||||
public void run() {
|
||||
DateTime time = new DateTime(zone);
|
||||
int hour = time.getHourOfDay();
|
||||
if (this.lastHour == 25 || this.lastHour != hour) {
|
||||
long now = System.currentTimeMillis();
|
||||
Factions.getInstance().getAllFactions().forEach(faction -> {
|
||||
if (faction.pendingShieldChange() && faction.getShieldChangeTime() < now) faction.applyShield();
|
||||
if (faction.getShieldFrame() != null) {
|
||||
if (faction.getShieldFrame().isHourProtected(hour)) faction.setProtected();
|
||||
} else {
|
||||
faction.setUnprotected();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.massivecraft.factions.cmd.tnt;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.cmd.Aliases;
|
||||
import com.massivecraft.factions.cmd.CommandContext;
|
||||
@@ -8,6 +7,7 @@ import com.massivecraft.factions.cmd.CommandRequirements;
|
||||
import com.massivecraft.factions.cmd.FCommand;
|
||||
import com.massivecraft.factions.cmd.audit.FLogType;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.Material;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.massivecraft.factions.cmd.wild;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.massivecraft.factions.util.wait.WaitExecutor;
|
||||
import com.massivecraft.factions.util.wait.WaitTask;
|
||||
import com.massivecraft.factions.zcore.frame.FactionGUI;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.massivecraft.factions.listeners;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.cmd.audit.FLogManager;
|
||||
import com.massivecraft.factions.cmd.audit.LogTimer;
|
||||
@@ -9,6 +8,7 @@ import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.util.ItemBuilder;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.massivecraft.factions.zcore.fperms.Access;
|
||||
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
@@ -430,7 +430,7 @@ public class FactionsBlockListener implements Listener {
|
||||
if (!justCheck) fPlayer.setLastFrostwalkerMessage();
|
||||
|
||||
// Check if they have build permissions here. If not, block this from happening.
|
||||
if (!playerCanBuildDestroyBlock(player, location, PermissableAction.FROST_WALK.toString(), justCheck))
|
||||
if (!playerCanBuildDestroyBlock(player, location, "frostwalk", justCheck))
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@@ -512,7 +512,6 @@ public class FactionsBlockListener implements Listener {
|
||||
Player p = (Player) event.getRemover();
|
||||
if (!playerCanBuildDestroyBlock(p, event.getEntity().getLocation(), "destroy", true)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -522,7 +521,7 @@ public class FactionsBlockListener implements Listener {
|
||||
public void onFarmLandDamage(EntityChangeBlockEvent event) {
|
||||
if (event.getEntity() instanceof Player) {
|
||||
Player player = (Player) event.getEntity();
|
||||
if (!playerCanBuildDestroyBlock(player, event.getBlock().getLocation(), PermissableAction.DESTROY.name(), true)) {
|
||||
if (!playerCanBuildDestroyBlock(player, event.getBlock().getLocation(), "destroy", true)) {
|
||||
FPlayer me = FPlayers.getInstance().getByPlayer(player);
|
||||
Faction otherFaction = Board.getInstance().getFactionAt(new FLocation(event.getBlock().getLocation()));
|
||||
me.msg(TL.ACTION_DENIED_OTHER, otherFaction.getTag(), "trample crops");
|
||||
|
||||
@@ -257,7 +257,6 @@ public class FactionsEntityListener implements Listener {
|
||||
|
||||
private boolean checkExplosionForBlock(Entity boomer, Block block) {
|
||||
Faction faction = Board.getInstance().getFactionAt(new FLocation(block.getLocation()));
|
||||
if (faction.isProtected()) return false;
|
||||
|
||||
if (faction.noExplosionsInTerritory() || (faction.isPeaceful() && Conf.peacefulTerritoryDisableBoom))
|
||||
return false;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.listeners;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.massivecraft.factions.listeners;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.cmd.CmdFGlobal;
|
||||
import com.massivecraft.factions.cmd.CmdFly;
|
||||
@@ -21,6 +20,7 @@ import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.util.CC;
|
||||
import com.massivecraft.factions.util.VisualizeUtil;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.massivecraft.factions.util.wait.WaitExecutor;
|
||||
import com.massivecraft.factions.zcore.fperms.Access;
|
||||
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
||||
@@ -335,37 +335,132 @@ public class FactionsPlayerListener implements Listener {
|
||||
}
|
||||
|
||||
private static PermissableAction GetPermissionFromUsableBlock(Material material) {
|
||||
if (material.name().contains("_BUTTON")
|
||||
|| material.name().contains("COMPARATOR")
|
||||
|| material.name().contains("PRESSURE")
|
||||
|| material.name().contains("REPEATER")
|
||||
|| material.name().contains("DIODE")) return PermissableAction.BUTTON;
|
||||
if (material.name().contains("_DOOR")
|
||||
|| material.name().contains("_TRAPDOOR")
|
||||
|| material.name().contains("_FENCE_GATE")
|
||||
|| material.name().startsWith("FENCE_GATE")) return PermissableAction.DOOR;
|
||||
if (material.name().contains("SHULKER_BOX")
|
||||
|| material.name().endsWith("ANVIL")
|
||||
|| material.name().startsWith("CHEST_MINECART")
|
||||
|| material.name().endsWith("CHEST")
|
||||
|| material.name().endsWith("JUKEBOX")
|
||||
|| material.name().endsWith("CAULDRON")
|
||||
|| material.name().endsWith("FURNACE")
|
||||
|| material.name().endsWith("HOPPER")
|
||||
|| material.name().endsWith("BEACON")
|
||||
|| material.name().startsWith("TRAPPED_CHEST")
|
||||
|| material.name().equalsIgnoreCase("ENCHANTING_TABLE")
|
||||
|| material.name().equalsIgnoreCase("ENCHANTMENT_TABLE")
|
||||
|| material.name().endsWith("BREWING_STAND")
|
||||
|| material.name().equalsIgnoreCase("BARREL")) return PermissableAction.CONTAINER;
|
||||
if (material.name().endsWith("LEVER")) return PermissableAction.LEVER;
|
||||
// Check for doors that might have diff material name in old version.
|
||||
if (material.name().contains("DOOR") || material.name().contains("FENCE_GATE"))
|
||||
return PermissableAction.DOOR;
|
||||
if (material.name().toUpperCase().contains("BUTTON") || material.name().toUpperCase().contains("PRESSURE") || material.name().contains("DIODE") || material.name().contains("COMPARATOR"))
|
||||
return PermissableAction.BUTTON;
|
||||
if (FactionsPlugin.instance.mc113 || FactionsPlugin.instance.mc114 || FactionsPlugin.getInstance().mc115) {
|
||||
switch (material) {
|
||||
case DISPENSER:
|
||||
case LEVER:
|
||||
return PermissableAction.LEVER;
|
||||
case ACACIA_BUTTON:
|
||||
case BIRCH_BUTTON:
|
||||
case DARK_OAK_BUTTON:
|
||||
case JUNGLE_BUTTON:
|
||||
case OAK_BUTTON:
|
||||
case SPRUCE_BUTTON:
|
||||
case STONE_BUTTON:
|
||||
case COMPARATOR:
|
||||
case REPEATER:
|
||||
return PermissableAction.BUTTON;
|
||||
|
||||
case ACACIA_DOOR:
|
||||
case BIRCH_DOOR:
|
||||
case IRON_DOOR:
|
||||
case JUNGLE_DOOR:
|
||||
case OAK_DOOR:
|
||||
case SPRUCE_DOOR:
|
||||
case DARK_OAK_DOOR:
|
||||
|
||||
case ACACIA_TRAPDOOR:
|
||||
case BIRCH_TRAPDOOR:
|
||||
case DARK_OAK_TRAPDOOR:
|
||||
case IRON_TRAPDOOR:
|
||||
case JUNGLE_TRAPDOOR:
|
||||
case OAK_TRAPDOOR:
|
||||
case SPRUCE_TRAPDOOR:
|
||||
|
||||
case ACACIA_FENCE_GATE:
|
||||
case BIRCH_FENCE_GATE:
|
||||
case DARK_OAK_FENCE_GATE:
|
||||
case JUNGLE_FENCE_GATE:
|
||||
case OAK_FENCE_GATE:
|
||||
case SPRUCE_FENCE_GATE:
|
||||
return PermissableAction.DOOR;
|
||||
|
||||
case CHEST:
|
||||
case TRAPPED_CHEST:
|
||||
case CHEST_MINECART:
|
||||
|
||||
case BARREL:
|
||||
case COMPOSTER:
|
||||
case LOOM:
|
||||
case CARTOGRAPHY_TABLE:
|
||||
case GRINDSTONE:
|
||||
|
||||
case SHULKER_BOX:
|
||||
case BLACK_SHULKER_BOX:
|
||||
case BLUE_SHULKER_BOX:
|
||||
case BROWN_SHULKER_BOX:
|
||||
case CYAN_SHULKER_BOX:
|
||||
case GRAY_SHULKER_BOX:
|
||||
case GREEN_SHULKER_BOX:
|
||||
case LIGHT_BLUE_SHULKER_BOX:
|
||||
case LIGHT_GRAY_SHULKER_BOX:
|
||||
case LIME_SHULKER_BOX:
|
||||
case MAGENTA_SHULKER_BOX:
|
||||
case ORANGE_SHULKER_BOX:
|
||||
case PINK_SHULKER_BOX:
|
||||
case PURPLE_SHULKER_BOX:
|
||||
case RED_SHULKER_BOX:
|
||||
case WHITE_SHULKER_BOX:
|
||||
case YELLOW_SHULKER_BOX:
|
||||
|
||||
case FURNACE:
|
||||
case BLAST_FURNACE:
|
||||
case SMOKER:
|
||||
case DROPPER:
|
||||
case DISPENSER:
|
||||
case ENCHANTING_TABLE:
|
||||
case BREWING_STAND:
|
||||
case CAULDRON:
|
||||
case HOPPER:
|
||||
case BEACON:
|
||||
case JUKEBOX:
|
||||
case ANVIL:
|
||||
case CHIPPED_ANVIL:
|
||||
case DAMAGED_ANVIL:
|
||||
return PermissableAction.CONTAINER;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
switch (material) {
|
||||
case LEVER:
|
||||
return PermissableAction.LEVER;
|
||||
case DARK_OAK_DOOR:
|
||||
case ACACIA_DOOR:
|
||||
case BIRCH_DOOR:
|
||||
case IRON_DOOR:
|
||||
case JUNGLE_DOOR:
|
||||
case SPRUCE_DOOR:
|
||||
case ACACIA_FENCE_GATE:
|
||||
case BIRCH_FENCE_GATE:
|
||||
case OAK_FENCE_GATE:
|
||||
case DARK_OAK_FENCE_GATE:
|
||||
case JUNGLE_FENCE_GATE:
|
||||
case SPRUCE_FENCE_GATE:
|
||||
return PermissableAction.DOOR;
|
||||
case CHEST:
|
||||
case ENDER_CHEST:
|
||||
case TRAPPED_CHEST:
|
||||
case DISPENSER:
|
||||
case ENCHANTING_TABLE:
|
||||
case DROPPER:
|
||||
case FURNACE:
|
||||
case BLAST_FURNACE:
|
||||
case SMOKER:
|
||||
case HOPPER:
|
||||
case ANVIL:
|
||||
case CHIPPED_ANVIL:
|
||||
case DAMAGED_ANVIL:
|
||||
case BREWING_STAND:
|
||||
return PermissableAction.CONTAINER;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
@@ -394,7 +489,7 @@ public class FactionsPlayerListener implements Listener {
|
||||
|
||||
if (FactionsPlugin.instance.getConfig().getBoolean("scoreboard.default-enabled", false)) {
|
||||
FScoreboard.init(me);
|
||||
FScoreboard.get(me).setDefaultSidebar(new FDefaultSidebar(), FactionsPlugin.instance.getConfig().getInt("scoreboard.default-update-interval", 20));
|
||||
FScoreboard.get(me).setDefaultSidebar(new FDefaultSidebar());
|
||||
FScoreboard.get(me).setSidebarVisibility(me.showScoreboard());
|
||||
}
|
||||
|
||||
@@ -469,7 +564,7 @@ public class FactionsPlayerListener implements Listener {
|
||||
|
||||
CmdSeeChunk.seeChunkMap.remove(event.getPlayer().getName());
|
||||
|
||||
FScoreboard.remove(me);
|
||||
FScoreboard.remove(me, event.getPlayer());
|
||||
}
|
||||
|
||||
public String parseAllPlaceholders(String string, Faction faction, Player player) {
|
||||
@@ -642,7 +737,9 @@ public class FactionsPlayerListener implements Listener {
|
||||
me.attemptClaim(me.getAutoClaimFor(), newLocation, true);
|
||||
}
|
||||
FactionsPlugin.instance.logFactionEvent(me.getAutoClaimFor(), FLogType.CHUNK_CLAIMS, me.getName(), CC.GreenB + "CLAIMED", String.valueOf(1), (new FLocation(player.getLocation())).formatXAndZ(","));
|
||||
if (Conf.disableFlightOnFactionClaimChange) CmdFly.disableFlight(me);
|
||||
if (Conf.disableFlightOnFactionClaimChange && FactionsPlugin.getInstance().getConfig().getBoolean("enable-faction-flight"))
|
||||
CmdFly.disableFlight(me);
|
||||
|
||||
} else if (me.isAutoSafeClaimEnabled()) {
|
||||
if (!Permission.MANAGE_SAFE_ZONE.has(player)) {
|
||||
me.setIsAutoSafeClaimEnabled(false);
|
||||
@@ -715,11 +812,7 @@ public class FactionsPlayerListener implements Listener {
|
||||
Material type;
|
||||
if (event.getItem() != null) {
|
||||
// Convert 1.8 Material Names -> 1.15
|
||||
try {
|
||||
type = XMaterial.matchXMaterial(event.getItem().getType().toString()).get().parseMaterial();
|
||||
} catch (NullPointerException npe) {
|
||||
type = null;
|
||||
}
|
||||
} else {
|
||||
type = null;
|
||||
}
|
||||
@@ -768,7 +861,7 @@ public class FactionsPlayerListener implements Listener {
|
||||
Block block = event.getClickedBlock();
|
||||
if (event.getAction() == Action.RIGHT_CLICK_BLOCK && block.getType() == XMaterial.GRASS_BLOCK.parseMaterial()
|
||||
&& event.hasItem() && event.getItem().getType() == XMaterial.BONE_MEAL.parseMaterial()) {
|
||||
if (!FactionsBlockListener.playerCanBuildDestroyBlock(event.getPlayer(), block.getLocation(), PermissableAction.BUILD.name(), true)) {
|
||||
if (!FactionsBlockListener.playerCanBuildDestroyBlock(event.getPlayer(), block.getLocation(), "build", true)) {
|
||||
FPlayer me = FPlayers.getInstance().getById(event.getPlayer().getUniqueId().toString());
|
||||
Faction myFaction = me.getFaction();
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.massivecraft.factions.missions;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.massivecraft.factions.zcore.frame.FactionGUI;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
@@ -9,15 +9,27 @@ import org.bukkit.scoreboard.Team;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class BufferedObjective {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
private static final Method addEntryMethod;
|
||||
private static final int MAX_LINE_LENGTH;
|
||||
private static final Pattern PATTERN = Pattern.compile("(\u00A7[0-9a-fk-r])|(.)");
|
||||
|
||||
private final Scoreboard scoreboard;
|
||||
private final String baseName;
|
||||
|
||||
private Objective current;
|
||||
private List<Team> currentTeams = new ArrayList<>();
|
||||
private String title;
|
||||
private DisplaySlot displaySlot;
|
||||
|
||||
private int objPtr;
|
||||
private int teamPtr;
|
||||
private boolean requiresUpdate = false;
|
||||
|
||||
private final Map<Integer, String> contents = new HashMap<>();
|
||||
|
||||
static {
|
||||
// Check for long line support.
|
||||
@@ -39,17 +51,6 @@ public class BufferedObjective {
|
||||
}
|
||||
}
|
||||
|
||||
private final Scoreboard scoreboard;
|
||||
private final String baseName;
|
||||
private final Map<Integer, String> contents = new HashMap<>();
|
||||
private Objective current;
|
||||
private List<Team> currentTeams = new ArrayList<>();
|
||||
private String title;
|
||||
private DisplaySlot displaySlot;
|
||||
private int objPtr;
|
||||
private int teamPtr;
|
||||
private boolean requiresUpdate = false;
|
||||
|
||||
public BufferedObjective(Scoreboard scoreboard) {
|
||||
this.scoreboard = scoreboard;
|
||||
this.baseName = createBaseName();
|
||||
@@ -122,13 +123,74 @@ public class BufferedObjective {
|
||||
Team team = scoreboard.registerNewTeam(getNextTeamName());
|
||||
bufferTeams.add(team);
|
||||
|
||||
Iterator<String> split = Splitter.fixedLength(16).split(entry.getValue()).iterator();
|
||||
String name, prefix = null, suffix = null;
|
||||
|
||||
team.setPrefix(split.next());
|
||||
String name = split.next();
|
||||
if (split.hasNext()) { // We only guarantee two splits
|
||||
team.setSuffix(split.next());
|
||||
String value = entry.getValue();
|
||||
if (value.length() > 16) {
|
||||
String[] arrImAPirate = new String[3];
|
||||
Matcher matcherrr = PATTERN.matcher(value);
|
||||
StringBuilder builderrr = new StringBuilder();
|
||||
int sCURvy = 0;
|
||||
char currrentColorrr = 'r';
|
||||
char currrentFormat = 'r';
|
||||
while (sCURvy < 3 && matcherrr.find()) {
|
||||
String tharSheBlows = matcherrr.group();
|
||||
boolean hoist = false;
|
||||
if (tharSheBlows.length() == 1) {
|
||||
builderrr.append(tharSheBlows);
|
||||
if (builderrr.length() == 16) {
|
||||
hoist = true;
|
||||
}
|
||||
} else {
|
||||
char c = tharSheBlows.charAt(1);
|
||||
if (c >= 'k' && c <= 'r') { // format!
|
||||
currrentFormat = c;
|
||||
if (c == 'r') {
|
||||
currrentColorrr = 'r';
|
||||
}
|
||||
} else {
|
||||
currrentColorrr = c;
|
||||
currrentFormat = 'r';
|
||||
}
|
||||
if (builderrr.length() < 14) {
|
||||
builderrr.append(tharSheBlows);
|
||||
} else {
|
||||
hoist = true;
|
||||
}
|
||||
}
|
||||
if (hoist) {
|
||||
arrImAPirate[sCURvy++] = builderrr.toString();
|
||||
builderrr = new StringBuilder();
|
||||
if (currrentColorrr != 'r') {
|
||||
builderrr.append('\u00A7').append(currrentColorrr);
|
||||
}
|
||||
if (currrentFormat != 'r') {
|
||||
builderrr.append('\u00A7').append(currrentFormat);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sCURvy < 3 && builderrr.length() > 0) {
|
||||
arrImAPirate[sCURvy] = builderrr.toString();
|
||||
}
|
||||
if (arrImAPirate[2] == null) {
|
||||
name = arrImAPirate[0];
|
||||
suffix = arrImAPirate[1];
|
||||
} else {
|
||||
prefix = arrImAPirate[0];
|
||||
name = arrImAPirate[1];
|
||||
suffix = arrImAPirate[2];
|
||||
}
|
||||
} else {
|
||||
name = value;
|
||||
}
|
||||
|
||||
if (prefix != null) {
|
||||
team.setPrefix(prefix);
|
||||
}
|
||||
if (suffix != null) {
|
||||
team.setSuffix(suffix);
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
addEntryMethod.invoke(team, name);
|
||||
|
||||
@@ -58,10 +58,13 @@ public class FScoreboard {
|
||||
FTeamWrapper.track(fboard);
|
||||
}
|
||||
|
||||
public static void remove(FPlayer fplayer) {
|
||||
public static void remove(FPlayer fplayer, Player player) {
|
||||
FScoreboard fboard = fscoreboards.remove(fplayer);
|
||||
|
||||
if (fboard != null) {
|
||||
if (fboard.scoreboard == player.getScoreboard()) { // No equals method implemented, so may as well skip a nullcheck
|
||||
player.setScoreboard(Bukkit.getScoreboardManager().getMainScoreboard());
|
||||
}
|
||||
fboard.removed = true;
|
||||
FTeamWrapper.untrack(fboard);
|
||||
}
|
||||
@@ -91,7 +94,7 @@ public class FScoreboard {
|
||||
bufferedObjective.setDisplaySlot(visible ? DisplaySlot.SIDEBAR : null);
|
||||
}
|
||||
|
||||
public void setDefaultSidebar(final FSidebarProvider provider, int updateInterval) {
|
||||
public void setDefaultSidebar(final FSidebarProvider provider) {
|
||||
if (!isSupportedByServer()) {
|
||||
return;
|
||||
}
|
||||
@@ -114,7 +117,7 @@ public class FScoreboard {
|
||||
updateObjective();
|
||||
}
|
||||
}
|
||||
}.runTaskTimer(FactionsPlugin.getInstance(), updateInterval, updateInterval);
|
||||
}.runTaskTimer(FactionsPlugin.getInstance(), 20, 20);
|
||||
}
|
||||
|
||||
public void setTemporarySidebar(final FSidebarProvider provider) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.massivecraft.factions.scoreboards;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.tag.Tag;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import com.massivecraft.factions.zcore.util.TagUtil;
|
||||
|
||||
@@ -20,16 +21,16 @@ public abstract class FSidebarProvider {
|
||||
public abstract List<String> getLines(FPlayer fplayer);
|
||||
|
||||
public String replaceTags(FPlayer fPlayer, String s) {
|
||||
s = TagUtil.parsePlaceholders(fPlayer.getPlayer(), s);
|
||||
s = Tag.parsePlaceholders(fPlayer.getPlayer(), s);
|
||||
|
||||
return qualityAssure(TagUtil.parsePlain(fPlayer, s));
|
||||
return qualityAssure(Tag.parsePlain(fPlayer, s));
|
||||
}
|
||||
|
||||
public String replaceTags(Faction faction, FPlayer fPlayer, String s) {
|
||||
// Run through Placeholder API first
|
||||
s = TagUtil.parsePlaceholders(fPlayer.getPlayer(), s);
|
||||
s = Tag.parsePlaceholders(fPlayer.getPlayer(), s);
|
||||
|
||||
return qualityAssure(Objects.requireNonNull(TagUtil.parsePlain(faction, fPlayer, s)));
|
||||
return qualityAssure(Tag.parsePlain(faction, fPlayer, s));
|
||||
}
|
||||
|
||||
private String qualityAssure(String line) {
|
||||
|
||||
@@ -19,8 +19,9 @@ public class FTeamWrapper {
|
||||
|
||||
private static final Map<Faction, FTeamWrapper> wrappers = new HashMap<>();
|
||||
private static final List<FScoreboard> tracking = new ArrayList<>();
|
||||
private static final Set<Faction> updating = new HashSet<>();
|
||||
private static int factionTeamPtr;
|
||||
private static final Set<Faction> updating = new HashSet<>();
|
||||
|
||||
private final Map<FScoreboard, Team> teams = new HashMap<>();
|
||||
private final String teamName;
|
||||
private final Faction faction;
|
||||
@@ -36,18 +37,11 @@ public class FTeamWrapper {
|
||||
}
|
||||
|
||||
public static void applyUpdatesLater(final Faction faction) {
|
||||
if (!FScoreboard.isSupportedByServer()) {
|
||||
if (!FScoreboard.isSupportedByServer()) return;
|
||||
if (faction.isWilderness()) return;
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("scoreboard.default-prefixes", false)
|
||||
|| FactionsPlugin.getInstance().getConfig().getBoolean("See-Invisible-Faction-Members"))
|
||||
return;
|
||||
}
|
||||
|
||||
if (faction.isWilderness()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("scoreboard.default-prefixes", false) || FactionsPlugin.getInstance().getConfig().getBoolean("See-Invisible-Faction-Members")) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (updating.add(faction)) {
|
||||
Bukkit.getScheduler().runTask(FactionsPlugin.getInstance(), () -> {
|
||||
@@ -58,22 +52,17 @@ public class FTeamWrapper {
|
||||
}
|
||||
|
||||
public static void applyUpdates(Faction faction) {
|
||||
if (!FScoreboard.isSupportedByServer()) {
|
||||
return;
|
||||
}
|
||||
if (!FScoreboard.isSupportedByServer()) return;
|
||||
|
||||
if (faction.isWilderness()) {
|
||||
return;
|
||||
}
|
||||
if (faction.isWilderness()) return;
|
||||
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("scoreboard.default-prefixes", false) || FactionsPlugin.getInstance().getConfig().getBoolean("See-Invisible-Faction-Members")) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (updating.contains(faction)) {
|
||||
// Faction will be updated soon.
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("scoreboard.default-prefixes", false)
|
||||
|| FactionsPlugin.getInstance().getConfig().getBoolean("See-Invisible-Faction-Members"))
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (updating.contains(faction)) return;
|
||||
|
||||
FTeamWrapper wrapper = wrappers.get(faction);
|
||||
Set<FPlayer> factionMembers = faction.getFPlayers();
|
||||
@@ -98,21 +87,16 @@ public class FTeamWrapper {
|
||||
}
|
||||
|
||||
for (FPlayer fmember : factionMembers) {
|
||||
if (!fmember.isOnline()) {
|
||||
continue;
|
||||
}
|
||||
if (!fmember.isOnline()) continue;
|
||||
|
||||
// Scoreboard might not have player; add him/her
|
||||
wrapper.addPlayer(fmember.getPlayer());
|
||||
}
|
||||
|
||||
wrapper.updatePrefixes();
|
||||
}
|
||||
|
||||
public static void updatePrefixes(Faction faction) {
|
||||
if (!FScoreboard.isSupportedByServer()) {
|
||||
return;
|
||||
}
|
||||
if (!FScoreboard.isSupportedByServer()) return;
|
||||
|
||||
if (!wrappers.containsKey(faction)) {
|
||||
applyUpdates(faction);
|
||||
@@ -122,34 +106,22 @@ public class FTeamWrapper {
|
||||
}
|
||||
|
||||
protected static void track(FScoreboard fboard) {
|
||||
if (!FScoreboard.isSupportedByServer()) {
|
||||
return;
|
||||
}
|
||||
if (!FScoreboard.isSupportedByServer()) return;
|
||||
tracking.add(fboard);
|
||||
for (FTeamWrapper wrapper : wrappers.values()) {
|
||||
wrapper.add(fboard);
|
||||
}
|
||||
for (FTeamWrapper wrapper : wrappers.values()) wrapper.add(fboard);
|
||||
}
|
||||
|
||||
protected static void untrack(FScoreboard fboard) {
|
||||
if (!FScoreboard.isSupportedByServer()) {
|
||||
return;
|
||||
}
|
||||
if (!FScoreboard.isSupportedByServer()) return;
|
||||
tracking.remove(fboard);
|
||||
for (FTeamWrapper wrapper : wrappers.values()) {
|
||||
wrapper.remove(fboard);
|
||||
}
|
||||
for (FTeamWrapper wrapper : wrappers.values()) wrapper.remove(fboard);
|
||||
}
|
||||
|
||||
private void add(FScoreboard fboard) {
|
||||
Scoreboard board = fboard.getScoreboard();
|
||||
Team team = board.registerNewTeam(teamName);
|
||||
teams.put(fboard, team);
|
||||
|
||||
for (OfflinePlayer player : getPlayers()) {
|
||||
team.addPlayer(player);
|
||||
}
|
||||
|
||||
for (OfflinePlayer player : getPlayers()) team.addPlayer(player);
|
||||
updatePrefix(fboard);
|
||||
}
|
||||
|
||||
@@ -159,9 +131,7 @@ public class FTeamWrapper {
|
||||
|
||||
private void updatePrefixes() {
|
||||
if (FactionsPlugin.getInstance().getConfig().getBoolean("scoreboard.default-prefixes", false)) {
|
||||
for (FScoreboard fboard : teams.keySet()) {
|
||||
updatePrefix(fboard);
|
||||
}
|
||||
for (FScoreboard fboard : teams.keySet()) updatePrefix(fboard);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.massivecraft.factions.shop;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.github.stefvanschie.inventoryframework.Gui;
|
||||
import com.github.stefvanschie.inventoryframework.GuiItem;
|
||||
import com.github.stefvanschie.inventoryframework.pane.PaginatedPane;
|
||||
@@ -8,6 +7,7 @@ import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FPlayers;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
@@ -134,7 +134,6 @@ public enum Permission {
|
||||
SCOREBOARD("scoreboard"),
|
||||
SEECHUNK("seechunk"),
|
||||
SETWARP("setwarp"),
|
||||
SHIELD("shield"),
|
||||
SHOP("shop"),
|
||||
TOP("top"),
|
||||
VIEWCHEST("viewchest"),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.massivecraft.factions.struct;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.massivecraft.factions.zcore.fperms.Permissable;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.massivecraft.factions.struct;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.massivecraft.factions.zcore.fperms.Permissable;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
@@ -6,7 +6,9 @@ import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.util.timer.DateTimeFormats;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.apache.commons.lang.time.DurationFormatUtils;
|
||||
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
@@ -36,6 +38,11 @@ public enum FactionTag implements Tag {
|
||||
JOINING("{joining}", (fac) -> (fac.getOpen() ? TL.COMMAND_SHOW_UNINVITED.toString() : TL.COMMAND_SHOW_INVITATION.toString())),
|
||||
FACTION("{faction}", (Function<Faction, String>) Faction::getTag),
|
||||
FACTION_RELATION_COLOR("{faction-relation-color}", (fac, fp) -> fp == null ? "" : fp.getColorTo(fac).toString()),
|
||||
//SHIELD_STATUS("{shield-status}",(fac) -> {
|
||||
//if(fac.isProtected() && fac.getShieldFrame() != null) return String.valueOf(TL.SHIELD_CURRENTLY_ENABLE);
|
||||
//if(fac.getShieldFrame() == null) return String.valueOf(TL.SHIELD_NOT_SET);
|
||||
// return TL.SHIELD_CURRENTLY_NOT_ENABLED.toString();
|
||||
//}),
|
||||
HOME_WORLD("{world}", (fac) -> fac.hasHome() ? fac.getHome().getWorld().getName() : Tag.isMinimalShow() ? null : "{ig}"),
|
||||
RAIDABLE("{raidable}", (fac) -> {
|
||||
if (FactionsPlugin.getInstance().getConfig().getBoolean("hcf.raidable", false)) {
|
||||
|
||||
@@ -6,7 +6,6 @@ package com.massivecraft.factions.util;
|
||||
* Creation Date: 4/4/2020
|
||||
*/
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Location;
|
||||
|
||||
2038
src/main/java/com/massivecraft/factions/util/XMaterial.java
Normal file
2038
src/main/java/com/massivecraft/factions/util/XMaterial.java
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,37 +0,0 @@
|
||||
package com.massivecraft.factions.util.adapters;
|
||||
|
||||
import com.google.gson.*;
|
||||
import com.massivecraft.factions.cmd.shields.struct.ShieldTCMP;
|
||||
import com.massivecraft.factions.cmd.shields.struct.frame.ShieldFramePersistence;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
/**
|
||||
* Factions - Developed by ImCarib.
|
||||
* All rights reserved 2020.
|
||||
* Creation Date: 5/23/2020
|
||||
*/
|
||||
public class ShieldFrameAdapter implements JsonDeserializer<ShieldFramePersistence>, JsonSerializer<ShieldFramePersistence> {
|
||||
|
||||
public ShieldFramePersistence deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
|
||||
try {
|
||||
JsonObject obj = json.getAsJsonObject();
|
||||
int frame = obj.get("id").getAsInt();
|
||||
return ShieldTCMP.getInstance().getByStart(frame);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public JsonElement serialize(ShieldFramePersistence src, Type typeOfSrc, JsonSerializationContext context) {
|
||||
JsonObject obj = new JsonObject();
|
||||
try {
|
||||
obj.addProperty("id", src.getStartParsed());
|
||||
return obj;
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,14 @@ package com.massivecraft.factions.zcore.fperms;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
|
||||
public enum Access {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
ALLOW("Allow"),
|
||||
UNDEFINED("Undefined"),
|
||||
DENY("Deny");
|
||||
DENY("Deny"),
|
||||
UNDEFINED("Undefined");
|
||||
|
||||
private final String name;
|
||||
|
||||
@@ -26,6 +31,11 @@ public enum Access {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Access booleanToAccess(boolean access) {
|
||||
if (access) return Access.ALLOW;
|
||||
else return Access.DENY;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name.toLowerCase();
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ public class DefaultPermissions {
|
||||
public boolean chest;
|
||||
public boolean check;
|
||||
public boolean drain;
|
||||
public boolean shield;
|
||||
public boolean spawner;
|
||||
|
||||
public DefaultPermissions() {
|
||||
@@ -69,7 +68,6 @@ public class DefaultPermissions {
|
||||
this.chest = def;
|
||||
this.check = def;
|
||||
this.drain = def;
|
||||
this.shield = def;
|
||||
this.spawner = def;
|
||||
}
|
||||
|
||||
@@ -101,7 +99,6 @@ public class DefaultPermissions {
|
||||
boolean canChest,
|
||||
boolean canCheck,
|
||||
boolean canDrain,
|
||||
boolean canShield,
|
||||
boolean canSpawners) {
|
||||
this.ban = canBan;
|
||||
this.build = canBuild;
|
||||
@@ -131,7 +128,6 @@ public class DefaultPermissions {
|
||||
this.chest = canChest;
|
||||
this.check = canCheck;
|
||||
this.drain = canDrain;
|
||||
this.shield = canShield;
|
||||
this.spawner = canSpawners;
|
||||
}
|
||||
|
||||
@@ -165,7 +161,6 @@ public class DefaultPermissions {
|
||||
else if (name == "chest") return this.chest;
|
||||
else if (name == "check") return this.check;
|
||||
else if (name == "drain") return this.drain;
|
||||
else if (name == "shield") return this.shield;
|
||||
else if (name == "spawner") return this.spawner;
|
||||
else return false;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.massivecraft.factions.zcore.fperms;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.util.Placeholder;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
@@ -47,7 +46,6 @@ public enum PermissableAction {
|
||||
WITHDRAW("withdraw"),
|
||||
CHEST("chest"),
|
||||
CHECK("check"),
|
||||
SHIELD("shield"),
|
||||
SPAWNER("spawner");
|
||||
|
||||
private String name;
|
||||
@@ -68,7 +66,6 @@ public enum PermissableAction {
|
||||
return permissableAction;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -109,29 +106,16 @@ public enum PermissableAction {
|
||||
ConfigurationSection section = FactionsPlugin.getInstance().getConfig().getConfigurationSection("fperm-gui.action");
|
||||
ItemStack item = XMaterial.matchXMaterial(section.getString("Materials." + this.name)).get().parseItem();
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
if (meta != null) {
|
||||
|
||||
meta.setDisplayName(FactionsPlugin.getInstance().color(section.getString("placeholder-item.name").replace("{action}", this.name)));
|
||||
List<String> lore = section.getStringList("placeholder-item.lore");
|
||||
|
||||
// Reset permissions since a section is null so it was old permission storage.
|
||||
if (fme.getFaction().getPermissions().get(perm) == null) {
|
||||
fme.getFaction().setDefaultPerms();
|
||||
fme.getFaction().sendMessage(TL.SYSTEM_PERMISSIONS_RESET.toString());
|
||||
}
|
||||
|
||||
// TEMP: This check is required for factions created before `Undefined` permission was removed
|
||||
if (fme.getFaction().getPermissions().get(perm).get(this) == Access.UNDEFINED) {
|
||||
fme.getFaction().getPermissions().get(perm).put(this, Access.DENY);
|
||||
}
|
||||
|
||||
lore = FactionsPlugin.getInstance().replacePlaceholders(lore,
|
||||
new Placeholder("{action-access-color}", fme.getFaction().getPermissions().get(perm).get(this).getColor()),
|
||||
new Placeholder("{action-access}", fme.getFaction().getPermissions().get(perm).get(this).getName()));
|
||||
|
||||
meta.setLore(FactionsPlugin.getInstance().colorList(lore));
|
||||
item.setItemMeta(meta);
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.massivecraft.factions.zcore.fperms.gui;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.github.stefvanschie.inventoryframework.Gui;
|
||||
import com.github.stefvanschie.inventoryframework.GuiItem;
|
||||
import com.github.stefvanschie.inventoryframework.pane.PaginatedPane;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.massivecraft.factions.zcore.fperms.Access;
|
||||
import com.massivecraft.factions.zcore.fperms.Permissable;
|
||||
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
||||
@@ -17,17 +17,22 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class PermissableActionFrame {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
private Gui gui;
|
||||
private ConfigurationSection section;
|
||||
|
||||
public PermissableActionFrame(Faction f) {
|
||||
section = FactionsPlugin.getInstance().getConfig().getConfigurationSection("fperm-gui.action");
|
||||
ConfigurationSection section = FactionsPlugin.getInstance().getConfig().getConfigurationSection("fperm-gui.action");
|
||||
assert section != null;
|
||||
gui = new Gui(FactionsPlugin.getInstance(),
|
||||
section.getInt("rows", 3),
|
||||
FactionsPlugin.getInstance().color(FactionsPlugin.getInstance().getConfig().getString("fperm-gui.action.name").replace("{faction}", f.getTag())));
|
||||
section.getInt("rows", 4),
|
||||
FactionsPlugin.getInstance().color(Objects.requireNonNull(FactionsPlugin.getInstance().getConfig().getString("fperm-gui.action.name")).replace("{faction}", f.getTag())));
|
||||
}
|
||||
|
||||
public void buildGUI(FPlayer fplayer, Permissable perm) {
|
||||
@@ -99,9 +104,6 @@ public class PermissableActionFrame {
|
||||
meta.setDisplayName(FactionsPlugin.getInstance().color(config.getString("Name")));
|
||||
item.setItemMeta(meta);
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.massivecraft.factions.zcore.fperms.gui;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.github.stefvanschie.inventoryframework.Gui;
|
||||
import com.github.stefvanschie.inventoryframework.GuiItem;
|
||||
import com.github.stefvanschie.inventoryframework.pane.PaginatedPane;
|
||||
@@ -9,6 +8,7 @@ import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.massivecraft.factions.zcore.fperms.Permissable;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@@ -16,17 +16,22 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class PermissableRelationFrame {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
private Gui gui;
|
||||
private ConfigurationSection section;
|
||||
|
||||
public PermissableRelationFrame(Faction f) {
|
||||
section = FactionsPlugin.getInstance().getConfig().getConfigurationSection("fperm-gui.relation");
|
||||
ConfigurationSection section = FactionsPlugin.getInstance().getConfig().getConfigurationSection("fperm-gui.relation");
|
||||
assert section != null;
|
||||
gui = new Gui(FactionsPlugin.getInstance(),
|
||||
section.getInt("rows", 3),
|
||||
FactionsPlugin.getInstance().color(FactionsPlugin.getInstance().getConfig().getString("fperm-gui.relation.name").replace("{faction}", f.getTag())));
|
||||
section.getInt("rows", 4),
|
||||
FactionsPlugin.getInstance().color(Objects.requireNonNull(FactionsPlugin.getInstance().getConfig().getString("fperm-gui.relation.name")).replace("{faction}", f.getTag())));
|
||||
}
|
||||
|
||||
public void buildGUI(FPlayer fplayer) {
|
||||
@@ -84,4 +89,3 @@ public class PermissableRelationFrame {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.massivecraft.factions.zcore.frame.fdisband;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.github.stefvanschie.inventoryframework.Gui;
|
||||
import com.github.stefvanschie.inventoryframework.GuiItem;
|
||||
import com.github.stefvanschie.inventoryframework.pane.PaginatedPane;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.massivecraft.factions.zcore.frame.fupgrades;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.github.stefvanschie.inventoryframework.Gui;
|
||||
import com.github.stefvanschie.inventoryframework.GuiItem;
|
||||
import com.github.stefvanschie.inventoryframework.pane.PaginatedPane;
|
||||
@@ -8,6 +7,7 @@ import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FPlayers;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.massivecraft.factions.zcore.frame.fupgrades;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.util.Placeholder;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.zcore.frame.fupgrades;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import org.bukkit.CropState;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.massivecraft.factions.zcore.frame.fwarps;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.github.stefvanschie.inventoryframework.Gui;
|
||||
import com.github.stefvanschie.inventoryframework.GuiItem;
|
||||
import com.github.stefvanschie.inventoryframework.pane.PaginatedPane;
|
||||
@@ -12,6 +11,7 @@ import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.util.LazyLocation;
|
||||
import com.massivecraft.factions.util.Placeholder;
|
||||
import com.massivecraft.factions.util.WarmUpUtil;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
|
||||
@@ -972,6 +972,7 @@ public abstract class MemoryFPlayer implements FPlayer {
|
||||
}
|
||||
|
||||
public void setFFlying(boolean fly, boolean damage) {
|
||||
if (FactionsPlugin.getInstance().getConfig().getBoolean("enable-faction-flight")) {
|
||||
Player player = getPlayer();
|
||||
if (player == null) return;
|
||||
|
||||
@@ -1003,6 +1004,7 @@ public abstract class MemoryFPlayer implements FPlayer {
|
||||
|
||||
isFlying = fly;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isInFactionsChest() {
|
||||
return inChest;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.massivecraft.factions.zcore.persist;
|
||||
|
||||
import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.cmd.shields.struct.frame.ShieldFramePersistence;
|
||||
import com.massivecraft.factions.discord.Discord;
|
||||
import com.massivecraft.factions.event.FPlayerLeaveEvent;
|
||||
import com.massivecraft.factions.event.FactionDisbandEvent;
|
||||
@@ -96,10 +95,7 @@ public abstract class MemoryFaction implements Faction, EconomyParticipator {
|
||||
private String weeWooFormat;
|
||||
private String guildId;
|
||||
private String memberRoleId;
|
||||
private ShieldFramePersistence shieldFrame;
|
||||
private boolean isProtected;
|
||||
private long applyShieldUpdate;
|
||||
private ShieldFramePersistence newFrame;
|
||||
|
||||
|
||||
// -------------------------------------------- //
|
||||
// Construct
|
||||
@@ -189,48 +185,6 @@ public abstract class MemoryFaction implements Faction, EconomyParticipator {
|
||||
return this.announcements;
|
||||
}
|
||||
|
||||
public boolean isProtected() {
|
||||
return this.isProtected;
|
||||
}
|
||||
|
||||
public long getShieldChangeTime() {
|
||||
return this.applyShieldUpdate;
|
||||
}
|
||||
|
||||
public ShieldFramePersistence getNewFrame() {
|
||||
return this.newFrame;
|
||||
}
|
||||
|
||||
public void setProtected() {
|
||||
this.isProtected = true;
|
||||
}
|
||||
|
||||
public void setUnprotected() {
|
||||
this.isProtected = false;
|
||||
}
|
||||
|
||||
public ShieldFramePersistence getShieldFrame() {
|
||||
return this.shieldFrame;
|
||||
}
|
||||
|
||||
public void applyShield() {
|
||||
this.shieldFrame = this.newFrame;
|
||||
this.applyShieldUpdate = 0L;
|
||||
}
|
||||
|
||||
public void setupShieldChange(ShieldFramePersistence frame) {
|
||||
if (this.shieldFrame == null) {
|
||||
this.shieldFrame = frame;
|
||||
} else {
|
||||
this.newFrame = frame;
|
||||
this.applyShieldUpdate = System.currentTimeMillis() + (3600000 * Conf.shieldFrameChangeCooldownHours);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean pendingShieldChange() {
|
||||
return (this.applyShieldUpdate != 0L);
|
||||
}
|
||||
|
||||
public void addAnnouncement(FPlayer fPlayer, String msg) {
|
||||
List<String> list = announcements.containsKey(fPlayer.getId()) ? announcements.get(fPlayer.getId()) : new ArrayList<>();
|
||||
list.add(msg);
|
||||
|
||||
@@ -73,6 +73,7 @@ public class JSONFPlayers extends MemoryFPlayers {
|
||||
if (!this.file.exists()) return new HashMap<>();
|
||||
String content = DiscUtil.readCatch(this.file);
|
||||
if (content == null) return null;
|
||||
try {
|
||||
Map<String, JSONFPlayer> data = this.gson.fromJson(content, new TypeToken<Map<String, JSONFPlayer>>() {
|
||||
}.getType());
|
||||
Set<String> list = new HashSet<>();
|
||||
@@ -150,6 +151,14 @@ public class JSONFPlayers extends MemoryFPlayers {
|
||||
Bukkit.getLogger().log(Level.INFO, "Done converting players.json to UUID.");
|
||||
}
|
||||
return data;
|
||||
} catch (NullPointerException exception) {
|
||||
exception.printStackTrace();
|
||||
if (this.file.length() < 200) {
|
||||
return new HashMap<>();
|
||||
} else {
|
||||
throw exception;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean doesKeyNeedMigration(String key) {
|
||||
|
||||
@@ -926,9 +926,6 @@ public enum TL {
|
||||
COMMAND_TAG_CHANGED("The faction %1$s changed their name to %2$s."),
|
||||
COMMAND_TAG_DESCRIPTION("Change the faction tag"),
|
||||
|
||||
COMMAND_SHIELD_DESCRIPTION("Modify/Enable Faction Shield Timings"),
|
||||
|
||||
|
||||
COMMAND_TITLE_TOCHANGE("to change a players title"),
|
||||
COMMAND_TITLE_FORCHANGE("for changing a players title"),
|
||||
COMMAND_TITLE_CHANGED("%1$s changed a title: %2$s"),
|
||||
@@ -1254,6 +1251,10 @@ public enum TL {
|
||||
PLAYER_PVP_NEUTRALFAIL("You can't hurt %s in their own territory unless you declare them as an enemy."),
|
||||
PLAYER_PVP_TRIED("%s tried to hurt you."),
|
||||
|
||||
SHIELD_CURRENTLY_ENABLE("&a&lCurrently Protected"),
|
||||
SHIELD_NOT_SET("&c&lNot Set"),
|
||||
SHIELD_CURRENTLY_NOT_ENABLED("&c&lCurrently Unprotected"),
|
||||
|
||||
/**
|
||||
* Strings lying around in other bits of the plugins
|
||||
*/
|
||||
@@ -1293,9 +1294,6 @@ public enum TL {
|
||||
WARMUPS_ALREADY("&cYou are already warming up."),
|
||||
WARMUPS_CANCELLED("&cYou have cancelled your warmup."),
|
||||
|
||||
SYSTEM_PERMISSIONS_RESET("&cYour faction's permissions have been reset to default due to a transfer"),
|
||||
|
||||
|
||||
PLACEHOLDERAPI_NULL("");
|
||||
|
||||
public static SimpleDateFormat sdf;
|
||||
|
||||
@@ -78,6 +78,7 @@ public enum TagReplacer {
|
||||
FACTION_BANCOUNT(TagType.FACTION, "{faction-bancount}"),
|
||||
FACTION_STRIKES(TagType.FACTION, "{strikes}"),
|
||||
FACTION_POINTS(TagType.FACTION, "{faction-points}"),
|
||||
SHIELD_STATUS(TagType.FACTION, "{shield-status}"),
|
||||
|
||||
|
||||
/**
|
||||
@@ -239,6 +240,10 @@ public enum TagReplacer {
|
||||
return fac.hasHome() ? String.valueOf(fac.getHome().getBlockY()) : minimal ? null : "{ig}";
|
||||
case HOME_Z:
|
||||
return fac.hasHome() ? String.valueOf(fac.getHome().getBlockZ()) : minimal ? null : "{ig}";
|
||||
//case SHIELD_STATUS:
|
||||
//if(fac.isProtected() && fac.getShieldFrame() != null) return String.valueOf(TL.SHIELD_CURRENTLY_ENABLE);
|
||||
//if(fac.getShieldFrame() == null) return String.valueOf(TL.SHIELD_NOT_SET);
|
||||
//return TL.SHIELD_CURRENTLY_NOT_ENABLED.toString();
|
||||
case LAND_VALUE:
|
||||
return Econ.shouldBeUsed() ? Econ.moneyString(Econ.calculateTotalLandValue(fac.getLandRounded())) : minimal ? null : TL.ECON_OFF.format("value");
|
||||
case LAND_REFUND:
|
||||
|
||||
@@ -282,6 +282,7 @@ show:
|
||||
- '&4* &cDescription: &f{description}'
|
||||
- '&4* &cLand / Power / Max Power: &f{chunks} &8/ &f{power} &8/ &f{maxPower}'
|
||||
- '&4* &cFaction Strikes: &f{strikes}'
|
||||
- '&4* &cShield Status: &f{shield-status}'
|
||||
- '&4* &cFaction Points: &f{faction-points}'
|
||||
- '&4* &cFounded: &f{create-date}'
|
||||
- '&4* &cBalance: &f{faction-balance}'
|
||||
@@ -293,6 +294,7 @@ show:
|
||||
- '&4* &cBans: &f{faction-bancount}'
|
||||
- '&8&m----------------------------------------'
|
||||
# For a /f show that does not display fancy messages that are essentially empty, use minimal-show
|
||||
relational-show: true
|
||||
minimal-show: false
|
||||
|
||||
# Factions that should be exempt from /f show, case sensitive, useful for a
|
||||
@@ -421,6 +423,7 @@ help:
|
||||
# 2nd: The Action GUI, here you define the permission of the clicked Action using click types,
|
||||
# depending on the click type it will set the permission differently:
|
||||
# Left Click: ALLOW
|
||||
# Middle Click: UNDEFINED
|
||||
# Right Click: DENY
|
||||
#
|
||||
#
|
||||
@@ -432,14 +435,10 @@ help:
|
||||
# indicating the current relation (Uses relation item placeholder)
|
||||
# 2nd: Dummy items, these items server no other purpose than to look good, they have their own
|
||||
# items defined in dummy items, and can later be assigned to specific slots in the GUI's
|
||||
# If you would like to set default permissions in the /f perms gui find the option 'useDefaultPermissions' in conf.json.
|
||||
# This can be useful if you would like to create
|
||||
# A template for factions in your server to have for /f perms.
|
||||
|
||||
fperm-gui:
|
||||
relation:
|
||||
# GUI Name
|
||||
name: '&7Faction Permissions'
|
||||
name: '&8&lFaction Permissions'
|
||||
# Amount of inventory rows, No larger than 5
|
||||
rows: 4
|
||||
# These are the slots where the relations are going to be placed on the first GUI
|
||||
@@ -465,13 +464,14 @@ fperm-gui:
|
||||
enemy: DIAMOND_AXE
|
||||
neutral: WOOD_AXE
|
||||
Placeholder-Item:
|
||||
Name: '&cClick to edit {relation} permissions!'
|
||||
Name: '&c{relation}&f permissions!'
|
||||
action:
|
||||
name: 'Faction Permissions'
|
||||
rows: 6
|
||||
Access-Colors:
|
||||
Allow: '&a'
|
||||
Deny: '&c'
|
||||
Undefined: '&7'
|
||||
Materials:
|
||||
build: COBBLESTONE
|
||||
destroy: DIAMOND_PICKAXE
|
||||
@@ -501,7 +501,6 @@ fperm-gui:
|
||||
check: WATCH
|
||||
drain: BUCKET
|
||||
spawner: MOB_SPAWNER
|
||||
shield: DIAMOND_CHESTPLATE
|
||||
home: ENDER_EYE
|
||||
slots:
|
||||
# Uses same format as above to inform the player of clicked relation
|
||||
@@ -537,19 +536,19 @@ fperm-gui:
|
||||
check: 50
|
||||
spawner: 38
|
||||
drain: 49
|
||||
shield: 51
|
||||
home: 48
|
||||
# {action} Action name eg: Setwarp, Kick
|
||||
# {action-access} Access name eg: Allow, Deny
|
||||
# {action-access-color} Access color eg: Allow;GREEN
|
||||
placeholder-item:
|
||||
name: '&e&l(!) &ePermission: &6&n{action}'
|
||||
name: '&c&lPermission to {action}'
|
||||
lore:
|
||||
- ''
|
||||
- '&6&l * &eStatus: &8[{action-access-color}{action-access}&8]'
|
||||
- '&4&l* &cStatus: &f{action-access-color}{action-access}'
|
||||
- ''
|
||||
- '&7Left click to &a&nAllow&7.'
|
||||
- '&7Right click to &c&nDeny&7.'
|
||||
- '&2&l* &aLeft click to &a&lAllow&a.'
|
||||
- '&4&l* &cRight click to &c&lDeny&c.'
|
||||
- '&8&l* &7Middle click to &7&lUndefine&7.'
|
||||
# Back item will be take you to the previous GUI
|
||||
back-item:
|
||||
Type: ARROW
|
||||
@@ -562,6 +561,7 @@ fperm-gui:
|
||||
Name: ' '
|
||||
Lore:
|
||||
- ' '
|
||||
|
||||
############################################################
|
||||
# +------------------------------------------------------+ #
|
||||
# | Faction Warp GUI | #
|
||||
@@ -1433,112 +1433,6 @@ Tntfill:
|
||||
|
||||
############################################################
|
||||
# +------------------------------------------------------+ #
|
||||
# | Faction Shields | #
|
||||
# +------------------------------------------------------+ #
|
||||
############################################################
|
||||
Shields:
|
||||
Frame:
|
||||
Main-Menu:
|
||||
Title: '&c&lShield'
|
||||
Frame-Type:
|
||||
Barrier:
|
||||
Type: BARRIER
|
||||
Name: ' '
|
||||
Lore:
|
||||
- ' '
|
||||
Slots:
|
||||
- 24
|
||||
- 25
|
||||
- 26
|
||||
Info-Item:
|
||||
Type: PAPER
|
||||
Display-Name: '&e&lShield Information'
|
||||
Lore:
|
||||
- '&fDuring Shielded Times, a faction cannot'
|
||||
- '&fbe raided by cannons/explosions.'
|
||||
- ''
|
||||
- '&fChanging the Shield window'
|
||||
- '&ftakes &e1 day &fto update.'
|
||||
- ''
|
||||
- '&cAbuse of this mechanic in any way will be'
|
||||
- '&cpunished severely!'
|
||||
NoShield-Pending:
|
||||
Type: CLOCK
|
||||
Display-Name: '&e&lPending Shield Change'
|
||||
Lore:
|
||||
- ' '
|
||||
- '&cThere is no pending change to'
|
||||
- '&cyour faction''s Shield window.'
|
||||
Shield-Pending:
|
||||
Type: CLOCK
|
||||
Display-Name: '&e&lPending Shield Change'
|
||||
Lore:
|
||||
- ' '
|
||||
- '&fYour faction is currently awaiting a shield change!'
|
||||
- '&fYour shield will be updated in:'
|
||||
- ' '
|
||||
- '&a{remaining-time} &fto &a&l{new-start} &f&m--->&a&l {new-end}'
|
||||
Current-Frame:
|
||||
Type: GREEN_STAINED_GLASS_PANE
|
||||
Display-Name: ' '
|
||||
Lore:
|
||||
- ' '
|
||||
- ' &aYour shield hours are currently'
|
||||
- ' '
|
||||
- ' &e&l{start-time} &f&m--->&e&l {end-time}'
|
||||
- ' &eTotal Time: &f12 Hours.'
|
||||
- ' '
|
||||
- ' &7( Current Time: {time-currently} )'
|
||||
New-Frame:
|
||||
Type: ORANGE_STAINED_GLASS_PANE
|
||||
Display-Name: ' '
|
||||
Lore:
|
||||
- ' '
|
||||
- ' &fYour factions shielded window is'
|
||||
- ' &fcurrently set to change in &e{remaining-time} &fto'
|
||||
- ' '
|
||||
- ' &e&l{start-time} &f&m--->&e&l {end-time}'
|
||||
- ' &eTotal Time: &f12 Hours.'
|
||||
- ' '
|
||||
- ' &7( Current Time: {time-currently} )'
|
||||
Regular-Frame:
|
||||
Type: RED_STAINED_GLASS_PANE
|
||||
Display-Name: ' '
|
||||
Lore:
|
||||
- ' '
|
||||
- ' &aClick to change the shield window to'
|
||||
- ' '
|
||||
- ' &e&l{start-time} &f&m--->&e&l {end-time}'
|
||||
- ' &eTotal Time: &f12 Hours.'
|
||||
- ' '
|
||||
- ' &7( Current Time: {time-currently} )'
|
||||
Change:
|
||||
Size: 3
|
||||
Title: '&e&lShield Confirmation'
|
||||
Items:
|
||||
Accept:
|
||||
Type: GREEN_STAINED_GLASS_PANE
|
||||
Display-Name: '&a&lConfirm Shield Change'
|
||||
Lore:
|
||||
- ' '
|
||||
Deny:
|
||||
Type: RED_STAINED_GLASS_PANE
|
||||
Display-Name: '&c&lCancel Shield Change'
|
||||
Lore:
|
||||
- ' '
|
||||
Info:
|
||||
Type: CLOCK
|
||||
Display-Name: ' '
|
||||
Lore:
|
||||
- ' '
|
||||
- ' &aClick confirm to change your shield to'
|
||||
- ' &e&l{start-time} &f&m--->&e&l {end-time}'
|
||||
- ' &eTotal Time: 12 Hours.'
|
||||
- ' '
|
||||
- ' &7( Current Time: {current-time} )'
|
||||
- ' &7( Change takes 24 hours to apply! )'
|
||||
############################################################
|
||||
# +------------------------------------------------------+ #
|
||||
# | Faction Wild | #
|
||||
# +------------------------------------------------------+ #
|
||||
############################################################
|
||||
@@ -1666,6 +1560,7 @@ Wild:
|
||||
# - {tnt-balance} : # of tnt a faction has in their tnt bank
|
||||
# - {tnt-max-balance} : # of possible tnt a faction can have in their tnt bank
|
||||
# - {faction-strikes} : # of strikes a faction has
|
||||
# - {shield-status} : Status of the factions shield
|
||||
|
||||
# Faction Permissions GUI variables. Can only be used in GUI
|
||||
# - {relation} : Shows relation name (Can be used in action and relation)
|
||||
|
||||
@@ -226,7 +226,7 @@ COMMAND:
|
||||
ONLINEFACTIONLESS: 'Online factionless: '
|
||||
LOCK:
|
||||
LOCKED: <i>Factions is now locked
|
||||
UNLOCKED: <i>Factions in now unlocked
|
||||
UNLOCKED: <i>Factions is now unlocked
|
||||
LOGINS:
|
||||
TOGGLE: '<i>Set login / logout notifications for Faction members to: <a>%s'
|
||||
MAP:
|
||||
|
||||
508
src/main/resources/lang/zh_CN.yml
Normal file
508
src/main/resources/lang/zh_CN.yml
Normal file
@@ -0,0 +1,508 @@
|
||||
# Saber Factions 中文汉化语言包 @ Forbidden
|
||||
# Made with love <3
|
||||
|
||||
|
||||
|
||||
root:
|
||||
AUTHOR: Forbidden
|
||||
RESPONSIBLE: Forbidden
|
||||
LANGUAGE: Simplified Chinese
|
||||
ENCODING: UTF-8
|
||||
LOCALE: zh_CN
|
||||
REQUIRESUNICODE: 'true'
|
||||
DEFAULT: 'false'
|
||||
STATE: complete
|
||||
LOCAL:
|
||||
AUTHOR: Forbidden
|
||||
RESPONSIBLE: Forbidden
|
||||
LANGUAGE: 简体中文
|
||||
REGION: 中国大陆
|
||||
STATE: 完全汉化
|
||||
COMMAND:
|
||||
ADMIN:
|
||||
NOTMEMBER: '%1$s<i> 不是您派系的一员。'
|
||||
NOTADMIN: <b>您不是派系的管理员。
|
||||
TARGETSELF: <b>目标玩家不可为您本人。
|
||||
DEMOTES: <i>您降职了帮派管理员 %1$s<i>。
|
||||
DEMOTED: <i>您被 %1$s<i> 降职了。
|
||||
PROMOTES: <i>您被 %1$s<i> 升职到了派系管理员。
|
||||
PROMOTED: '%1$s<i> 给予了 %2$s<i> %3$s<i> 的管理员。'
|
||||
AUTOCLAIM:
|
||||
ENABLED: <i>正在为 <h>%1$s<i> 自动宣称领土。
|
||||
DISABLED: <i>已禁用自动宣称领土。
|
||||
REQUIREDRANK: <b>您必须为 <h>%1$s<b> 才能宣称领土。
|
||||
OTHERFACTION: <b>您不能为 <h>%1$s<b> 宣称领土。
|
||||
AUTOHELP:
|
||||
HELPFOR: 命令 " 的帮助:
|
||||
BOOM:
|
||||
PEACEFULONLY: <b>此指令仅限于和平状态下的帮派使用。
|
||||
TOTOGGLE: 来启用爆炸
|
||||
FORTOGGLE: 要开关爆炸
|
||||
ENABLED: '%1$s<i> 已%2$s您领土的爆炸功能。'
|
||||
BYPASS:
|
||||
ENABLE: <i>您已启用管理员绕过模式。您可在任意地点建造或破坏。
|
||||
ENABLELOG: ' 已启用管理员绕过模式。'
|
||||
DISABLE: <i>您已禁用管理员绕过模式。
|
||||
DISABLELOG: ' 已禁用管理员绕过模式。'
|
||||
CHAT:
|
||||
DISABLED: <b>此服务器禁止了内置聊天频道。
|
||||
INVALIDMODE: <b>无法识别的聊天模式,<i>请键入 'a'、'f' 或 'plugin'
|
||||
MODE:
|
||||
PUBLIC: <i>公共聊天模式。
|
||||
ALLIANCE: <i>盟友聊天模式。
|
||||
FACTION: <i>派系聊天模式。
|
||||
CHATSPY:
|
||||
ENABLE: <i>您已启用顺风耳模式。
|
||||
ENABLELOG: ' 已启用顺风耳模式'
|
||||
DISABLE: <i>您已禁用顺风耳模式。
|
||||
DISABLELOG: ' 已禁用顺风耳模式。'
|
||||
CLAIM:
|
||||
INVALIDRADIUS: <b>若您指定半径,则半径至少应为 1。
|
||||
DENIED: <b>您没有指定半径宣称领土的权限。
|
||||
CONFIG:
|
||||
NOEXIST: <b>"<h>%1$s<b>" 的配置设置不存在。
|
||||
SET:
|
||||
'TRUE': '" 选项已设置为 true (已启用)。'
|
||||
'FALSE': '" 选项已设置为 false (已禁用)。'
|
||||
ADDED: '"%1$s" 设置:已添加 "%2$s"。'
|
||||
REMOVED: '"%1$s" 设置:已移除 "%2$s"。'
|
||||
OPTIONSET: '" 选项已设置为 '
|
||||
COLOURSET: '" 颜色选项已设置为 "'
|
||||
INTREQUIRED: '无法设置 "%1$s":选项需要整数值。'
|
||||
LONGREQUIRED: '无法设置 "%1$s":选项需要长整数值。'
|
||||
DOUBLEREQUIRED: '无法设置 "%1$s":选项需要双精度值。'
|
||||
FLOATREQUIRED: '无法设置 "%1$s":选项需要浮点值。'
|
||||
INVALID:
|
||||
COLOUR: '无法设置 "%1$s":"%2$s" 不是有效颜色。'
|
||||
COLLECTION: '"%1$s" 不是可用此命令修改的数据集类型。'
|
||||
MATERIAL: '无法更改 "%1$s" 集:"%2$s" 不是有效的材料。'
|
||||
TYPESET: '"%1$s" 不是可用此命令修改的数据类型集类型。'
|
||||
MATERIAL:
|
||||
ADDED: '"%1$s" 设置:添加了材料 "%2$s"。'
|
||||
REMOVED: '"%1$s" 设置:移除了材料 "%2$s"。'
|
||||
LOG: ' (%1$s 运行了指令)'
|
||||
ERROR:
|
||||
SETTING: 设置配置选项 "%1$s" 至 "%2$s" 时发生错误。
|
||||
MATCHING: 无法匹配配置选项 "%1$s",请汇报此错误。
|
||||
TYPE: '''%1$s'' 的类型为 ''%2$s'',其无法被此命令修改。'
|
||||
CREATE:
|
||||
MUSTLEAVE: <b>您必须先离开当前派系。
|
||||
INUSE: <b>此标签已被使用。
|
||||
TOCREATE: 来创建新派系
|
||||
FORCREATE: 要创建新派系
|
||||
ERROR: <b>创建派系时发生内部错误,请重试。
|
||||
CREATED: '%1$s<i> 创建了新派系 %2$s'
|
||||
YOUSHOULD: '<i>您现在应:%1$s'
|
||||
CREATEDLOG: ' 创建了新派系:'
|
||||
DEINVITE:
|
||||
CANDEINVITE: '您可取消邀请的玩家:'
|
||||
CLICKTODEINVITE: 点击取消 %1$s 的邀请
|
||||
ALREADYMEMBER: '%1$s<i> 已是 %2$s 的成员'
|
||||
MIGHTWANT: '<i>您可能想要:%1$s'
|
||||
REVOKED: '%1$s<i> 撤回了您加入 <h>%2$s<i> 的邀请。'
|
||||
REVOKES: '%1$s<i> 撤回了 %2$s <i>的邀请。'
|
||||
DELFWARP:
|
||||
DELETED: <i>已删除传送点 <a>%1$s
|
||||
INVALID: <i>无法找到传送点 <a>%1$s
|
||||
TODELETE: 来删除传送点
|
||||
FORDELETE: 要删除传送点
|
||||
DESCRIPTION:
|
||||
CHANGES: '您更改了 <h>%1$s<i> 的描述至:'
|
||||
CHANGED: '<i>帮派 %1$s<i> 更改了其描述至:'
|
||||
TOCHANGE: 来更改帮派描述
|
||||
FORCHANGE: 要更改帮派描述
|
||||
DISBAND:
|
||||
IMMUTABLE: <i>您不可解散荒地 (Wilderness)、安全区 (SafeZone) 或是战区 (WarZone)。
|
||||
MARKEDPERMANENT: <i>此帮派已被标记为永久存在,您不可解散。
|
||||
BROADCAST:
|
||||
YOURS: <h>%1$s<i> 解散了您的帮派。
|
||||
NOTYOURS: <h>%1$s<i> 解散了帮派 %2$s。
|
||||
HOLDINGS: <i>您获得了解散帮派银行内的资产,共计 %1$s。
|
||||
FWARP:
|
||||
CLICKTOWARP: 点击传送!
|
||||
COMMANDFORMAT: <i>/f warp <传送点名>
|
||||
WARPED: <i>已传送至 <a>%1$s
|
||||
INVALID: <i>无法找到传送点 <a>%1$s
|
||||
TOWARP: 来传送
|
||||
FORWARPING: 要传送
|
||||
WARPS: '传送点:'
|
||||
HELP:
|
||||
'404': <b>此页面不存在
|
||||
NEXTCREATE: <i>您可在下一页了解如何创建帮派。
|
||||
HOME: '<i>另外,别忘记设置家:'
|
||||
BANK:
|
||||
'1': <i>您的帮派有着用于支付特定物品的银行。
|
||||
'2': <i>因此,银行内应储蓄有钱款。
|
||||
'3': <i>要了解更多,请使用 money 指令。
|
||||
PLAYERTITLES: <i>玩家头衔只是为了好玩而已,没有任何钦点的意思。
|
||||
OWNERSHIP:
|
||||
'1': <i>已宣称且占有的土地已被保护。
|
||||
'2': <i>故只有所有者、帮派管理员
|
||||
'3': <i>才有完整权限。
|
||||
RELATIONS:
|
||||
'1': <i>设置您想与其他帮派达成的关系。
|
||||
'2': <i>默认情况下,您与其他帮派的关系为中立。
|
||||
'3': <i>若双方选择盟友 (ally) 则你们将成为盟友。
|
||||
'4': <i>若单方选择敌人 (enemy) 则你们将互为对头。
|
||||
'5': <i>您不可伤害帮派成员或盟友。
|
||||
'6': <i>您不可在对方领土上伤害中立成员。
|
||||
'7': <i>您可伤害敌人及未加入帮派的玩家。
|
||||
'8': ''
|
||||
'9': <i>在您领土上,来自敌人的伤害将减少。
|
||||
'10': <i>在您死亡时,您将失去影响力。影响力将随时间恢复。
|
||||
'11': <i>一个帮派的影响力为所有成员影响力的总和。
|
||||
'12': <i>一个帮派的影响力决定了其可维持多少土地。
|
||||
'13': <i>您可在影响力过少的帮派的领土上进行宣称。
|
||||
PERMISSIONS:
|
||||
'1': <i>仅有帮派成员可在其自己的领土上建造或摧毁。
|
||||
'2': '<i>同时,下列物品的使用也将受限:'
|
||||
'3': <i>门、箱子、熔炉、发射器及红石中继器。
|
||||
'4': ''
|
||||
'5': <i>请确保为您的访客在门前放置压力板。
|
||||
'6': <i>否则他/她们将无法进入。
|
||||
'7': <i>您也可以利用此方法来创建仅限成员进入的区域。
|
||||
'8': <i>同时由于发射器受保护,您可制造陷阱而
|
||||
'9': <i>不必担忧箭矢被偷。
|
||||
ADMIN:
|
||||
'1': <c>/f claim safezone <i>宣称土地为安全区
|
||||
'2': <c>/f claim warzone <i>宣称土地为战区
|
||||
'3': <c>/f autoclaim [safezone|warzone] <i>随机宣称区域
|
||||
MOAR:
|
||||
'1': '终于,管理员有命令可用了:'
|
||||
'2': '<i>给管理员的更多命令:'
|
||||
'3': '<i>给管理员的甚至更多命令:'
|
||||
HOME:
|
||||
DISABLED: <b>很抱歉,此服务器上禁用了帮派家功能。
|
||||
TELEPORTDISABLED: <b>很抱歉,此服务器上禁用了传送至帮派家功能。
|
||||
NOHOME: '<b>您的帮派没有家。'
|
||||
INENEMY: <b>您无法在对立帮派的领土上传送至您的帮派家。
|
||||
WRONGWORLD: <b>您无法在别的世界传送至您的帮派家。
|
||||
ENEMYNEAR: <b>您无法在敌人距您 %s 方块时传送至您的帮派家。
|
||||
TOTELEPORT: 来传送至您的帮派家
|
||||
FORTELEPORT: 要传送至您的帮派家
|
||||
INVITE:
|
||||
TOINVITE: 来邀请某位玩家
|
||||
FORINVITE: 要邀请某位玩家
|
||||
CLICKTOJOIN: 点击加入!
|
||||
INVITEDYOU: ' 邀请您加入 '
|
||||
INVITED: '%1$s<i> 邀请了 %2$s<i> 至您的帮派。'
|
||||
ALREADYMEMBER: '%1$s<i> 已经是 %2$s 的成员。'
|
||||
JOIN:
|
||||
CANNOTFORCE: <b>您没有移动玩家至其他帮派的权限。
|
||||
SYSTEMFACTION: <b>玩家仅可加入普通帮派,而这是一个系统帮派。
|
||||
ALREADYMEMBER: <b>%1$s %2$s 已经是 %3$s 的成员。
|
||||
ATLIMIT: ' <b>!<white> 帮派 %1$s 已达到 %2$d 位成员的限制,故 %3$s 当前无法加入。'
|
||||
INOTHERFACTION: <b>%1$s 必须先离开 %2$s 当前帮派。
|
||||
NEGATIVEPOWER: <b>%1$s 无法加入影响力为负的帮派。
|
||||
REQUIRESINVITATION: <i>此帮派需要邀请。
|
||||
ATTEMPTEDJOIN: '%1$s<i> 尝试加入您的帮派。'
|
||||
TOJOIN: 来加入帮派
|
||||
FORJOIN: 要加入帮派
|
||||
SUCCESS: <i>%1$s 已成功加入 %2$s.
|
||||
MOVED: <i>%1$s 已移动您至帮派 %2$s。
|
||||
JOINED: <i>%1$s 加入了您的帮派。
|
||||
JOINEDLOG: '%1$s 加入了帮派 %2$s。'
|
||||
MOVEDLOG: '%1$s 移动了玩家 %2$s 至帮派 %3$s。'
|
||||
KICK:
|
||||
CANDIDATES: '您可踢出的玩家:'
|
||||
CLICKTOKICK: '点击踢出 '
|
||||
SELF: <b>您无法踢出您自己。
|
||||
NONE: 此玩家不在帮派里。.
|
||||
NOTMEMBER: '%1$s<b> 不是 %2$s 的成员。'
|
||||
INSUFFICIENTRANK: <b>您的等级不足以踢出此玩家。
|
||||
NEGATIVEPOWER: <b>您无法踢出影响力为负的成员。
|
||||
TOKICK: 来踢出帮派成员
|
||||
FORKICK: 要踢出帮派成员
|
||||
FACTION: '%1$s<i> 将 %2$s<i> 踢出了帮派!:O'
|
||||
KICKS: <i>您将 %1$s<i> 踢出了帮派 %2$s<i>!
|
||||
KICKED: '%1$s<i> 将您踢出了 %2$s<i>!:O'
|
||||
LIST:
|
||||
FACTIONLIST: '帮派列表 '
|
||||
TOLIST: 来列出帮派列表
|
||||
FORLIST: 要列出帮派列表
|
||||
ONLINEFACTIONLESS: '在线的非帮派玩家:'
|
||||
LOCK:
|
||||
LOCKED: <i>帮派现已锁定
|
||||
UNLOCKED: <i>帮派现已解锁
|
||||
LOGINS:
|
||||
TOGGLE: '<i>设置帮派成员登录 / 登出提示至:<a>%s'
|
||||
MAP:
|
||||
TOSHOW: 来展示地图
|
||||
FORSHOW: 要展示地图
|
||||
UPDATE:
|
||||
ENABLED: <i>地图自动更新<green>已启用<i>。
|
||||
DISABLED: <i>地图自动更新<red>已禁用<i>。
|
||||
MOD:
|
||||
CANDIDATES: '您可提拔的玩家列表:'
|
||||
CLICKTOPROMOTE: '点击提拔 '
|
||||
NOTMEMBER: '%1$s<b> 并不是您帮派的成员。'
|
||||
NOTADMIN: <b>您不是帮派管理员。
|
||||
SELF: <b>目标玩家不可为您自己。
|
||||
TARGETISADMIN: <b>目标玩家为帮派管理员,请先降职他/她。
|
||||
REVOKES: <i>您从 %1$s 移除了调停者状态<i>。
|
||||
REVOKED: '%1$s<i> 不再是您帮派的调停者。'
|
||||
PROMOTES: '%1$s<i> 晋升到了您帮派的调停者。'
|
||||
PROMOTED: <i>您提拔了 %1$s<i> 至调停者。
|
||||
MODIFYPOWER:
|
||||
ADDED: '<i>添加了 <a>%1$f <i>影响力至 <a>%2$s。<i>四舍五入后的现影响力为:<a>%3$d'
|
||||
MONEY:
|
||||
SHORT: 帮派金钱命令
|
||||
LONG: <i>帮派金钱指令。
|
||||
MONEYBALANCE:
|
||||
SHORT: 显示帮派余额
|
||||
MONEYDEPOSIT:
|
||||
SHORT: 储蓄钱款
|
||||
DEPOSITED: '%1$s 储蓄了 %2$s 进帮派银行:%3$s'
|
||||
MONEYTRANSFERFF:
|
||||
SHORT: 转账帮派 -> 帮派
|
||||
TRANSFER: '%1$s 从帮派 "%3$s" 转账了 %2$s 至帮派 "%4$s"'
|
||||
MONEYTRANSFERFP:
|
||||
SHORT: 转账帮派 -> 插件
|
||||
TRANSFER: '%1$s 从帮派 "%3$s" 转账了 %2$s 至玩家 "%4$s"'
|
||||
MONEYTRANSFERPF:
|
||||
SHORT: 转账插件 -> 帮派
|
||||
TRANSFER: '%1$s 从玩家 "%3$s" 转账了 %2$s 至帮派 "%4$s"'
|
||||
MONEYWITHDRAW:
|
||||
SHORT: 取出钱款
|
||||
WITHDRAW: '%1$s 从帮派银行 %3$s 中取出了 %2$s'
|
||||
OPEN:
|
||||
TOOPEN: 来开放或关闭帮派
|
||||
FOROPEN: 要开放或关闭帮派
|
||||
OPEN: 开放
|
||||
CLOSED: 关闭
|
||||
CHANGES: '%1$s<i> 更改了帮派至<h>%2$s<i>.'
|
||||
CHANGED: <i>帮派 %1$s<i> 现已%2$s
|
||||
OWNER:
|
||||
DISABLED: <b>很抱歉,但服务器禁用了占有区域。
|
||||
LIMIT: <b>很抱歉,但您超过了服务器每个帮派<h>最多 %1$d <b>块占有区域的限制。
|
||||
WRONGFACTION: <b>此地块尚未被您的帮派宣称,故您不可以设置它的主权。
|
||||
NOTCLAIMED: <b>此地块尚未被任何帮派宣称,主权不可用。
|
||||
NOTMEMBER: '%1$s<i> 不是此帮派的一员。'
|
||||
CLEARED: <i>您已清除此宣称区域的主权。
|
||||
REMOVED: <i>您已从 %1$s 清除此宣称地皮的主权<i>。
|
||||
TOSET: 来设置宣称地皮的主权
|
||||
FORSET: 要设置宣称地皮的主权
|
||||
ADDED: <i>您已添加 %1$s<i> 至此宣称地皮的所有者列表。
|
||||
OWNERLIST:
|
||||
DISABLED: <b>很抱歉,但服务器禁用了占有区域。
|
||||
WRONGFACTION: <b>此地块尚未被您的帮派宣称。
|
||||
NOTCLAIMED: <i>此地块尚未被任何的帮派宣称,因此虚位以待。
|
||||
NONE: <i>这里尚未设置所有者:帮派里的所有人均可访问。
|
||||
OWNERS: '<i>当前此地块的所有者:%1$s'
|
||||
POWER:
|
||||
TOSHOW: 来显示玩家影响力信息
|
||||
FORSHOW: 要显示玩家影响力信息
|
||||
POWER: '%1$s<a> - 影响力 / 最大影响力:<i>%2$d / %3$d %4$s'
|
||||
BONUS: ' (奖励:'
|
||||
PENALTY: ' (惩罚:'
|
||||
POWERBOOST:
|
||||
HELP:
|
||||
'1': <b>您必须指定插件 "plugin" 或玩家 "player" 来指定玩家或使用 "f" 或 "faction" 来指定帮派。
|
||||
'2': <b>示例:/f powerboost plugin 玩家 0.5 -或- /f powerboost f 帮派 -5
|
||||
INVALIDNUM: <b>您必须为影响力奖惩值指定有效的数值。
|
||||
PLAYER: 玩家 "%1$s"
|
||||
FACTION: 帮派 "%1$s"
|
||||
BOOST: <i>%1$s 的最低/最高影响力级别现有 %2$d 的奖惩。
|
||||
BOOSTLOG: '%1$s 为 %2$s 设置影响力奖惩值至 %3$d。'
|
||||
RELOAD:
|
||||
TIME: <i>已从磁盘重载 <h>conf.json <i>,共花费 <h>%1$d ms<i>。
|
||||
SAFEUNCLAIMALL:
|
||||
SHORT: 取消宣称使用安全区地块
|
||||
UNCLAIMED: <i>您已取消宣称使用安全区地块。
|
||||
UNCLAIMEDLOG: '%1$s 已取消宣称使用安全区地块。'
|
||||
SAVEALL: <i>帮派信息已保存至磁盘!
|
||||
SETFWARP:
|
||||
NOTCLAIMED: <i>您仅可在您的帮派区域里设置传送点。
|
||||
LIMIT: <i>您的帮派已达到了最多传送点的数量限制 <a>(%1$d)。
|
||||
SET: <i>已设置传送点 <a>%1$s <i>至您的位置。
|
||||
TOSET: 来设置传送点
|
||||
FORSET: 要设置传送点
|
||||
SETHOME:
|
||||
DISABLED: <b>很抱歉,此服务器上禁用了帮派家功能。
|
||||
NOTCLAIMED: <b>很抱歉,帮派家仅能设置在您的宣称领土内。
|
||||
TOSET: 来设置帮派家
|
||||
FORSET: 要设置帮派家
|
||||
SET: '%1$s<i> 为您的帮派设置了帮派家。您现在可使用:'
|
||||
SETOTHER: <b>您已为帮派 %1$s<i> 设置了家。
|
||||
SHOW:
|
||||
NOFACTION:
|
||||
SELF: 您不在帮派里。
|
||||
OTHER: 这不是帮派。
|
||||
TOSHOW: 来显示帮派信息
|
||||
FORSHOW: 要显示帮派信息
|
||||
DESCRIPTION: '<a>描述:<i>%1$s'
|
||||
PEACEFUL: 此帮派处于和平状态
|
||||
PERMANENT: <a>此帮派被标记为永久,即使无成员也依然存在。
|
||||
JOINING: '<a>正在加入:<i>%1$s '
|
||||
INVITATION: 需要邀请
|
||||
UNINVITED: 无需邀请
|
||||
POWER: '<a>地块 / 影响力 / 最大影响力:<i> %1$d/%2$d/%3$d %4$s'
|
||||
BONUS: ' (奖励:'
|
||||
PENALTY: ' (惩罚:'
|
||||
DEPRECIATED: (%1$s 已弃用)
|
||||
LANDVALUE: '<a>总地块价值:<i>%1$s %2$s'
|
||||
BANKCONTAINS: '<a>银行内有:<i>%1$s'
|
||||
ALLIES: '盟友:'
|
||||
ENEMIES: '敌人:'
|
||||
MEMBERSONLINE: '在线成员:'
|
||||
MEMBERSOFFLINE: '离线成员:'
|
||||
SHOWINVITES:
|
||||
PENDING: '等待接受邀请的玩家:'
|
||||
CLICKTOREVOKE: 点击撤回 %1$s 的邀请。
|
||||
STATUS:
|
||||
FORMAT: '%1$s 影响力:%2$s 上次在线:%3$s'
|
||||
ONLINE: 在线
|
||||
AGOSUFFIX: ' 前。'
|
||||
TAG:
|
||||
TAKEN: <b>此标签已被使用
|
||||
TOCHANGE: 来更改帮派标签
|
||||
FORCHANGE: 要更改帮派标签
|
||||
FACTION: '%1$s<i> 更改了您帮派标签至 %2$s'
|
||||
CHANGED: <i>帮派 %1$s<i> 更改了其名称至 %2$s。
|
||||
TITLE:
|
||||
TOCHANGE: 来更改玩家头衔
|
||||
FORCHANGE: 要更改玩家头衔
|
||||
CHANGED: '%1$s<i> 更改了头衔:%2$s'
|
||||
UNCLAIM:
|
||||
SAFEZONE:
|
||||
SUCCESS: <i>已取消宣称安全区。
|
||||
NOPERM: <b>这里是安全区,您缺少宣称权限。
|
||||
WARZONE:
|
||||
SUCCESS: <i>已取消宣称战区。
|
||||
NOPERM: <b>这里是战区,您缺少宣称权限。
|
||||
UNCLAIMED: '%1$s<i> 取消宣称了您的部分领土。'
|
||||
UNCLAIMS: <i>您取消宣称了此领土。
|
||||
LOG: '%1$s 从帮派 %3$s 取消宣称了在 (%2$s) 处的领土'
|
||||
WRONGFACTION: <b>您未拥有此领土。
|
||||
TOUNCLAIM: 来取消宣称此领土
|
||||
FORUNCLAIM: 要取消宣称此领土
|
||||
FACTIONUNCLAIMED: '%1$s<i> 取消宣称了部分领土。'
|
||||
UNCLAIMALL:
|
||||
TOUNCLAIM: 来取消宣称所有帮派领土
|
||||
FORUNCLAIM: 要取消宣称所有帮派领土
|
||||
UNCLAIMED: '%1$s<i> 取消宣称了您所有的帮派领土。'
|
||||
LOG: '%1$s 为 %2$s 取消宣称了所有的帮派领土'
|
||||
VERSION:
|
||||
VERSION: <i>您正运行 %1$s
|
||||
WARUNCLAIMALL:
|
||||
SHORT: 取消宣称所有战区领土
|
||||
SUCCESS: <i>您取消宣称了所有战区领土。
|
||||
LOG: '%1$s 取消宣称了所有战区领土。'
|
||||
RELATIONS:
|
||||
ALLTHENOPE: <b>并不可以哦!
|
||||
MORENOPE: <b>不行哦!您不可对您自己改变关系 :)
|
||||
ALREADYINRELATIONSHIP: <b>您已为 %1$s 设置了相同的关系意愿。
|
||||
TOMARRY: 来改变关系意愿
|
||||
FORMARRY: 要改变关系意愿
|
||||
MUTUAL: <i>您的帮派现已 %1$s<i> 至 %2$s
|
||||
PEACEFUL: <i>在您帮派处于和平状态时,这将毫无作用。
|
||||
PEACEFULOTHER: <i>在对方帮派处于和平状态时,这将毫无作用。
|
||||
PROPOSAL:
|
||||
'1': '%1$s<i> 想成为您的 %2$s'
|
||||
'2': <i>键入 <c>/%1$s %2$s %3$s<i> 来同意。
|
||||
SENT: '%1$s<i> 已悉知您想成为 %2$s 的意愿'
|
||||
command:
|
||||
convert:
|
||||
backend:
|
||||
running: 已正在运行此后端。
|
||||
invalid: 无效后端
|
||||
help:
|
||||
invitations: '<i>您可能想要关闭并使用邀请:'
|
||||
LEAVE:
|
||||
PASSADMIN: <b>您必须现将管理员角色转给他人。
|
||||
NEGATIVEPOWER: <b>您不可在影响力为正时离开帮派。
|
||||
TOLEAVE: 来离开您的帮派
|
||||
FORLEAVE: 要离开您的帮派
|
||||
LEFT: '%s<i> 离开了帮派 %s<i>。'
|
||||
DISBANDED: <i>%s<i> 被解散了。
|
||||
DISBANDEDLOG: 由于帮派 %s (%s) 的最后一名玩家 (%s) 也已离开,其已被解散。
|
||||
CLAIM:
|
||||
PROTECTED: <b>此地块已被保护
|
||||
DISABLED: <b>很抱歉,此世界禁用了领土宣称功能。
|
||||
CANTCLAIM: <b>您不能为 <h>%s<b> 宣称领土。
|
||||
ALREADYOWN: '%s<i> 已拥有此地块。'
|
||||
MUSTBE: <b>您必须为 <h>%s<b> 才能宣称领土。
|
||||
MEMBERS: 帮派必须有至少 <h>%s<b> 名成员才能宣称领土。
|
||||
SAFEZONE: <b>您不能宣称安全区。
|
||||
WARZONE: <b>您不能宣称战区。
|
||||
POWER: <b>您不能宣称更多领土!您需要更多影响力!
|
||||
LIMIT: <b>已达到限制。您不可宣称更多领土!
|
||||
ALLY: <b>您无法宣称您盟友的领土。
|
||||
CONTIGIOUS: <b>您仅可宣称连到您首块宣称领土或被其他帮派控制的领土的地块!
|
||||
FACTIONCONTIGUOUS: <b>您仅可宣称连到您首块宣称领土的地块!
|
||||
PEACEFUL: '%s<i> 拥有此领土。您的帮派处于和平状态,故您不可以宣称来自其他帮派的领土。'
|
||||
PEACEFULTARGET: '%s<i> 拥有此领土,且其处于和平状态,故您不可以宣称来自他们的领土。'
|
||||
THISISSPARTA: '%s<i> 拥有此领土,且强大到足以保持此领地。'
|
||||
BORDER: <b>您必须在领地边境才能开始宣称领土。
|
||||
TOCLAIM: 来宣称此领土
|
||||
FORCLAIM: 要宣称此领土
|
||||
CLAIMED: <h>%s<i> 为 <h>%s<i> 宣称了来自 <h>%s<i> 的领土。
|
||||
CLAIMEDLOG: '%s 在 (%s) 处为帮派 %s 宣称了领土'
|
||||
GENERIC:
|
||||
NOPERMISSION: <b>您没有 %1$s 的权限。
|
||||
DOTHAT: 进行此操作
|
||||
NOPLAYERMATCH: <b>未找到匹配 "<plugin>%1$s<b>" 的玩家。
|
||||
NOPLAYERFOUND: <b>无法找到玩家 "<plugin>%1$s<b>"。
|
||||
ARGS:
|
||||
TOOFEW: '<b>参数过少。<i>示例用法:'
|
||||
TOOMANY: '<b>未知参数 "<plugin>%1$s<b>"。<i>示例用法:'
|
||||
OWNERS: '所有者:%1$s'
|
||||
PUBLICLAND: 公共帮派领土。
|
||||
FACTIONLESS: 无帮派
|
||||
SERVERADMIN: 服务器管理员
|
||||
DISABLED: 已禁用
|
||||
ENABLED: 已启用
|
||||
CONSOLEONLY: 此命令无法作为玩家运行。
|
||||
PLAYERONLY: <b>此命令只可被游戏内玩家运行。
|
||||
ASKYOURLEADER: '<i> 询问您的领袖来:'
|
||||
YOUSHOULD: '<i>您应:'
|
||||
YOUMAYWANT: '<i>您可能想要:'
|
||||
TRANSLATION:
|
||||
VERSION: '翻译:%1$s(%2$s,%3$s) 状态:%4$s'
|
||||
CONTRIBUTORS: '翻译贡献者:%1$s'
|
||||
RESPONSIBLE: '翻译负责人:%1$s'
|
||||
FACTIONTAG:
|
||||
TOOSHORT: <i>帮派标签不可少于 <h>%1$s<i> 个字符。
|
||||
TOOLONG: <i>帮派标签不可长于 <h>%s<i> 个字符。
|
||||
ALPHANUMERIC: <i>帮派标签必须为英文字母,"<h>%s<i>" 不被允许。
|
||||
COMPASS:
|
||||
SHORT:
|
||||
NORTH: 北
|
||||
EAST: 东
|
||||
SOUTH: 南
|
||||
WEST: 西
|
||||
ACTIONS:
|
||||
NOPERMISSION: '<b>{faction} 不允许您 {action}</b>'
|
||||
NOPERMISSIONPAINFUL: '<b>在 {faction} 的领土上尝试 {action} 是徒劳的</b>'
|
||||
OWNEDTERRITORYDENY: <b>您不可在此领土进行此操作,其被 {owners} 所拥有</b>
|
||||
OWNEDTERRITORYPAINDENY: <b>在 {owners} 的领土上尝试 {action} 是徒劳的</b>
|
||||
MUSTBE: '<b>您</b><h>必须为 {role}</h><b>才能 {action}。</b>'
|
||||
NOSAMEROLE: <b>{role} 无法控制相同等级的成员...</b>
|
||||
NOFACTION: '您不是任何帮派的成员。'
|
||||
CHAT:
|
||||
FACTION: 帮派聊天
|
||||
ALLIANCE: 盟友聊天
|
||||
PUBLIC: 公共聊天
|
||||
RELATION:
|
||||
MEMBER: 成员
|
||||
ALLY: 盟友
|
||||
NEUTRAL: 中立
|
||||
ENEMY: 敌人
|
||||
NOPAGES: <i>很抱歉,无页面可用。
|
||||
INVALIDPAGE: <i>无效页面,页面数必须介于 1 与 %1$d 之间。
|
||||
title: '&b帮派 &0|&r'
|
||||
wilderness: '&2荒野'
|
||||
wilderness-description: ''
|
||||
warzone: '&4战区'
|
||||
warzone-description: 估计不是最安全的地方。
|
||||
safezone: '&6安全区'
|
||||
safezone-description: 远离 PVP 及怪物。
|
||||
toggle-sb: 您已设置计分板至 {value}
|
||||
default-prefix: '{relationcolor}[{faction}] &r'
|
||||
faction-login: '&e%1$s &9已登录。'
|
||||
faction-logout: '&e%1$s &9已登出。'
|
||||
WARMUPS:
|
||||
NOTIFY:
|
||||
TELEPORT: '&e您将于 &d%2$d &e秒内传送至 &d%1$s &e。'
|
||||
ALREADY: '&c您已在准备传送。'
|
||||
CANCELLED: '&c您已取消了准备传送。'
|
||||
Reference in New Issue
Block a user