Compare commits
20 Commits
2.3.8-RC
...
renovate/c
| Author | SHA1 | Date | |
|---|---|---|---|
| 46829a60db | |||
|
|
5d3fe2a2f4 | ||
|
|
1becd7b299 | ||
|
|
f7c9de0664 | ||
|
|
7667e69cf2 | ||
|
|
1383e451f1 | ||
|
|
677c609ec8 | ||
|
|
09f1df49a9 | ||
|
|
dd94b45347 | ||
|
|
28b07fc6a4 | ||
|
|
11ea9bc1aa | ||
|
|
7f922fef28 | ||
|
|
81ef43768d | ||
|
|
1a19ee77ba | ||
|
|
0444517eec | ||
|
|
03077b62ba | ||
|
|
d98c647397 | ||
|
|
e9923344a2 | ||
|
|
cdc07ed5eb | ||
|
|
7b94367eb4 |
60
pom.xml
60
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<groupId>com.massivecraft</groupId>
|
<groupId>com.massivecraft</groupId>
|
||||||
<artifactId>Factions</artifactId>
|
<artifactId>Factions</artifactId>
|
||||||
<version>1.6.9.5-2.3.8-RC</version>
|
<version>1.6.9.5-2.4.1-RC</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>SaberFactions</name>
|
<name>SaberFactions</name>
|
||||||
@@ -41,10 +41,6 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||||
<relocations>
|
<relocations>
|
||||||
<relocation>
|
|
||||||
<pattern>com.github.cryptomorin</pattern>
|
|
||||||
<shadedPattern>com.massivecraft.factions.shade.github.cryptomorin</shadedPattern>
|
|
||||||
</relocation>
|
|
||||||
<relocation>
|
<relocation>
|
||||||
<pattern>com.github.stefvanschie.inventoryframework</pattern>
|
<pattern>com.github.stefvanschie.inventoryframework</pattern>
|
||||||
<shadedPattern>com.massivecraft.factions.shade.stefvanschie.inventoryframework</shadedPattern>
|
<shadedPattern>com.massivecraft.factions.shade.stefvanschie.inventoryframework</shadedPattern>
|
||||||
@@ -103,17 +99,10 @@
|
|||||||
<version>1.3</version>
|
<version>1.3</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.mojang</groupId>
|
|
||||||
<artifactId>brigadier</artifactId>
|
|
||||||
<version>1.0.14</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.stefvanschie.inventoryframework</groupId>
|
<groupId>com.github.stefvanschie.inventoryframework</groupId>
|
||||||
<artifactId>IF</artifactId>
|
<artifactId>IF</artifactId>
|
||||||
<version>0.5.8</version>
|
<version>0.5.19</version>
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
@@ -143,23 +132,6 @@
|
|||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</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>
|
|
||||||
<version>4.0.0.Final</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.milkbowl.vault</groupId>
|
<groupId>net.milkbowl.vault</groupId>
|
||||||
<artifactId>VaultAPI</artifactId>
|
<artifactId>VaultAPI</artifactId>
|
||||||
@@ -314,8 +286,12 @@
|
|||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>gson</artifactId>
|
<artifactId>*</artifactId>
|
||||||
<groupId>com.google.code.gson</groupId>
|
<groupId>shaded</groupId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>*</artifactId>
|
||||||
|
<groupId>gson</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
@@ -367,12 +343,6 @@
|
|||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.code.gson</groupId>
|
|
||||||
<artifactId>gson</artifactId>
|
|
||||||
<version>2.8.5</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>me.clip</groupId>
|
<groupId>me.clip</groupId>
|
||||||
<artifactId>placeholderapi</artifactId>
|
<artifactId>placeholderapi</artifactId>
|
||||||
@@ -415,6 +385,12 @@
|
|||||||
<artifactId>authlib</artifactId>
|
<artifactId>authlib</artifactId>
|
||||||
<version>1.5.21</version>
|
<version>1.5.21</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>*</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>me.rayzr522</groupId>
|
<groupId>me.rayzr522</groupId>
|
||||||
@@ -454,10 +430,10 @@
|
|||||||
<id>net.coreprotect</id>
|
<id>net.coreprotect</id>
|
||||||
<url>http://maven.playpro.com/</url>
|
<url>http://maven.playpro.com/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>codemc-repo</id>
|
<id>codemc-repo</id>
|
||||||
<url>https://repo.codemc.org/repository/maven-public/</url>
|
<url>https://repo.codemc.org/repository/maven-public/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>ess-repo</id>
|
<id>ess-repo</id>
|
||||||
<url>http://ci.ender.zone/plugin/repository/everything/</url>
|
<url>http://ci.ender.zone/plugin/repository/everything/</url>
|
||||||
|
|||||||
3
renovate.json
Normal file
3
renovate.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
||||||
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.massivecraft.factions;
|
package com.massivecraft.factions;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import com.massivecraft.factions.integration.dynmap.DynmapStyle;
|
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.DefaultPermissions;
|
||||||
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@@ -103,11 +103,6 @@ public class Conf {
|
|||||||
public static boolean worldGuardChecking = false;
|
public static boolean worldGuardChecking = false;
|
||||||
public static boolean worldGuardBuildPriority = false;
|
public static boolean worldGuardBuildPriority = false;
|
||||||
|
|
||||||
//SHIELDS
|
|
||||||
public static boolean useFShieldSystem = true;
|
|
||||||
public static int shieldTimeHours = 12;
|
|
||||||
public static int shieldFrameChangeCooldownHours = 24;
|
|
||||||
|
|
||||||
//RADIUS CLAIMING
|
//RADIUS CLAIMING
|
||||||
public static boolean useRadiusClaimSystem = true;
|
public static boolean useRadiusClaimSystem = true;
|
||||||
|
|
||||||
@@ -582,7 +577,7 @@ public class Conf {
|
|||||||
safeZoneNerfedCreatureTypes.add(EntityType.ENDERMAN);
|
safeZoneNerfedCreatureTypes.add(EntityType.ENDERMAN);
|
||||||
safeZoneNerfedCreatureTypes.add(EntityType.GHAST);
|
safeZoneNerfedCreatureTypes.add(EntityType.GHAST);
|
||||||
safeZoneNerfedCreatureTypes.add(EntityType.MAGMA_CUBE);
|
safeZoneNerfedCreatureTypes.add(EntityType.MAGMA_CUBE);
|
||||||
safeZoneNerfedCreatureTypes.add(EntityType.PIG_ZOMBIE);
|
if (!FactionsPlugin.getInstance().mc116) safeZoneNerfedCreatureTypes.add(EntityType.PIG_ZOMBIE);
|
||||||
safeZoneNerfedCreatureTypes.add(EntityType.SILVERFISH);
|
safeZoneNerfedCreatureTypes.add(EntityType.SILVERFISH);
|
||||||
safeZoneNerfedCreatureTypes.add(EntityType.SKELETON);
|
safeZoneNerfedCreatureTypes.add(EntityType.SKELETON);
|
||||||
safeZoneNerfedCreatureTypes.add(EntityType.SPIDER);
|
safeZoneNerfedCreatureTypes.add(EntityType.SPIDER);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.massivecraft.factions;
|
package com.massivecraft.factions;
|
||||||
|
|
||||||
import com.massivecraft.factions.cmd.shields.struct.frame.ShieldFramePersistence;
|
|
||||||
import com.massivecraft.factions.event.FactionDisbandEvent.PlayerDisbandReason;
|
import com.massivecraft.factions.event.FactionDisbandEvent.PlayerDisbandReason;
|
||||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||||
import com.massivecraft.factions.iface.RelationParticipator;
|
import com.massivecraft.factions.iface.RelationParticipator;
|
||||||
@@ -60,24 +59,6 @@ public interface Faction extends EconomyParticipator {
|
|||||||
|
|
||||||
void setDiscord(String link);
|
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();
|
void checkPerms();
|
||||||
|
|
||||||
double getReinforcedArmor();
|
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.ListParameterizedType;
|
||||||
import com.massivecraft.factions.cmd.reserve.ReserveAdapter;
|
import com.massivecraft.factions.cmd.reserve.ReserveAdapter;
|
||||||
import com.massivecraft.factions.cmd.reserve.ReserveObject;
|
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.Discord;
|
||||||
import com.massivecraft.factions.discord.DiscordListener;
|
import com.massivecraft.factions.discord.DiscordListener;
|
||||||
import com.massivecraft.factions.integration.Econ;
|
import com.massivecraft.factions.integration.Econ;
|
||||||
@@ -84,6 +81,7 @@ public class FactionsPlugin extends MPlugin {
|
|||||||
public boolean mc113 = false;
|
public boolean mc113 = false;
|
||||||
public boolean mc114 = false;
|
public boolean mc114 = false;
|
||||||
public boolean mc115 = false;
|
public boolean mc115 = false;
|
||||||
|
public boolean mc116 = false;
|
||||||
public boolean useNonPacketParticles = false;
|
public boolean useNonPacketParticles = false;
|
||||||
public List<String> itemList = getConfig().getStringList("fchest.Items-Not-Allowed");
|
public List<String> itemList = getConfig().getStringList("fchest.Items-Not-Allowed");
|
||||||
SkriptAddon skriptAddon;
|
SkriptAddon skriptAddon;
|
||||||
@@ -170,6 +168,10 @@ public class FactionsPlugin extends MPlugin {
|
|||||||
FactionsPlugin.instance.log("Minecraft Version 1.15 found.");
|
FactionsPlugin.instance.log("Minecraft Version 1.15 found.");
|
||||||
mc115 = true;
|
mc115 = true;
|
||||||
break;
|
break;
|
||||||
|
case 16:
|
||||||
|
FactionsPlugin.instance.log("Minecraft Version 1.16 found.");
|
||||||
|
mc116 = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
migrateFPlayerLeaders();
|
migrateFPlayerLeaders();
|
||||||
log("==== End Setup ====");
|
log("==== End Setup ====");
|
||||||
@@ -183,7 +185,7 @@ public class FactionsPlugin extends MPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
saveDefaultConfig();
|
saveDefaultConfig();
|
||||||
reloadConfig();
|
this.reloadConfig();
|
||||||
//Start wait task executor
|
//Start wait task executor
|
||||||
WaitExecutor.startTask();
|
WaitExecutor.startTask();
|
||||||
// Load Conf from disk
|
// Load Conf from disk
|
||||||
@@ -196,7 +198,6 @@ public class FactionsPlugin extends MPlugin {
|
|||||||
|
|
||||||
com.massivecraft.factions.integration.Essentials.setup();
|
com.massivecraft.factions.integration.Essentials.setup();
|
||||||
hookedPlayervaults = setupPlayervaults();
|
hookedPlayervaults = setupPlayervaults();
|
||||||
new ShieldTCMP();
|
|
||||||
FPlayers.getInstance().load();
|
FPlayers.getInstance().load();
|
||||||
Factions.getInstance().load();
|
Factions.getInstance().load();
|
||||||
|
|
||||||
@@ -220,7 +221,6 @@ public class FactionsPlugin extends MPlugin {
|
|||||||
|
|
||||||
Board.getInstance().load();
|
Board.getInstance().load();
|
||||||
Board.getInstance().clean();
|
Board.getInstance().clean();
|
||||||
new ShieldManagement();
|
|
||||||
//Load command aliases
|
//Load command aliases
|
||||||
Aliases.load();
|
Aliases.load();
|
||||||
// Add Base Commands
|
// Add Base Commands
|
||||||
@@ -430,7 +430,6 @@ public class FactionsPlugin extends MPlugin {
|
|||||||
.registerTypeAdapter(Inventory.class, new InventoryTypeAdapter())
|
.registerTypeAdapter(Inventory.class, new InventoryTypeAdapter())
|
||||||
.registerTypeAdapter(ReserveObject.class, new ReserveAdapter())
|
.registerTypeAdapter(ReserveObject.class, new ReserveAdapter())
|
||||||
.registerTypeAdapter(Location.class, new LocationTypeAdapter())
|
.registerTypeAdapter(Location.class, new LocationTypeAdapter())
|
||||||
.registerTypeAdapter(ShieldFrame.class, new ShieldFrameAdapter())
|
|
||||||
.registerTypeAdapterFactory(EnumTypeAdapter.ENUM_FACTORY);
|
.registerTypeAdapterFactory(EnumTypeAdapter.ENUM_FACTORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -488,6 +487,7 @@ public class FactionsPlugin extends MPlugin {
|
|||||||
Conf.save();
|
Conf.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Economy getEcon() {
|
public Economy getEcon() {
|
||||||
RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
|
RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
|
||||||
return rsp.getProvider();
|
return rsp.getProvider();
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.massivecraft.factions.FLocation;
|
import com.massivecraft.factions.FLocation;
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
import com.massivecraft.factions.struct.Permission;
|
import com.massivecraft.factions.struct.Permission;
|
||||||
import com.massivecraft.factions.util.ParticleEffect;
|
import com.massivecraft.factions.util.ParticleEffect;
|
||||||
import com.massivecraft.factions.util.VisualizeUtil;
|
import com.massivecraft.factions.util.VisualizeUtil;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import com.massivecraft.factions.zcore.util.TL;
|
import com.massivecraft.factions.zcore.util.TL;
|
||||||
import org.bukkit.*;
|
import org.bukkit.*;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public class CmdShow extends FCommand {
|
|||||||
Faction finalFaction = faction;
|
Faction finalFaction = faction;
|
||||||
instance.getServer().getScheduler().runTaskAsynchronously(instance, () -> {
|
instance.getServer().getScheduler().runTaskAsynchronously(instance, () -> {
|
||||||
for (String raw : finalShow) {
|
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) {
|
if (parsed == null) {
|
||||||
continue; // Due to minimal f show.
|
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.reserve.CmdReserve;
|
||||||
import com.massivecraft.factions.cmd.roles.CmdDemote;
|
import com.massivecraft.factions.cmd.roles.CmdDemote;
|
||||||
import com.massivecraft.factions.cmd.roles.CmdPromote;
|
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.CmdTnt;
|
||||||
import com.massivecraft.factions.cmd.tnt.CmdTntFill;
|
import com.massivecraft.factions.cmd.tnt.CmdTntFill;
|
||||||
import com.massivecraft.factions.cmd.wild.CmdWild;
|
import com.massivecraft.factions.cmd.wild.CmdWild;
|
||||||
@@ -172,7 +171,6 @@ public class FCmdRoot extends FCommand implements CommandExecutor {
|
|||||||
public CmdClaimFill cmdClaimFill = new CmdClaimFill();
|
public CmdClaimFill cmdClaimFill = new CmdClaimFill();
|
||||||
public CmdNotifications cmdNotifications = new CmdNotifications();
|
public CmdNotifications cmdNotifications = new CmdNotifications();
|
||||||
public CmdFriendlyFire cmdFriendlyFire = new CmdFriendlyFire();
|
public CmdFriendlyFire cmdFriendlyFire = new CmdFriendlyFire();
|
||||||
public CmdShield cmdShield = new CmdShield();
|
|
||||||
|
|
||||||
//Variables to know if we already setup certain sub commands
|
//Variables to know if we already setup certain sub commands
|
||||||
public Boolean discordEnabled = false;
|
public Boolean discordEnabled = false;
|
||||||
@@ -308,7 +306,6 @@ public class FCmdRoot extends FCommand implements CommandExecutor {
|
|||||||
this.addSubCommand(this.cmdLookup);
|
this.addSubCommand(this.cmdLookup);
|
||||||
this.addSubCommand(this.cmdNotifications);
|
this.addSubCommand(this.cmdNotifications);
|
||||||
this.addSubCommand(this.cmdFriendlyFire);
|
this.addSubCommand(this.cmdFriendlyFire);
|
||||||
this.addSubCommand(this.cmdShield);
|
|
||||||
addVariableCommands();
|
addVariableCommands();
|
||||||
if (CommodoreProvider.isSupported()) brigadierManager.build();
|
if (CommodoreProvider.isSupported()) brigadierManager.build();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.massivecraft.factions.cmd.audit;
|
package com.massivecraft.factions.cmd.audit;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.massivecraft.factions.cmd.check;
|
package com.massivecraft.factions.cmd.check;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.massivecraft.factions.Conf;
|
import com.massivecraft.factions.Conf;
|
||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import com.massivecraft.factions.zcore.frame.FactionGUI;
|
import com.massivecraft.factions.zcore.frame.FactionGUI;
|
||||||
import com.massivecraft.factions.zcore.util.TL;
|
import com.massivecraft.factions.zcore.util.TL;
|
||||||
import org.bukkit.DyeColor;
|
import org.bukkit.DyeColor;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.massivecraft.factions.cmd.check;
|
package com.massivecraft.factions.cmd.check;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import com.massivecraft.factions.zcore.frame.FactionGUI;
|
import com.massivecraft.factions.zcore.frame.FactionGUI;
|
||||||
import com.massivecraft.factions.zcore.util.TL;
|
import com.massivecraft.factions.zcore.util.TL;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
|||||||
@@ -31,13 +31,16 @@ public class CmdUnclaim extends FCommand {
|
|||||||
|
|
||||||
this.requirements = new CommandRequirements.Builder(Permission.UNCLAIM)
|
this.requirements = new CommandRequirements.Builder(Permission.UNCLAIM)
|
||||||
.playerOnly()
|
.playerOnly()
|
||||||
.memberOnly()
|
|
||||||
.withAction(PermissableAction.TERRITORY)
|
.withAction(PermissableAction.TERRITORY)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void perform(CommandContext context) {
|
public void perform(CommandContext context) {
|
||||||
|
if (!context.fPlayer.isAdminBypassing() && !context.fPlayer.hasFaction()) {
|
||||||
|
context.fPlayer.msg(TL.GENERIC_MEMBERONLY);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (context.args.size() == 2) {
|
if (context.args.size() == 2) {
|
||||||
Faction target = context.argAsFaction(1);
|
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;
|
package com.massivecraft.factions.cmd.tnt;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
import com.massivecraft.factions.cmd.Aliases;
|
import com.massivecraft.factions.cmd.Aliases;
|
||||||
import com.massivecraft.factions.cmd.CommandContext;
|
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.FCommand;
|
||||||
import com.massivecraft.factions.cmd.audit.FLogType;
|
import com.massivecraft.factions.cmd.audit.FLogType;
|
||||||
import com.massivecraft.factions.struct.Permission;
|
import com.massivecraft.factions.struct.Permission;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
||||||
import com.massivecraft.factions.zcore.util.TL;
|
import com.massivecraft.factions.zcore.util.TL;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.massivecraft.factions.cmd.wild;
|
package com.massivecraft.factions.cmd.wild;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import com.massivecraft.factions.util.wait.WaitExecutor;
|
import com.massivecraft.factions.util.wait.WaitExecutor;
|
||||||
import com.massivecraft.factions.util.wait.WaitTask;
|
import com.massivecraft.factions.util.wait.WaitTask;
|
||||||
import com.massivecraft.factions.zcore.frame.FactionGUI;
|
import com.massivecraft.factions.zcore.frame.FactionGUI;
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ public class TempLine {
|
|||||||
if (line.p1.x == this.p1.x && line.p2.x == this.p2.x && line.p1.y == this.p1.y && line.p2.y == this.p2.y) {
|
if (line.p1.x == this.p1.x && line.p2.x == this.p2.x && line.p1.y == this.p1.y && line.p2.y == this.p2.y) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return line.p1.x == this.p2.x && line.p2.x == this.p1.x && line.p1.y == this.p2.y && line.p2.y == this.p1.y;
|
return line.p1.x == this.p2.x && line.p2.x == this.p1.x && line.p1.y == this.p2.y && line.p2.y == this.p1.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.massivecraft.factions.listeners;
|
package com.massivecraft.factions.listeners;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.massivecraft.factions.*;
|
import com.massivecraft.factions.*;
|
||||||
import com.massivecraft.factions.cmd.audit.FLogManager;
|
import com.massivecraft.factions.cmd.audit.FLogManager;
|
||||||
import com.massivecraft.factions.cmd.audit.LogTimer;
|
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.Relation;
|
||||||
import com.massivecraft.factions.struct.Role;
|
import com.massivecraft.factions.struct.Role;
|
||||||
import com.massivecraft.factions.util.ItemBuilder;
|
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.Access;
|
||||||
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
||||||
import com.massivecraft.factions.zcore.util.TL;
|
import com.massivecraft.factions.zcore.util.TL;
|
||||||
@@ -430,7 +430,7 @@ public class FactionsBlockListener implements Listener {
|
|||||||
if (!justCheck) fPlayer.setLastFrostwalkerMessage();
|
if (!justCheck) fPlayer.setLastFrostwalkerMessage();
|
||||||
|
|
||||||
// Check if they have build permissions here. If not, block this from happening.
|
// 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);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -512,7 +512,6 @@ public class FactionsBlockListener implements Listener {
|
|||||||
Player p = (Player) event.getRemover();
|
Player p = (Player) event.getRemover();
|
||||||
if (!playerCanBuildDestroyBlock(p, event.getEntity().getLocation(), "destroy", true)) {
|
if (!playerCanBuildDestroyBlock(p, event.getEntity().getLocation(), "destroy", true)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -522,7 +521,7 @@ public class FactionsBlockListener implements Listener {
|
|||||||
public void onFarmLandDamage(EntityChangeBlockEvent event) {
|
public void onFarmLandDamage(EntityChangeBlockEvent event) {
|
||||||
if (event.getEntity() instanceof Player) {
|
if (event.getEntity() instanceof Player) {
|
||||||
Player player = (Player) event.getEntity();
|
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);
|
FPlayer me = FPlayers.getInstance().getByPlayer(player);
|
||||||
Faction otherFaction = Board.getInstance().getFactionAt(new FLocation(event.getBlock().getLocation()));
|
Faction otherFaction = Board.getInstance().getFactionAt(new FLocation(event.getBlock().getLocation()));
|
||||||
me.msg(TL.ACTION_DENIED_OTHER, otherFaction.getTag(), "trample crops");
|
me.msg(TL.ACTION_DENIED_OTHER, otherFaction.getTag(), "trample crops");
|
||||||
@@ -530,4 +529,4 @@ public class FactionsBlockListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -257,7 +257,6 @@ public class FactionsEntityListener implements Listener {
|
|||||||
|
|
||||||
private boolean checkExplosionForBlock(Entity boomer, Block block) {
|
private boolean checkExplosionForBlock(Entity boomer, Block block) {
|
||||||
Faction faction = Board.getInstance().getFactionAt(new FLocation(block.getLocation()));
|
Faction faction = Board.getInstance().getFactionAt(new FLocation(block.getLocation()));
|
||||||
if (faction.isProtected()) return false;
|
|
||||||
|
|
||||||
if (faction.noExplosionsInTerritory() || (faction.isPeaceful() && Conf.peacefulTerritoryDisableBoom))
|
if (faction.noExplosionsInTerritory() || (faction.isPeaceful() && Conf.peacefulTerritoryDisableBoom))
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.massivecraft.factions.listeners;
|
package com.massivecraft.factions.listeners;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.massivecraft.factions.Conf;
|
import com.massivecraft.factions.Conf;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.massivecraft.factions.listeners;
|
package com.massivecraft.factions.listeners;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.massivecraft.factions.*;
|
import com.massivecraft.factions.*;
|
||||||
import com.massivecraft.factions.cmd.CmdFGlobal;
|
import com.massivecraft.factions.cmd.CmdFGlobal;
|
||||||
import com.massivecraft.factions.cmd.CmdFly;
|
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.struct.Role;
|
||||||
import com.massivecraft.factions.util.CC;
|
import com.massivecraft.factions.util.CC;
|
||||||
import com.massivecraft.factions.util.VisualizeUtil;
|
import com.massivecraft.factions.util.VisualizeUtil;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import com.massivecraft.factions.util.wait.WaitExecutor;
|
import com.massivecraft.factions.util.wait.WaitExecutor;
|
||||||
import com.massivecraft.factions.zcore.fperms.Access;
|
import com.massivecraft.factions.zcore.fperms.Access;
|
||||||
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
||||||
@@ -335,36 +335,131 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static PermissableAction GetPermissionFromUsableBlock(Material material) {
|
private static PermissableAction GetPermissionFromUsableBlock(Material material) {
|
||||||
if (material.name().contains("_BUTTON")
|
// Check for doors that might have diff material name in old version.
|
||||||
|| material.name().contains("COMPARATOR")
|
if (material.name().contains("DOOR") || material.name().contains("FENCE_GATE"))
|
||||||
|| material.name().contains("PRESSURE")
|
return PermissableAction.DOOR;
|
||||||
|| material.name().contains("REPEATER")
|
if (material.name().toUpperCase().contains("BUTTON") || material.name().toUpperCase().contains("PRESSURE") || material.name().contains("DIODE") || material.name().contains("COMPARATOR"))
|
||||||
|| material.name().contains("DIODE")) return PermissableAction.BUTTON;
|
return PermissableAction.BUTTON;
|
||||||
if (material.name().contains("_DOOR")
|
if (FactionsPlugin.instance.mc113 || FactionsPlugin.instance.mc114 || FactionsPlugin.getInstance().mc115) {
|
||||||
|| material.name().contains("_TRAPDOOR")
|
switch (material) {
|
||||||
|| material.name().contains("_FENCE_GATE")
|
case LEVER:
|
||||||
|| material.name().startsWith("FENCE_GATE")) return PermissableAction.DOOR;
|
return PermissableAction.LEVER;
|
||||||
if (material.name().contains("SHULKER_BOX")
|
case ACACIA_BUTTON:
|
||||||
|| material.name().endsWith("ANVIL")
|
case BIRCH_BUTTON:
|
||||||
|| material.name().startsWith("CHEST_MINECART")
|
case DARK_OAK_BUTTON:
|
||||||
|| material.name().endsWith("CHEST")
|
case JUNGLE_BUTTON:
|
||||||
|| material.name().endsWith("JUKEBOX")
|
case OAK_BUTTON:
|
||||||
|| material.name().endsWith("CAULDRON")
|
case SPRUCE_BUTTON:
|
||||||
|| material.name().endsWith("FURNACE")
|
case STONE_BUTTON:
|
||||||
|| material.name().endsWith("HOPPER")
|
case COMPARATOR:
|
||||||
|| material.name().endsWith("BEACON")
|
case REPEATER:
|
||||||
|| material.name().startsWith("TRAPPED_CHEST")
|
return PermissableAction.BUTTON;
|
||||||
|| material.name().equalsIgnoreCase("ENCHANTING_TABLE")
|
|
||||||
|| material.name().equalsIgnoreCase("ENCHANTMENT_TABLE")
|
case ACACIA_DOOR:
|
||||||
|| material.name().endsWith("BREWING_STAND")
|
case BIRCH_DOOR:
|
||||||
|| material.name().equalsIgnoreCase("BARREL")) return PermissableAction.CONTAINER;
|
case IRON_DOOR:
|
||||||
if (material.name().endsWith("LEVER")) return PermissableAction.LEVER;
|
case JUNGLE_DOOR:
|
||||||
switch (material) {
|
case OAK_DOOR:
|
||||||
case DISPENSER:
|
case SPRUCE_DOOR:
|
||||||
case DROPPER:
|
case DARK_OAK_DOOR:
|
||||||
return PermissableAction.CONTAINER;
|
|
||||||
default:
|
case ACACIA_TRAPDOOR:
|
||||||
return null;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -394,7 +489,7 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
|
|
||||||
if (FactionsPlugin.instance.getConfig().getBoolean("scoreboard.default-enabled", false)) {
|
if (FactionsPlugin.instance.getConfig().getBoolean("scoreboard.default-enabled", false)) {
|
||||||
FScoreboard.init(me);
|
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());
|
FScoreboard.get(me).setSidebarVisibility(me.showScoreboard());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -469,7 +564,7 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
|
|
||||||
CmdSeeChunk.seeChunkMap.remove(event.getPlayer().getName());
|
CmdSeeChunk.seeChunkMap.remove(event.getPlayer().getName());
|
||||||
|
|
||||||
FScoreboard.remove(me);
|
FScoreboard.remove(me, event.getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
public String parseAllPlaceholders(String string, Faction faction, Player player) {
|
public String parseAllPlaceholders(String string, Faction faction, Player player) {
|
||||||
@@ -642,7 +737,9 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
me.attemptClaim(me.getAutoClaimFor(), newLocation, true);
|
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(","));
|
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()) {
|
} else if (me.isAutoSafeClaimEnabled()) {
|
||||||
if (!Permission.MANAGE_SAFE_ZONE.has(player)) {
|
if (!Permission.MANAGE_SAFE_ZONE.has(player)) {
|
||||||
me.setIsAutoSafeClaimEnabled(false);
|
me.setIsAutoSafeClaimEnabled(false);
|
||||||
@@ -715,11 +812,7 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
Material type;
|
Material type;
|
||||||
if (event.getItem() != null) {
|
if (event.getItem() != null) {
|
||||||
// Convert 1.8 Material Names -> 1.15
|
// Convert 1.8 Material Names -> 1.15
|
||||||
try {
|
type = XMaterial.matchXMaterial(event.getItem().getType().toString()).get().parseMaterial();
|
||||||
type = XMaterial.matchXMaterial(event.getItem().getType().toString()).get().parseMaterial();
|
|
||||||
} catch (NullPointerException npe) {
|
|
||||||
type = null;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
type = null;
|
type = null;
|
||||||
}
|
}
|
||||||
@@ -768,7 +861,7 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
Block block = event.getClickedBlock();
|
Block block = event.getClickedBlock();
|
||||||
if (event.getAction() == Action.RIGHT_CLICK_BLOCK && block.getType() == XMaterial.GRASS_BLOCK.parseMaterial()
|
if (event.getAction() == Action.RIGHT_CLICK_BLOCK && block.getType() == XMaterial.GRASS_BLOCK.parseMaterial()
|
||||||
&& event.hasItem() && event.getItem().getType() == XMaterial.BONE_MEAL.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());
|
FPlayer me = FPlayers.getInstance().getById(event.getPlayer().getUniqueId().toString());
|
||||||
Faction myFaction = me.getFaction();
|
Faction myFaction = me.getFaction();
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.massivecraft.factions.missions;
|
package com.massivecraft.factions.missions;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import com.massivecraft.factions.zcore.frame.FactionGUI;
|
import com.massivecraft.factions.zcore.frame.FactionGUI;
|
||||||
import com.massivecraft.factions.zcore.util.TL;
|
import com.massivecraft.factions.zcore.util.TL;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
|||||||
@@ -9,15 +9,27 @@ import org.bukkit.scoreboard.Team;
|
|||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
public class BufferedObjective {
|
public class BufferedObjective {
|
||||||
|
|
||||||
/**
|
|
||||||
* @author FactionsUUID Team
|
|
||||||
*/
|
|
||||||
|
|
||||||
private static final Method addEntryMethod;
|
private static final Method addEntryMethod;
|
||||||
private static final int MAX_LINE_LENGTH;
|
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 {
|
static {
|
||||||
// Check for long line support.
|
// 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) {
|
public BufferedObjective(Scoreboard scoreboard) {
|
||||||
this.scoreboard = scoreboard;
|
this.scoreboard = scoreboard;
|
||||||
this.baseName = createBaseName();
|
this.baseName = createBaseName();
|
||||||
@@ -122,14 +123,75 @@ public class BufferedObjective {
|
|||||||
Team team = scoreboard.registerNewTeam(getNextTeamName());
|
Team team = scoreboard.registerNewTeam(getNextTeamName());
|
||||||
bufferTeams.add(team);
|
bufferTeams.add(team);
|
||||||
|
|
||||||
Iterator<String> split = Splitter.fixedLength(16).split(entry.getValue()).iterator();
|
String name, prefix = null, suffix = null;
|
||||||
|
|
||||||
team.setPrefix(split.next());
|
String value = entry.getValue();
|
||||||
String name = split.next();
|
if (value.length() > 16) {
|
||||||
if (split.hasNext()) { // We only guarantee two splits
|
String[] arrImAPirate = new String[3];
|
||||||
team.setSuffix(split.next());
|
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 {
|
try {
|
||||||
addEntryMethod.invoke(team, name);
|
addEntryMethod.invoke(team, name);
|
||||||
} catch (ReflectiveOperationException ignored) {
|
} catch (ReflectiveOperationException ignored) {
|
||||||
|
|||||||
@@ -58,10 +58,13 @@ public class FScoreboard {
|
|||||||
FTeamWrapper.track(fboard);
|
FTeamWrapper.track(fboard);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void remove(FPlayer fplayer) {
|
public static void remove(FPlayer fplayer, Player player) {
|
||||||
FScoreboard fboard = fscoreboards.remove(fplayer);
|
FScoreboard fboard = fscoreboards.remove(fplayer);
|
||||||
|
|
||||||
if (fboard != null) {
|
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;
|
fboard.removed = true;
|
||||||
FTeamWrapper.untrack(fboard);
|
FTeamWrapper.untrack(fboard);
|
||||||
}
|
}
|
||||||
@@ -91,7 +94,7 @@ public class FScoreboard {
|
|||||||
bufferedObjective.setDisplaySlot(visible ? DisplaySlot.SIDEBAR : null);
|
bufferedObjective.setDisplaySlot(visible ? DisplaySlot.SIDEBAR : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDefaultSidebar(final FSidebarProvider provider, int updateInterval) {
|
public void setDefaultSidebar(final FSidebarProvider provider) {
|
||||||
if (!isSupportedByServer()) {
|
if (!isSupportedByServer()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -114,7 +117,7 @@ public class FScoreboard {
|
|||||||
updateObjective();
|
updateObjective();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.runTaskTimer(FactionsPlugin.getInstance(), updateInterval, updateInterval);
|
}.runTaskTimer(FactionsPlugin.getInstance(), 20, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTemporarySidebar(final FSidebarProvider provider) {
|
public void setTemporarySidebar(final FSidebarProvider provider) {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.massivecraft.factions.scoreboards;
|
|||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
|
import com.massivecraft.factions.tag.Tag;
|
||||||
import com.massivecraft.factions.zcore.util.TL;
|
import com.massivecraft.factions.zcore.util.TL;
|
||||||
import com.massivecraft.factions.zcore.util.TagUtil;
|
import com.massivecraft.factions.zcore.util.TagUtil;
|
||||||
|
|
||||||
@@ -20,16 +21,16 @@ public abstract class FSidebarProvider {
|
|||||||
public abstract List<String> getLines(FPlayer fplayer);
|
public abstract List<String> getLines(FPlayer fplayer);
|
||||||
|
|
||||||
public String replaceTags(FPlayer fPlayer, String s) {
|
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) {
|
public String replaceTags(Faction faction, FPlayer fPlayer, String s) {
|
||||||
// Run through Placeholder API first
|
// 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) {
|
private String qualityAssure(String line) {
|
||||||
|
|||||||
@@ -19,8 +19,9 @@ public class FTeamWrapper {
|
|||||||
|
|
||||||
private static final Map<Faction, FTeamWrapper> wrappers = new HashMap<>();
|
private static final Map<Faction, FTeamWrapper> wrappers = new HashMap<>();
|
||||||
private static final List<FScoreboard> tracking = new ArrayList<>();
|
private static final List<FScoreboard> tracking = new ArrayList<>();
|
||||||
private static final Set<Faction> updating = new HashSet<>();
|
|
||||||
private static int factionTeamPtr;
|
private static int factionTeamPtr;
|
||||||
|
private static final Set<Faction> updating = new HashSet<>();
|
||||||
|
|
||||||
private final Map<FScoreboard, Team> teams = new HashMap<>();
|
private final Map<FScoreboard, Team> teams = new HashMap<>();
|
||||||
private final String teamName;
|
private final String teamName;
|
||||||
private final Faction faction;
|
private final Faction faction;
|
||||||
@@ -36,18 +37,11 @@ public class FTeamWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void applyUpdatesLater(final Faction faction) {
|
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;
|
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)) {
|
if (updating.add(faction)) {
|
||||||
Bukkit.getScheduler().runTask(FactionsPlugin.getInstance(), () -> {
|
Bukkit.getScheduler().runTask(FactionsPlugin.getInstance(), () -> {
|
||||||
@@ -58,22 +52,17 @@ public class FTeamWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void applyUpdates(Faction faction) {
|
public static void applyUpdates(Faction faction) {
|
||||||
if (!FScoreboard.isSupportedByServer()) {
|
if (!FScoreboard.isSupportedByServer()) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (faction.isWilderness()) {
|
if (faction.isWilderness()) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("scoreboard.default-prefixes", false) || FactionsPlugin.getInstance().getConfig().getBoolean("See-Invisible-Faction-Members")) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (updating.contains(faction)) {
|
if (!FactionsPlugin.getInstance().getConfig().getBoolean("scoreboard.default-prefixes", false)
|
||||||
// Faction will be updated soon.
|
|| FactionsPlugin.getInstance().getConfig().getBoolean("See-Invisible-Faction-Members"))
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
|
if (updating.contains(faction)) return;
|
||||||
|
|
||||||
FTeamWrapper wrapper = wrappers.get(faction);
|
FTeamWrapper wrapper = wrappers.get(faction);
|
||||||
Set<FPlayer> factionMembers = faction.getFPlayers();
|
Set<FPlayer> factionMembers = faction.getFPlayers();
|
||||||
@@ -98,21 +87,16 @@ public class FTeamWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (FPlayer fmember : factionMembers) {
|
for (FPlayer fmember : factionMembers) {
|
||||||
if (!fmember.isOnline()) {
|
if (!fmember.isOnline()) continue;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Scoreboard might not have player; add him/her
|
// Scoreboard might not have player; add him/her
|
||||||
wrapper.addPlayer(fmember.getPlayer());
|
wrapper.addPlayer(fmember.getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
wrapper.updatePrefixes();
|
wrapper.updatePrefixes();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void updatePrefixes(Faction faction) {
|
public static void updatePrefixes(Faction faction) {
|
||||||
if (!FScoreboard.isSupportedByServer()) {
|
if (!FScoreboard.isSupportedByServer()) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!wrappers.containsKey(faction)) {
|
if (!wrappers.containsKey(faction)) {
|
||||||
applyUpdates(faction);
|
applyUpdates(faction);
|
||||||
@@ -122,34 +106,22 @@ public class FTeamWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected static void track(FScoreboard fboard) {
|
protected static void track(FScoreboard fboard) {
|
||||||
if (!FScoreboard.isSupportedByServer()) {
|
if (!FScoreboard.isSupportedByServer()) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
tracking.add(fboard);
|
tracking.add(fboard);
|
||||||
for (FTeamWrapper wrapper : wrappers.values()) {
|
for (FTeamWrapper wrapper : wrappers.values()) wrapper.add(fboard);
|
||||||
wrapper.add(fboard);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void untrack(FScoreboard fboard) {
|
protected static void untrack(FScoreboard fboard) {
|
||||||
if (!FScoreboard.isSupportedByServer()) {
|
if (!FScoreboard.isSupportedByServer()) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
tracking.remove(fboard);
|
tracking.remove(fboard);
|
||||||
for (FTeamWrapper wrapper : wrappers.values()) {
|
for (FTeamWrapper wrapper : wrappers.values()) wrapper.remove(fboard);
|
||||||
wrapper.remove(fboard);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void add(FScoreboard fboard) {
|
private void add(FScoreboard fboard) {
|
||||||
Scoreboard board = fboard.getScoreboard();
|
Scoreboard board = fboard.getScoreboard();
|
||||||
Team team = board.registerNewTeam(teamName);
|
Team team = board.registerNewTeam(teamName);
|
||||||
teams.put(fboard, team);
|
teams.put(fboard, team);
|
||||||
|
for (OfflinePlayer player : getPlayers()) team.addPlayer(player);
|
||||||
for (OfflinePlayer player : getPlayers()) {
|
|
||||||
team.addPlayer(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
updatePrefix(fboard);
|
updatePrefix(fboard);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,9 +131,7 @@ public class FTeamWrapper {
|
|||||||
|
|
||||||
private void updatePrefixes() {
|
private void updatePrefixes() {
|
||||||
if (FactionsPlugin.getInstance().getConfig().getBoolean("scoreboard.default-prefixes", false)) {
|
if (FactionsPlugin.getInstance().getConfig().getBoolean("scoreboard.default-prefixes", false)) {
|
||||||
for (FScoreboard fboard : teams.keySet()) {
|
for (FScoreboard fboard : teams.keySet()) updatePrefix(fboard);
|
||||||
updatePrefix(fboard);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.massivecraft.factions.shop;
|
package com.massivecraft.factions.shop;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.github.stefvanschie.inventoryframework.Gui;
|
import com.github.stefvanschie.inventoryframework.Gui;
|
||||||
import com.github.stefvanschie.inventoryframework.GuiItem;
|
import com.github.stefvanschie.inventoryframework.GuiItem;
|
||||||
import com.github.stefvanschie.inventoryframework.pane.PaginatedPane;
|
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.FPlayers;
|
||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import com.massivecraft.factions.zcore.util.TL;
|
import com.massivecraft.factions.zcore.util.TL;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
|||||||
@@ -134,7 +134,6 @@ public enum Permission {
|
|||||||
SCOREBOARD("scoreboard"),
|
SCOREBOARD("scoreboard"),
|
||||||
SEECHUNK("seechunk"),
|
SEECHUNK("seechunk"),
|
||||||
SETWARP("setwarp"),
|
SETWARP("setwarp"),
|
||||||
SHIELD("shield"),
|
|
||||||
SHOP("shop"),
|
SHOP("shop"),
|
||||||
TOP("top"),
|
TOP("top"),
|
||||||
VIEWCHEST("viewchest"),
|
VIEWCHEST("viewchest"),
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.massivecraft.factions.struct;
|
package com.massivecraft.factions.struct;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.massivecraft.factions.Conf;
|
import com.massivecraft.factions.Conf;
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import com.massivecraft.factions.zcore.fperms.Permissable;
|
import com.massivecraft.factions.zcore.fperms.Permissable;
|
||||||
import com.massivecraft.factions.zcore.util.TL;
|
import com.massivecraft.factions.zcore.util.TL;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.massivecraft.factions.struct;
|
package com.massivecraft.factions.struct;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.massivecraft.factions.Conf;
|
import com.massivecraft.factions.Conf;
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import com.massivecraft.factions.zcore.fperms.Permissable;
|
import com.massivecraft.factions.zcore.fperms.Permissable;
|
||||||
import com.massivecraft.factions.zcore.util.TL;
|
import com.massivecraft.factions.zcore.util.TL;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ import com.massivecraft.factions.Faction;
|
|||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
import com.massivecraft.factions.integration.Econ;
|
import com.massivecraft.factions.integration.Econ;
|
||||||
import com.massivecraft.factions.struct.Relation;
|
import com.massivecraft.factions.struct.Relation;
|
||||||
|
import com.massivecraft.factions.util.timer.DateTimeFormats;
|
||||||
import com.massivecraft.factions.zcore.util.TL;
|
import com.massivecraft.factions.zcore.util.TL;
|
||||||
|
import org.apache.commons.lang.time.DurationFormatUtils;
|
||||||
|
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
import java.util.function.Function;
|
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())),
|
JOINING("{joining}", (fac) -> (fac.getOpen() ? TL.COMMAND_SHOW_UNINVITED.toString() : TL.COMMAND_SHOW_INVITATION.toString())),
|
||||||
FACTION("{faction}", (Function<Faction, String>) Faction::getTag),
|
FACTION("{faction}", (Function<Faction, String>) Faction::getTag),
|
||||||
FACTION_RELATION_COLOR("{faction-relation-color}", (fac, fp) -> fp == null ? "" : fp.getColorTo(fac).toString()),
|
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}"),
|
HOME_WORLD("{world}", (fac) -> fac.hasHome() ? fac.getHome().getWorld().getName() : Tag.isMinimalShow() ? null : "{ig}"),
|
||||||
RAIDABLE("{raidable}", (fac) -> {
|
RAIDABLE("{raidable}", (fac) -> {
|
||||||
if (FactionsPlugin.getInstance().getConfig().getBoolean("hcf.raidable", false)) {
|
if (FactionsPlugin.getInstance().getConfig().getBoolean("hcf.raidable", false)) {
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ package com.massivecraft.factions.util;
|
|||||||
* Creation Date: 4/4/2020
|
* Creation Date: 4/4/2020
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Color;
|
import org.bukkit.Color;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
|||||||
2087
src/main/java/com/massivecraft/factions/util/XMaterial.java
Normal file
2087
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;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
|
|
||||||
public enum Access {
|
public enum Access {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Illyria Team
|
||||||
|
*/
|
||||||
|
|
||||||
ALLOW("Allow"),
|
ALLOW("Allow"),
|
||||||
UNDEFINED("Undefined"),
|
DENY("Deny"),
|
||||||
DENY("Deny");
|
UNDEFINED("Undefined");
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
|
|
||||||
@@ -26,6 +31,11 @@ public enum Access {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Access booleanToAccess(boolean access) {
|
||||||
|
if (access) return Access.ALLOW;
|
||||||
|
else return Access.DENY;
|
||||||
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return this.name.toLowerCase();
|
return this.name.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ public class DefaultPermissions {
|
|||||||
public boolean chest;
|
public boolean chest;
|
||||||
public boolean check;
|
public boolean check;
|
||||||
public boolean drain;
|
public boolean drain;
|
||||||
public boolean shield;
|
|
||||||
public boolean spawner;
|
public boolean spawner;
|
||||||
|
|
||||||
public DefaultPermissions() {
|
public DefaultPermissions() {
|
||||||
@@ -69,7 +68,6 @@ public class DefaultPermissions {
|
|||||||
this.chest = def;
|
this.chest = def;
|
||||||
this.check = def;
|
this.check = def;
|
||||||
this.drain = def;
|
this.drain = def;
|
||||||
this.shield = def;
|
|
||||||
this.spawner = def;
|
this.spawner = def;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,7 +99,6 @@ public class DefaultPermissions {
|
|||||||
boolean canChest,
|
boolean canChest,
|
||||||
boolean canCheck,
|
boolean canCheck,
|
||||||
boolean canDrain,
|
boolean canDrain,
|
||||||
boolean canShield,
|
|
||||||
boolean canSpawners) {
|
boolean canSpawners) {
|
||||||
this.ban = canBan;
|
this.ban = canBan;
|
||||||
this.build = canBuild;
|
this.build = canBuild;
|
||||||
@@ -131,7 +128,6 @@ public class DefaultPermissions {
|
|||||||
this.chest = canChest;
|
this.chest = canChest;
|
||||||
this.check = canCheck;
|
this.check = canCheck;
|
||||||
this.drain = canDrain;
|
this.drain = canDrain;
|
||||||
this.shield = canShield;
|
|
||||||
this.spawner = canSpawners;
|
this.spawner = canSpawners;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,7 +161,6 @@ public class DefaultPermissions {
|
|||||||
else if (name == "chest") return this.chest;
|
else if (name == "chest") return this.chest;
|
||||||
else if (name == "check") return this.check;
|
else if (name == "check") return this.check;
|
||||||
else if (name == "drain") return this.drain;
|
else if (name == "drain") return this.drain;
|
||||||
else if (name == "shield") return this.shield;
|
|
||||||
else if (name == "spawner") return this.spawner;
|
else if (name == "spawner") return this.spawner;
|
||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
package com.massivecraft.factions.zcore.fperms;
|
package com.massivecraft.factions.zcore.fperms;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
import com.massivecraft.factions.util.Placeholder;
|
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.configuration.ConfigurationSection;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
@@ -47,7 +46,6 @@ public enum PermissableAction {
|
|||||||
WITHDRAW("withdraw"),
|
WITHDRAW("withdraw"),
|
||||||
CHEST("chest"),
|
CHEST("chest"),
|
||||||
CHECK("check"),
|
CHECK("check"),
|
||||||
SHIELD("shield"),
|
|
||||||
SPAWNER("spawner");
|
SPAWNER("spawner");
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
@@ -68,7 +66,6 @@ public enum PermissableAction {
|
|||||||
return permissableAction;
|
return permissableAction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,29 +106,16 @@ public enum PermissableAction {
|
|||||||
ConfigurationSection section = FactionsPlugin.getInstance().getConfig().getConfigurationSection("fperm-gui.action");
|
ConfigurationSection section = FactionsPlugin.getInstance().getConfig().getConfigurationSection("fperm-gui.action");
|
||||||
ItemStack item = XMaterial.matchXMaterial(section.getString("Materials." + this.name)).get().parseItem();
|
ItemStack item = XMaterial.matchXMaterial(section.getString("Materials." + this.name)).get().parseItem();
|
||||||
ItemMeta meta = item.getItemMeta();
|
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.
|
meta.setDisplayName(FactionsPlugin.getInstance().color(section.getString("placeholder-item.name").replace("{action}", this.name)));
|
||||||
if (fme.getFaction().getPermissions().get(perm) == null) {
|
List<String> lore = section.getStringList("placeholder-item.lore");
|
||||||
fme.getFaction().setDefaultPerms();
|
|
||||||
fme.getFaction().sendMessage(TL.SYSTEM_PERMISSIONS_RESET.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
// TEMP: This check is required for factions created before `Undefined` permission was removed
|
lore = FactionsPlugin.getInstance().replacePlaceholders(lore,
|
||||||
if (fme.getFaction().getPermissions().get(perm).get(this) == Access.UNDEFINED) {
|
new Placeholder("{action-access-color}", fme.getFaction().getPermissions().get(perm).get(this).getColor()),
|
||||||
fme.getFaction().getPermissions().get(perm).put(this, Access.DENY);
|
new Placeholder("{action-access}", fme.getFaction().getPermissions().get(perm).get(this).getName()));
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
meta.setLore(FactionsPlugin.getInstance().colorList(lore));
|
||||||
|
item.setItemMeta(meta);
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package com.massivecraft.factions.zcore.fperms.gui;
|
package com.massivecraft.factions.zcore.fperms.gui;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.github.stefvanschie.inventoryframework.Gui;
|
import com.github.stefvanschie.inventoryframework.Gui;
|
||||||
import com.github.stefvanschie.inventoryframework.GuiItem;
|
import com.github.stefvanschie.inventoryframework.GuiItem;
|
||||||
import com.github.stefvanschie.inventoryframework.pane.PaginatedPane;
|
import com.github.stefvanschie.inventoryframework.pane.PaginatedPane;
|
||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import com.massivecraft.factions.zcore.fperms.Access;
|
import com.massivecraft.factions.zcore.fperms.Access;
|
||||||
import com.massivecraft.factions.zcore.fperms.Permissable;
|
import com.massivecraft.factions.zcore.fperms.Permissable;
|
||||||
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
||||||
@@ -17,17 +17,22 @@ import org.bukkit.inventory.meta.ItemMeta;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class PermissableActionFrame {
|
public class PermissableActionFrame {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Illyria Team
|
||||||
|
*/
|
||||||
|
|
||||||
private Gui gui;
|
private Gui gui;
|
||||||
private ConfigurationSection section;
|
|
||||||
|
|
||||||
public PermissableActionFrame(Faction f) {
|
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(),
|
gui = new Gui(FactionsPlugin.getInstance(),
|
||||||
section.getInt("rows", 3),
|
section.getInt("rows", 4),
|
||||||
FactionsPlugin.getInstance().color(FactionsPlugin.getInstance().getConfig().getString("fperm-gui.action.name").replace("{faction}", f.getTag())));
|
FactionsPlugin.getInstance().color(Objects.requireNonNull(FactionsPlugin.getInstance().getConfig().getString("fperm-gui.action.name")).replace("{faction}", f.getTag())));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void buildGUI(FPlayer fplayer, Permissable perm) {
|
public void buildGUI(FPlayer fplayer, Permissable perm) {
|
||||||
@@ -99,9 +104,6 @@ public class PermissableActionFrame {
|
|||||||
meta.setDisplayName(FactionsPlugin.getInstance().color(config.getString("Name")));
|
meta.setDisplayName(FactionsPlugin.getInstance().color(config.getString("Name")));
|
||||||
item.setItemMeta(meta);
|
item.setItemMeta(meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.massivecraft.factions.zcore.fperms.gui;
|
package com.massivecraft.factions.zcore.fperms.gui;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.github.stefvanschie.inventoryframework.Gui;
|
import com.github.stefvanschie.inventoryframework.Gui;
|
||||||
import com.github.stefvanschie.inventoryframework.GuiItem;
|
import com.github.stefvanschie.inventoryframework.GuiItem;
|
||||||
import com.github.stefvanschie.inventoryframework.pane.PaginatedPane;
|
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.FactionsPlugin;
|
||||||
import com.massivecraft.factions.struct.Relation;
|
import com.massivecraft.factions.struct.Relation;
|
||||||
import com.massivecraft.factions.struct.Role;
|
import com.massivecraft.factions.struct.Role;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import com.massivecraft.factions.zcore.fperms.Permissable;
|
import com.massivecraft.factions.zcore.fperms.Permissable;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
@@ -16,17 +16,22 @@ import org.bukkit.inventory.meta.ItemMeta;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class PermissableRelationFrame {
|
public class PermissableRelationFrame {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Illyria Team
|
||||||
|
*/
|
||||||
|
|
||||||
private Gui gui;
|
private Gui gui;
|
||||||
private ConfigurationSection section;
|
|
||||||
|
|
||||||
public PermissableRelationFrame(Faction f) {
|
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(),
|
gui = new Gui(FactionsPlugin.getInstance(),
|
||||||
section.getInt("rows", 3),
|
section.getInt("rows", 4),
|
||||||
FactionsPlugin.getInstance().color(FactionsPlugin.getInstance().getConfig().getString("fperm-gui.relation.name").replace("{faction}", f.getTag())));
|
FactionsPlugin.getInstance().color(Objects.requireNonNull(FactionsPlugin.getInstance().getConfig().getString("fperm-gui.relation.name")).replace("{faction}", f.getTag())));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void buildGUI(FPlayer fplayer) {
|
public void buildGUI(FPlayer fplayer) {
|
||||||
@@ -84,4 +89,3 @@ public class PermissableRelationFrame {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package com.massivecraft.factions.zcore.frame.fdisband;
|
package com.massivecraft.factions.zcore.frame.fdisband;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.github.stefvanschie.inventoryframework.Gui;
|
import com.github.stefvanschie.inventoryframework.Gui;
|
||||||
import com.github.stefvanschie.inventoryframework.GuiItem;
|
import com.github.stefvanschie.inventoryframework.GuiItem;
|
||||||
import com.github.stefvanschie.inventoryframework.pane.PaginatedPane;
|
import com.github.stefvanschie.inventoryframework.pane.PaginatedPane;
|
||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.massivecraft.factions.zcore.frame.fupgrades;
|
package com.massivecraft.factions.zcore.frame.fupgrades;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.github.stefvanschie.inventoryframework.Gui;
|
import com.github.stefvanschie.inventoryframework.Gui;
|
||||||
import com.github.stefvanschie.inventoryframework.GuiItem;
|
import com.github.stefvanschie.inventoryframework.GuiItem;
|
||||||
import com.github.stefvanschie.inventoryframework.pane.PaginatedPane;
|
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.FPlayers;
|
||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.massivecraft.factions.zcore.frame.fupgrades;
|
package com.massivecraft.factions.zcore.frame.fupgrades;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
import com.massivecraft.factions.util.Placeholder;
|
import com.massivecraft.factions.util.Placeholder;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
import com.mojang.authlib.properties.Property;
|
import com.mojang.authlib.properties.Property;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.massivecraft.factions.zcore.frame.fupgrades;
|
package com.massivecraft.factions.zcore.frame.fupgrades;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.massivecraft.factions.*;
|
import com.massivecraft.factions.*;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import org.bukkit.CropState;
|
import org.bukkit.CropState;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.massivecraft.factions.zcore.frame.fwarps;
|
package com.massivecraft.factions.zcore.frame.fwarps;
|
||||||
|
|
||||||
import com.cryptomorin.xseries.XMaterial;
|
|
||||||
import com.github.stefvanschie.inventoryframework.Gui;
|
import com.github.stefvanschie.inventoryframework.Gui;
|
||||||
import com.github.stefvanschie.inventoryframework.GuiItem;
|
import com.github.stefvanschie.inventoryframework.GuiItem;
|
||||||
import com.github.stefvanschie.inventoryframework.pane.PaginatedPane;
|
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.LazyLocation;
|
||||||
import com.massivecraft.factions.util.Placeholder;
|
import com.massivecraft.factions.util.Placeholder;
|
||||||
import com.massivecraft.factions.util.WarmUpUtil;
|
import com.massivecraft.factions.util.WarmUpUtil;
|
||||||
|
import com.massivecraft.factions.util.XMaterial;
|
||||||
import com.massivecraft.factions.zcore.util.TL;
|
import com.massivecraft.factions.zcore.util.TL;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
|||||||
@@ -972,36 +972,38 @@ public abstract class MemoryFPlayer implements FPlayer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setFFlying(boolean fly, boolean damage) {
|
public void setFFlying(boolean fly, boolean damage) {
|
||||||
Player player = getPlayer();
|
if (FactionsPlugin.getInstance().getConfig().getBoolean("enable-faction-flight")) {
|
||||||
if (player == null) return;
|
Player player = getPlayer();
|
||||||
|
if (player == null) return;
|
||||||
|
|
||||||
player.setAllowFlight(fly);
|
player.setAllowFlight(fly);
|
||||||
player.setFlying(fly);
|
player.setFlying(fly);
|
||||||
|
|
||||||
if (!damage) {
|
if (!damage) {
|
||||||
msg(TL.COMMAND_FLY_CHANGE, fly ? "enabled" : "disabled");
|
msg(TL.COMMAND_FLY_CHANGE, fly ? "enabled" : "disabled");
|
||||||
|
if (!fly) {
|
||||||
|
sendMessage(TL.COMMAND_FLY_COOLDOWN.toString().replace("{amount}", FactionsPlugin.getInstance().getConfig().getInt("fly-falldamage-cooldown", 3) + ""));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
msg(TL.COMMAND_FLY_DAMAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// If leaving fly mode, don't let them take fall damage for x seconds.
|
||||||
if (!fly) {
|
if (!fly) {
|
||||||
sendMessage(TL.COMMAND_FLY_COOLDOWN.toString().replace("{amount}", FactionsPlugin.getInstance().getConfig().getInt("fly-falldamage-cooldown", 3) + ""));
|
int cooldown = FactionsPlugin.getInstance().getConfig().getInt("fly-falldamage-cooldown", 3);
|
||||||
|
CmdFly.flyMap.remove(player.getName());
|
||||||
|
|
||||||
|
// If the value is 0 or lower, make them take fall damage.
|
||||||
|
// Otherwise, start a timer and have this cancel after a few seconds.
|
||||||
|
// Short task so we're just doing it in method. Not clean but eh.
|
||||||
|
if (cooldown > 0) {
|
||||||
|
setTakeFallDamage(false);
|
||||||
|
Bukkit.getScheduler().runTaskLater(FactionsPlugin.getInstance(), () -> setTakeFallDamage(true), 20L * cooldown);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
msg(TL.COMMAND_FLY_DAMAGE);
|
isFlying = fly;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If leaving fly mode, don't let them take fall damage for x seconds.
|
|
||||||
if (!fly) {
|
|
||||||
int cooldown = FactionsPlugin.getInstance().getConfig().getInt("fly-falldamage-cooldown", 3);
|
|
||||||
CmdFly.flyMap.remove(player.getName());
|
|
||||||
|
|
||||||
// If the value is 0 or lower, make them take fall damage.
|
|
||||||
// Otherwise, start a timer and have this cancel after a few seconds.
|
|
||||||
// Short task so we're just doing it in method. Not clean but eh.
|
|
||||||
if (cooldown > 0) {
|
|
||||||
setTakeFallDamage(false);
|
|
||||||
Bukkit.getScheduler().runTaskLater(FactionsPlugin.getInstance(), () -> setTakeFallDamage(true), 20L * cooldown);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
isFlying = fly;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isInFactionsChest() {
|
public boolean isInFactionsChest() {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.massivecraft.factions.zcore.persist;
|
package com.massivecraft.factions.zcore.persist;
|
||||||
|
|
||||||
import com.massivecraft.factions.*;
|
import com.massivecraft.factions.*;
|
||||||
import com.massivecraft.factions.cmd.shields.struct.frame.ShieldFramePersistence;
|
|
||||||
import com.massivecraft.factions.discord.Discord;
|
import com.massivecraft.factions.discord.Discord;
|
||||||
import com.massivecraft.factions.event.FPlayerLeaveEvent;
|
import com.massivecraft.factions.event.FPlayerLeaveEvent;
|
||||||
import com.massivecraft.factions.event.FactionDisbandEvent;
|
import com.massivecraft.factions.event.FactionDisbandEvent;
|
||||||
@@ -96,10 +95,7 @@ public abstract class MemoryFaction implements Faction, EconomyParticipator {
|
|||||||
private String weeWooFormat;
|
private String weeWooFormat;
|
||||||
private String guildId;
|
private String guildId;
|
||||||
private String memberRoleId;
|
private String memberRoleId;
|
||||||
private ShieldFramePersistence shieldFrame;
|
|
||||||
private boolean isProtected;
|
|
||||||
private long applyShieldUpdate;
|
|
||||||
private ShieldFramePersistence newFrame;
|
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// Construct
|
// Construct
|
||||||
@@ -189,48 +185,6 @@ public abstract class MemoryFaction implements Faction, EconomyParticipator {
|
|||||||
return this.announcements;
|
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) {
|
public void addAnnouncement(FPlayer fPlayer, String msg) {
|
||||||
List<String> list = announcements.containsKey(fPlayer.getId()) ? announcements.get(fPlayer.getId()) : new ArrayList<>();
|
List<String> list = announcements.containsKey(fPlayer.getId()) ? announcements.get(fPlayer.getId()) : new ArrayList<>();
|
||||||
list.add(msg);
|
list.add(msg);
|
||||||
|
|||||||
@@ -73,21 +73,22 @@ public class JSONFPlayers extends MemoryFPlayers {
|
|||||||
if (!this.file.exists()) return new HashMap<>();
|
if (!this.file.exists()) return new HashMap<>();
|
||||||
String content = DiscUtil.readCatch(this.file);
|
String content = DiscUtil.readCatch(this.file);
|
||||||
if (content == null) return null;
|
if (content == null) return null;
|
||||||
Map<String, JSONFPlayer> data = this.gson.fromJson(content, new TypeToken<Map<String, JSONFPlayer>>() {
|
try {
|
||||||
}.getType());
|
Map<String, JSONFPlayer> data = this.gson.fromJson(content, new TypeToken<Map<String, JSONFPlayer>>() {
|
||||||
Set<String> list = new HashSet<>();
|
}.getType());
|
||||||
Set<String> invalidList = new HashSet<>();
|
Set<String> list = new HashSet<>();
|
||||||
for (Entry<String, JSONFPlayer> entry : data.entrySet()) {
|
Set<String> invalidList = new HashSet<>();
|
||||||
String key = entry.getKey();
|
for (Entry<String, JSONFPlayer> entry : data.entrySet()) {
|
||||||
entry.getValue().setId(key);
|
String key = entry.getKey();
|
||||||
if (doesKeyNeedMigration(key)) {
|
entry.getValue().setId(key);
|
||||||
if (!isKeyInvalid(key)) {
|
if (doesKeyNeedMigration(key)) {
|
||||||
list.add(key);
|
if (!isKeyInvalid(key)) {
|
||||||
} else {
|
list.add(key);
|
||||||
invalidList.add(key);
|
} else {
|
||||||
|
invalidList.add(key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (list.size() > 0) {
|
if (list.size() > 0) {
|
||||||
// We've got some converting to do!
|
// We've got some converting to do!
|
||||||
@@ -150,6 +151,14 @@ public class JSONFPlayers extends MemoryFPlayers {
|
|||||||
Bukkit.getLogger().log(Level.INFO, "Done converting players.json to UUID.");
|
Bukkit.getLogger().log(Level.INFO, "Done converting players.json to UUID.");
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
|
} catch (NullPointerException exception) {
|
||||||
|
exception.printStackTrace();
|
||||||
|
if (this.file.length() < 200) {
|
||||||
|
return new HashMap<>();
|
||||||
|
} else {
|
||||||
|
throw exception;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean doesKeyNeedMigration(String key) {
|
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_CHANGED("The faction %1$s changed their name to %2$s."),
|
||||||
COMMAND_TAG_DESCRIPTION("Change the faction tag"),
|
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_TOCHANGE("to change a players title"),
|
||||||
COMMAND_TITLE_FORCHANGE("for changing a players title"),
|
COMMAND_TITLE_FORCHANGE("for changing a players title"),
|
||||||
COMMAND_TITLE_CHANGED("%1$s changed a title: %2$s"),
|
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_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."),
|
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
|
* Strings lying around in other bits of the plugins
|
||||||
*/
|
*/
|
||||||
@@ -1293,9 +1294,6 @@ public enum TL {
|
|||||||
WARMUPS_ALREADY("&cYou are already warming up."),
|
WARMUPS_ALREADY("&cYou are already warming up."),
|
||||||
WARMUPS_CANCELLED("&cYou have cancelled your warmup."),
|
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("");
|
PLACEHOLDERAPI_NULL("");
|
||||||
|
|
||||||
public static SimpleDateFormat sdf;
|
public static SimpleDateFormat sdf;
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ public enum TagReplacer {
|
|||||||
FACTION_BANCOUNT(TagType.FACTION, "{faction-bancount}"),
|
FACTION_BANCOUNT(TagType.FACTION, "{faction-bancount}"),
|
||||||
FACTION_STRIKES(TagType.FACTION, "{strikes}"),
|
FACTION_STRIKES(TagType.FACTION, "{strikes}"),
|
||||||
FACTION_POINTS(TagType.FACTION, "{faction-points}"),
|
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}";
|
return fac.hasHome() ? String.valueOf(fac.getHome().getBlockY()) : minimal ? null : "{ig}";
|
||||||
case HOME_Z:
|
case HOME_Z:
|
||||||
return fac.hasHome() ? String.valueOf(fac.getHome().getBlockZ()) : minimal ? null : "{ig}";
|
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:
|
case LAND_VALUE:
|
||||||
return Econ.shouldBeUsed() ? Econ.moneyString(Econ.calculateTotalLandValue(fac.getLandRounded())) : minimal ? null : TL.ECON_OFF.format("value");
|
return Econ.shouldBeUsed() ? Econ.moneyString(Econ.calculateTotalLandValue(fac.getLandRounded())) : minimal ? null : TL.ECON_OFF.format("value");
|
||||||
case LAND_REFUND:
|
case LAND_REFUND:
|
||||||
|
|||||||
@@ -282,6 +282,7 @@ show:
|
|||||||
- '&4* &cDescription: &f{description}'
|
- '&4* &cDescription: &f{description}'
|
||||||
- '&4* &cLand / Power / Max Power: &f{chunks} &8/ &f{power} &8/ &f{maxPower}'
|
- '&4* &cLand / Power / Max Power: &f{chunks} &8/ &f{power} &8/ &f{maxPower}'
|
||||||
- '&4* &cFaction Strikes: &f{strikes}'
|
- '&4* &cFaction Strikes: &f{strikes}'
|
||||||
|
- '&4* &cShield Status: &f{shield-status}'
|
||||||
- '&4* &cFaction Points: &f{faction-points}'
|
- '&4* &cFaction Points: &f{faction-points}'
|
||||||
- '&4* &cFounded: &f{create-date}'
|
- '&4* &cFounded: &f{create-date}'
|
||||||
- '&4* &cBalance: &f{faction-balance}'
|
- '&4* &cBalance: &f{faction-balance}'
|
||||||
@@ -293,6 +294,7 @@ show:
|
|||||||
- '&4* &cBans: &f{faction-bancount}'
|
- '&4* &cBans: &f{faction-bancount}'
|
||||||
- '&8&m----------------------------------------'
|
- '&8&m----------------------------------------'
|
||||||
# For a /f show that does not display fancy messages that are essentially empty, use minimal-show
|
# For a /f show that does not display fancy messages that are essentially empty, use minimal-show
|
||||||
|
relational-show: true
|
||||||
minimal-show: false
|
minimal-show: false
|
||||||
|
|
||||||
# Factions that should be exempt from /f show, case sensitive, useful for a
|
# 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,
|
# 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:
|
# depending on the click type it will set the permission differently:
|
||||||
# Left Click: ALLOW
|
# Left Click: ALLOW
|
||||||
|
# Middle Click: UNDEFINED
|
||||||
# Right Click: DENY
|
# Right Click: DENY
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@@ -432,14 +435,10 @@ help:
|
|||||||
# indicating the current relation (Uses relation item placeholder)
|
# 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
|
# 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
|
# 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:
|
fperm-gui:
|
||||||
relation:
|
relation:
|
||||||
# GUI Name
|
# GUI Name
|
||||||
name: '&7Faction Permissions'
|
name: '&8&lFaction Permissions'
|
||||||
# Amount of inventory rows, No larger than 5
|
# Amount of inventory rows, No larger than 5
|
||||||
rows: 4
|
rows: 4
|
||||||
# These are the slots where the relations are going to be placed on the first GUI
|
# 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
|
enemy: DIAMOND_AXE
|
||||||
neutral: WOOD_AXE
|
neutral: WOOD_AXE
|
||||||
Placeholder-Item:
|
Placeholder-Item:
|
||||||
Name: '&cClick to edit {relation} permissions!'
|
Name: '&c{relation}&f permissions!'
|
||||||
action:
|
action:
|
||||||
name: 'Faction Permissions'
|
name: 'Faction Permissions'
|
||||||
rows: 6
|
rows: 6
|
||||||
Access-Colors:
|
Access-Colors:
|
||||||
Allow: '&a'
|
Allow: '&a'
|
||||||
Deny: '&c'
|
Deny: '&c'
|
||||||
|
Undefined: '&7'
|
||||||
Materials:
|
Materials:
|
||||||
build: COBBLESTONE
|
build: COBBLESTONE
|
||||||
destroy: DIAMOND_PICKAXE
|
destroy: DIAMOND_PICKAXE
|
||||||
@@ -501,7 +501,6 @@ fperm-gui:
|
|||||||
check: WATCH
|
check: WATCH
|
||||||
drain: BUCKET
|
drain: BUCKET
|
||||||
spawner: MOB_SPAWNER
|
spawner: MOB_SPAWNER
|
||||||
shield: DIAMOND_CHESTPLATE
|
|
||||||
home: ENDER_EYE
|
home: ENDER_EYE
|
||||||
slots:
|
slots:
|
||||||
# Uses same format as above to inform the player of clicked relation
|
# Uses same format as above to inform the player of clicked relation
|
||||||
@@ -537,19 +536,19 @@ fperm-gui:
|
|||||||
check: 50
|
check: 50
|
||||||
spawner: 38
|
spawner: 38
|
||||||
drain: 49
|
drain: 49
|
||||||
shield: 51
|
|
||||||
home: 48
|
home: 48
|
||||||
# {action} Action name eg: Setwarp, Kick
|
# {action} Action name eg: Setwarp, Kick
|
||||||
# {action-access} Access name eg: Allow, Deny
|
# {action-access} Access name eg: Allow, Deny
|
||||||
# {action-access-color} Access color eg: Allow;GREEN
|
# {action-access-color} Access color eg: Allow;GREEN
|
||||||
placeholder-item:
|
placeholder-item:
|
||||||
name: '&e&l(!) &ePermission: &6&n{action}'
|
name: '&c&lPermission to {action}'
|
||||||
lore:
|
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.'
|
- '&2&l* &aLeft click to &a&lAllow&a.'
|
||||||
- '&7Right click to &c&nDeny&7.'
|
- '&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 will be take you to the previous GUI
|
||||||
back-item:
|
back-item:
|
||||||
Type: ARROW
|
Type: ARROW
|
||||||
@@ -562,6 +561,7 @@ fperm-gui:
|
|||||||
Name: ' '
|
Name: ' '
|
||||||
Lore:
|
Lore:
|
||||||
- ' '
|
- ' '
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
# +------------------------------------------------------+ #
|
# +------------------------------------------------------+ #
|
||||||
# | Faction Warp GUI | #
|
# | 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 | #
|
# | Faction Wild | #
|
||||||
# +------------------------------------------------------+ #
|
# +------------------------------------------------------+ #
|
||||||
############################################################
|
############################################################
|
||||||
@@ -1555,51 +1449,51 @@ Wild:
|
|||||||
FillMaterial: BLACK_STAINED_GLASS_PANE
|
FillMaterial: BLACK_STAINED_GLASS_PANE
|
||||||
Zones:
|
Zones:
|
||||||
# You may create your own zones here please just follow the original format #
|
# You may create your own zones here please just follow the original format #
|
||||||
Close:
|
Close:
|
||||||
World: world
|
World: world
|
||||||
Range:
|
Range:
|
||||||
MinX: -200
|
MinX: -200
|
||||||
MaxX: 200
|
MaxX: 200
|
||||||
MinZ: -200
|
MinZ: -200
|
||||||
MaxZ: 200
|
MaxZ: 200
|
||||||
Cost: 5000
|
Cost: 5000
|
||||||
Material: IRON_INGOT
|
Material: IRON_INGOT
|
||||||
Lore:
|
Lore:
|
||||||
- '&eTeleport to a random location close by'
|
- '&eTeleport to a random location close by'
|
||||||
- '&e X &b-200 &f- &b200 &eZ &b-200 &f- &b200'
|
- '&e X &b-200 &f- &b200 &eZ &b-200 &f- &b200'
|
||||||
- '&2&l&o$5000'
|
- '&2&l&o$5000'
|
||||||
Name: '&cLow Range'
|
Name: '&cLow Range'
|
||||||
Slot: 1
|
Slot: 1
|
||||||
Medium:
|
Medium:
|
||||||
World: world
|
World: world
|
||||||
Range:
|
Range:
|
||||||
MinX: -400
|
MinX: -400
|
||||||
MaxX: 400
|
MaxX: 400
|
||||||
MinZ: -400
|
MinZ: -400
|
||||||
MaxZ: 400
|
MaxZ: 400
|
||||||
Cost: 10000
|
Cost: 10000
|
||||||
Material: GOLD_INGOT
|
Material: GOLD_INGOT
|
||||||
Lore:
|
Lore:
|
||||||
- '&eTeleport to a random location in a medium proximity'
|
- '&eTeleport to a random location in a medium proximity'
|
||||||
- '&e X &b-400 &f- &b400 &eZ &b-400 &f- &b400'
|
- '&e X &b-400 &f- &b400 &eZ &b-400 &f- &b400'
|
||||||
- '&2&l&o$10000'
|
- '&2&l&o$10000'
|
||||||
Name: '&cMedium Range'
|
Name: '&cMedium Range'
|
||||||
Slot: 4
|
Slot: 4
|
||||||
Far:
|
Far:
|
||||||
World: world
|
World: world
|
||||||
Range:
|
Range:
|
||||||
MinX: -800
|
MinX: -800
|
||||||
MaxX: 800
|
MaxX: 800
|
||||||
MinZ: -800
|
MinZ: -800
|
||||||
MaxZ: 800
|
MaxZ: 800
|
||||||
Cost: 15000
|
Cost: 15000
|
||||||
Material: DIAMOND
|
Material: DIAMOND
|
||||||
Lore:
|
Lore:
|
||||||
- '&eTeleport to a random location far away'
|
- '&eTeleport to a random location far away'
|
||||||
- '&e X &b-800 &f- &b800 &eZ &b-800 &f- &b800'
|
- '&e X &b-800 &f- &b800 &eZ &b-800 &f- &b800'
|
||||||
- '&2&l&o$15000'
|
- '&2&l&o$15000'
|
||||||
Name: '&cHigh Range'
|
Name: '&cHigh Range'
|
||||||
Slot: 7
|
Slot: 7
|
||||||
# Settings that change how a player arrives to their random location #
|
# Settings that change how a player arrives to their random location #
|
||||||
Arrival:
|
Arrival:
|
||||||
# if FallDamage is false and the player is about to take fall damage while in the FallDamageWindow it will be denied #
|
# if FallDamage is false and the player is about to take fall damage while in the FallDamageWindow it will be denied #
|
||||||
@@ -1666,6 +1560,7 @@ Wild:
|
|||||||
# - {tnt-balance} : # of tnt a faction has in their tnt bank
|
# - {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
|
# - {tnt-max-balance} : # of possible tnt a faction can have in their tnt bank
|
||||||
# - {faction-strikes} : # of strikes a faction has
|
# - {faction-strikes} : # of strikes a faction has
|
||||||
|
# - {shield-status} : Status of the factions shield
|
||||||
|
|
||||||
# Faction Permissions GUI variables. Can only be used in GUI
|
# Faction Permissions GUI variables. Can only be used in GUI
|
||||||
# - {relation} : Shows relation name (Can be used in action and relation)
|
# - {relation} : Shows relation name (Can be used in action and relation)
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ COMMAND:
|
|||||||
ONLINEFACTIONLESS: 'Online factionless: '
|
ONLINEFACTIONLESS: 'Online factionless: '
|
||||||
LOCK:
|
LOCK:
|
||||||
LOCKED: <i>Factions is now locked
|
LOCKED: <i>Factions is now locked
|
||||||
UNLOCKED: <i>Factions in now unlocked
|
UNLOCKED: <i>Factions is now unlocked
|
||||||
LOGINS:
|
LOGINS:
|
||||||
TOGGLE: '<i>Set login / logout notifications for Faction members to: <a>%s'
|
TOGGLE: '<i>Set login / logout notifications for Faction members to: <a>%s'
|
||||||
MAP:
|
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