Compare commits
16 Commits
2.3.9
...
renovate/c
| Author | SHA1 | Date | |
|---|---|---|---|
| 46829a60db | |||
|
|
5d3fe2a2f4 | ||
|
|
1becd7b299 | ||
|
|
f7c9de0664 | ||
|
|
7667e69cf2 | ||
|
|
1383e451f1 | ||
|
|
677c609ec8 | ||
|
|
09f1df49a9 | ||
|
|
dd94b45347 | ||
|
|
28b07fc6a4 | ||
|
|
11ea9bc1aa | ||
|
|
7f922fef28 | ||
|
|
81ef43768d | ||
|
|
1a19ee77ba | ||
|
|
0444517eec | ||
|
|
03077b62ba |
33
pom.xml
33
pom.xml
@@ -4,7 +4,7 @@
|
||||
|
||||
<groupId>com.massivecraft</groupId>
|
||||
<artifactId>Factions</artifactId>
|
||||
<version>1.6.9.5-2.3.9-RC</version>
|
||||
<version>1.6.9.5-2.4.1-RC</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>SaberFactions</name>
|
||||
@@ -99,12 +99,6 @@
|
||||
<version>1.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mojang</groupId>
|
||||
<artifactId>brigadier</artifactId>
|
||||
<version>1.0.14</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.stefvanschie.inventoryframework</groupId>
|
||||
<artifactId>IF</artifactId>
|
||||
@@ -138,11 +132,6 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.ocpsoft.prettytime</groupId>
|
||||
<artifactId>prettytime</artifactId>
|
||||
<version>4.0.0.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.milkbowl.vault</groupId>
|
||||
<artifactId>VaultAPI</artifactId>
|
||||
@@ -297,8 +286,12 @@
|
||||
<scope>compile</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>gson</artifactId>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
<groupId>shaded</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>*</artifactId>
|
||||
<groupId>gson</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
@@ -350,12 +343,6 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.5</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.clip</groupId>
|
||||
<artifactId>placeholderapi</artifactId>
|
||||
@@ -398,6 +385,12 @@
|
||||
<artifactId>authlib</artifactId>
|
||||
<version>1.5.21</version>
|
||||
<scope>compile</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.rayzr522</groupId>
|
||||
|
||||
3
renovate.json
Normal file
3
renovate.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
||||
}
|
||||
@@ -577,7 +577,7 @@ public class Conf {
|
||||
safeZoneNerfedCreatureTypes.add(EntityType.ENDERMAN);
|
||||
safeZoneNerfedCreatureTypes.add(EntityType.GHAST);
|
||||
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.SKELETON);
|
||||
safeZoneNerfedCreatureTypes.add(EntityType.SPIDER);
|
||||
|
||||
@@ -81,6 +81,7 @@ public class FactionsPlugin extends MPlugin {
|
||||
public boolean mc113 = false;
|
||||
public boolean mc114 = false;
|
||||
public boolean mc115 = false;
|
||||
public boolean mc116 = false;
|
||||
public boolean useNonPacketParticles = false;
|
||||
public List<String> itemList = getConfig().getStringList("fchest.Items-Not-Allowed");
|
||||
SkriptAddon skriptAddon;
|
||||
@@ -167,6 +168,10 @@ public class FactionsPlugin extends MPlugin {
|
||||
FactionsPlugin.instance.log("Minecraft Version 1.15 found.");
|
||||
mc115 = true;
|
||||
break;
|
||||
case 16:
|
||||
FactionsPlugin.instance.log("Minecraft Version 1.16 found.");
|
||||
mc116 = true;
|
||||
break;
|
||||
}
|
||||
migrateFPlayerLeaders();
|
||||
log("==== End Setup ====");
|
||||
|
||||
@@ -88,7 +88,7 @@ public class CmdShow extends FCommand {
|
||||
Faction finalFaction = faction;
|
||||
instance.getServer().getScheduler().runTaskAsynchronously(instance, () -> {
|
||||
for (String raw : finalShow) {
|
||||
String parsed = TagUtil.parsePlain(finalFaction, context.fPlayer, raw); // use relations
|
||||
String parsed = instance.getConfig().getBoolean("relational-show", true) ? TagUtil.parsePlain(finalFaction, context.fPlayer, raw) : TagUtil.parsePlain(finalFaction, raw); // use relations
|
||||
if (parsed == null) {
|
||||
continue; // Due to minimal f show.
|
||||
}
|
||||
|
||||
@@ -31,13 +31,16 @@ public class CmdUnclaim extends FCommand {
|
||||
|
||||
this.requirements = new CommandRequirements.Builder(Permission.UNCLAIM)
|
||||
.playerOnly()
|
||||
.memberOnly()
|
||||
.withAction(PermissableAction.TERRITORY)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
if (!context.fPlayer.isAdminBypassing() && !context.fPlayer.hasFaction()) {
|
||||
context.fPlayer.msg(TL.GENERIC_MEMBERONLY);
|
||||
return;
|
||||
}
|
||||
|
||||
if (context.args.size() == 2) {
|
||||
Faction target = context.argAsFaction(1);
|
||||
|
||||
@@ -489,7 +489,7 @@ public class FactionsPlayerListener implements Listener {
|
||||
|
||||
if (FactionsPlugin.instance.getConfig().getBoolean("scoreboard.default-enabled", false)) {
|
||||
FScoreboard.init(me);
|
||||
FScoreboard.get(me).setDefaultSidebar(new FDefaultSidebar(), FactionsPlugin.instance.getConfig().getInt("scoreboard.default-update-interval", 20));
|
||||
FScoreboard.get(me).setDefaultSidebar(new FDefaultSidebar());
|
||||
FScoreboard.get(me).setSidebarVisibility(me.showScoreboard());
|
||||
}
|
||||
|
||||
@@ -564,7 +564,7 @@ public class FactionsPlayerListener implements Listener {
|
||||
|
||||
CmdSeeChunk.seeChunkMap.remove(event.getPlayer().getName());
|
||||
|
||||
FScoreboard.remove(me);
|
||||
FScoreboard.remove(me, event.getPlayer());
|
||||
}
|
||||
|
||||
public String parseAllPlaceholders(String string, Faction faction, Player player) {
|
||||
|
||||
@@ -9,15 +9,27 @@ import org.bukkit.scoreboard.Team;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class BufferedObjective {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
private static final Method addEntryMethod;
|
||||
private static final int MAX_LINE_LENGTH;
|
||||
private static final Pattern PATTERN = Pattern.compile("(\u00A7[0-9a-fk-r])|(.)");
|
||||
|
||||
private final Scoreboard scoreboard;
|
||||
private final String baseName;
|
||||
|
||||
private Objective current;
|
||||
private List<Team> currentTeams = new ArrayList<>();
|
||||
private String title;
|
||||
private DisplaySlot displaySlot;
|
||||
|
||||
private int objPtr;
|
||||
private int teamPtr;
|
||||
private boolean requiresUpdate = false;
|
||||
|
||||
private final Map<Integer, String> contents = new HashMap<>();
|
||||
|
||||
static {
|
||||
// Check for long line support.
|
||||
@@ -39,17 +51,6 @@ public class BufferedObjective {
|
||||
}
|
||||
}
|
||||
|
||||
private final Scoreboard scoreboard;
|
||||
private final String baseName;
|
||||
private final Map<Integer, String> contents = new HashMap<>();
|
||||
private Objective current;
|
||||
private List<Team> currentTeams = new ArrayList<>();
|
||||
private String title;
|
||||
private DisplaySlot displaySlot;
|
||||
private int objPtr;
|
||||
private int teamPtr;
|
||||
private boolean requiresUpdate = false;
|
||||
|
||||
public BufferedObjective(Scoreboard scoreboard) {
|
||||
this.scoreboard = scoreboard;
|
||||
this.baseName = createBaseName();
|
||||
@@ -122,13 +123,74 @@ public class BufferedObjective {
|
||||
Team team = scoreboard.registerNewTeam(getNextTeamName());
|
||||
bufferTeams.add(team);
|
||||
|
||||
Iterator<String> split = Splitter.fixedLength(16).split(entry.getValue()).iterator();
|
||||
String name, prefix = null, suffix = null;
|
||||
|
||||
team.setPrefix(split.next());
|
||||
String name = split.next();
|
||||
if (split.hasNext()) { // We only guarantee two splits
|
||||
team.setSuffix(split.next());
|
||||
String value = entry.getValue();
|
||||
if (value.length() > 16) {
|
||||
String[] arrImAPirate = new String[3];
|
||||
Matcher matcherrr = PATTERN.matcher(value);
|
||||
StringBuilder builderrr = new StringBuilder();
|
||||
int sCURvy = 0;
|
||||
char currrentColorrr = 'r';
|
||||
char currrentFormat = 'r';
|
||||
while (sCURvy < 3 && matcherrr.find()) {
|
||||
String tharSheBlows = matcherrr.group();
|
||||
boolean hoist = false;
|
||||
if (tharSheBlows.length() == 1) {
|
||||
builderrr.append(tharSheBlows);
|
||||
if (builderrr.length() == 16) {
|
||||
hoist = true;
|
||||
}
|
||||
} else {
|
||||
char c = tharSheBlows.charAt(1);
|
||||
if (c >= 'k' && c <= 'r') { // format!
|
||||
currrentFormat = c;
|
||||
if (c == 'r') {
|
||||
currrentColorrr = 'r';
|
||||
}
|
||||
} else {
|
||||
currrentColorrr = c;
|
||||
currrentFormat = 'r';
|
||||
}
|
||||
if (builderrr.length() < 14) {
|
||||
builderrr.append(tharSheBlows);
|
||||
} else {
|
||||
hoist = true;
|
||||
}
|
||||
}
|
||||
if (hoist) {
|
||||
arrImAPirate[sCURvy++] = builderrr.toString();
|
||||
builderrr = new StringBuilder();
|
||||
if (currrentColorrr != 'r') {
|
||||
builderrr.append('\u00A7').append(currrentColorrr);
|
||||
}
|
||||
if (currrentFormat != 'r') {
|
||||
builderrr.append('\u00A7').append(currrentFormat);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sCURvy < 3 && builderrr.length() > 0) {
|
||||
arrImAPirate[sCURvy] = builderrr.toString();
|
||||
}
|
||||
if (arrImAPirate[2] == null) {
|
||||
name = arrImAPirate[0];
|
||||
suffix = arrImAPirate[1];
|
||||
} else {
|
||||
prefix = arrImAPirate[0];
|
||||
name = arrImAPirate[1];
|
||||
suffix = arrImAPirate[2];
|
||||
}
|
||||
} else {
|
||||
name = value;
|
||||
}
|
||||
|
||||
if (prefix != null) {
|
||||
team.setPrefix(prefix);
|
||||
}
|
||||
if (suffix != null) {
|
||||
team.setSuffix(suffix);
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
addEntryMethod.invoke(team, name);
|
||||
|
||||
@@ -58,10 +58,13 @@ public class FScoreboard {
|
||||
FTeamWrapper.track(fboard);
|
||||
}
|
||||
|
||||
public static void remove(FPlayer fplayer) {
|
||||
public static void remove(FPlayer fplayer, Player player) {
|
||||
FScoreboard fboard = fscoreboards.remove(fplayer);
|
||||
|
||||
if (fboard != null) {
|
||||
if (fboard.scoreboard == player.getScoreboard()) { // No equals method implemented, so may as well skip a nullcheck
|
||||
player.setScoreboard(Bukkit.getScoreboardManager().getMainScoreboard());
|
||||
}
|
||||
fboard.removed = true;
|
||||
FTeamWrapper.untrack(fboard);
|
||||
}
|
||||
@@ -91,7 +94,7 @@ public class FScoreboard {
|
||||
bufferedObjective.setDisplaySlot(visible ? DisplaySlot.SIDEBAR : null);
|
||||
}
|
||||
|
||||
public void setDefaultSidebar(final FSidebarProvider provider, int updateInterval) {
|
||||
public void setDefaultSidebar(final FSidebarProvider provider) {
|
||||
if (!isSupportedByServer()) {
|
||||
return;
|
||||
}
|
||||
@@ -114,7 +117,7 @@ public class FScoreboard {
|
||||
updateObjective();
|
||||
}
|
||||
}
|
||||
}.runTaskTimer(FactionsPlugin.getInstance(), updateInterval, updateInterval);
|
||||
}.runTaskTimer(FactionsPlugin.getInstance(), 20, 20);
|
||||
}
|
||||
|
||||
public void setTemporarySidebar(final FSidebarProvider provider) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.massivecraft.factions.scoreboards;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.tag.Tag;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import com.massivecraft.factions.zcore.util.TagUtil;
|
||||
|
||||
@@ -20,16 +21,16 @@ public abstract class FSidebarProvider {
|
||||
public abstract List<String> getLines(FPlayer fplayer);
|
||||
|
||||
public String replaceTags(FPlayer fPlayer, String s) {
|
||||
s = TagUtil.parsePlaceholders(fPlayer.getPlayer(), s);
|
||||
s = Tag.parsePlaceholders(fPlayer.getPlayer(), s);
|
||||
|
||||
return qualityAssure(TagUtil.parsePlain(fPlayer, s));
|
||||
return qualityAssure(Tag.parsePlain(fPlayer, s));
|
||||
}
|
||||
|
||||
public String replaceTags(Faction faction, FPlayer fPlayer, String s) {
|
||||
// Run through Placeholder API first
|
||||
s = TagUtil.parsePlaceholders(fPlayer.getPlayer(), s);
|
||||
s = Tag.parsePlaceholders(fPlayer.getPlayer(), s);
|
||||
|
||||
return qualityAssure(Objects.requireNonNull(TagUtil.parsePlain(faction, fPlayer, s)));
|
||||
return qualityAssure(Tag.parsePlain(faction, fPlayer, s));
|
||||
}
|
||||
|
||||
private String qualityAssure(String line) {
|
||||
|
||||
@@ -19,8 +19,9 @@ public class FTeamWrapper {
|
||||
|
||||
private static final Map<Faction, FTeamWrapper> wrappers = new HashMap<>();
|
||||
private static final List<FScoreboard> tracking = new ArrayList<>();
|
||||
private static final Set<Faction> updating = new HashSet<>();
|
||||
private static int factionTeamPtr;
|
||||
private static final Set<Faction> updating = new HashSet<>();
|
||||
|
||||
private final Map<FScoreboard, Team> teams = new HashMap<>();
|
||||
private final String teamName;
|
||||
private final Faction faction;
|
||||
@@ -36,18 +37,11 @@ public class FTeamWrapper {
|
||||
}
|
||||
|
||||
public static void applyUpdatesLater(final Faction faction) {
|
||||
if (!FScoreboard.isSupportedByServer()) {
|
||||
if (!FScoreboard.isSupportedByServer()) return;
|
||||
if (faction.isWilderness()) return;
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("scoreboard.default-prefixes", false)
|
||||
|| FactionsPlugin.getInstance().getConfig().getBoolean("See-Invisible-Faction-Members"))
|
||||
return;
|
||||
}
|
||||
|
||||
if (faction.isWilderness()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("scoreboard.default-prefixes", false) || FactionsPlugin.getInstance().getConfig().getBoolean("See-Invisible-Faction-Members")) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (updating.add(faction)) {
|
||||
Bukkit.getScheduler().runTask(FactionsPlugin.getInstance(), () -> {
|
||||
@@ -58,22 +52,17 @@ public class FTeamWrapper {
|
||||
}
|
||||
|
||||
public static void applyUpdates(Faction faction) {
|
||||
if (!FScoreboard.isSupportedByServer()) {
|
||||
return;
|
||||
}
|
||||
if (!FScoreboard.isSupportedByServer()) return;
|
||||
|
||||
if (faction.isWilderness()) {
|
||||
return;
|
||||
}
|
||||
if (faction.isWilderness()) return;
|
||||
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("scoreboard.default-prefixes", false) || FactionsPlugin.getInstance().getConfig().getBoolean("See-Invisible-Faction-Members")) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (updating.contains(faction)) {
|
||||
// Faction will be updated soon.
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("scoreboard.default-prefixes", false)
|
||||
|| FactionsPlugin.getInstance().getConfig().getBoolean("See-Invisible-Faction-Members"))
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (updating.contains(faction)) return;
|
||||
|
||||
FTeamWrapper wrapper = wrappers.get(faction);
|
||||
Set<FPlayer> factionMembers = faction.getFPlayers();
|
||||
@@ -98,21 +87,16 @@ public class FTeamWrapper {
|
||||
}
|
||||
|
||||
for (FPlayer fmember : factionMembers) {
|
||||
if (!fmember.isOnline()) {
|
||||
continue;
|
||||
}
|
||||
if (!fmember.isOnline()) continue;
|
||||
|
||||
// Scoreboard might not have player; add him/her
|
||||
wrapper.addPlayer(fmember.getPlayer());
|
||||
}
|
||||
|
||||
wrapper.updatePrefixes();
|
||||
}
|
||||
|
||||
public static void updatePrefixes(Faction faction) {
|
||||
if (!FScoreboard.isSupportedByServer()) {
|
||||
return;
|
||||
}
|
||||
if (!FScoreboard.isSupportedByServer()) return;
|
||||
|
||||
if (!wrappers.containsKey(faction)) {
|
||||
applyUpdates(faction);
|
||||
@@ -122,34 +106,22 @@ public class FTeamWrapper {
|
||||
}
|
||||
|
||||
protected static void track(FScoreboard fboard) {
|
||||
if (!FScoreboard.isSupportedByServer()) {
|
||||
return;
|
||||
}
|
||||
if (!FScoreboard.isSupportedByServer()) return;
|
||||
tracking.add(fboard);
|
||||
for (FTeamWrapper wrapper : wrappers.values()) {
|
||||
wrapper.add(fboard);
|
||||
}
|
||||
for (FTeamWrapper wrapper : wrappers.values()) wrapper.add(fboard);
|
||||
}
|
||||
|
||||
protected static void untrack(FScoreboard fboard) {
|
||||
if (!FScoreboard.isSupportedByServer()) {
|
||||
return;
|
||||
}
|
||||
if (!FScoreboard.isSupportedByServer()) return;
|
||||
tracking.remove(fboard);
|
||||
for (FTeamWrapper wrapper : wrappers.values()) {
|
||||
wrapper.remove(fboard);
|
||||
}
|
||||
for (FTeamWrapper wrapper : wrappers.values()) wrapper.remove(fboard);
|
||||
}
|
||||
|
||||
private void add(FScoreboard fboard) {
|
||||
Scoreboard board = fboard.getScoreboard();
|
||||
Team team = board.registerNewTeam(teamName);
|
||||
teams.put(fboard, team);
|
||||
|
||||
for (OfflinePlayer player : getPlayers()) {
|
||||
team.addPlayer(player);
|
||||
}
|
||||
|
||||
for (OfflinePlayer player : getPlayers()) team.addPlayer(player);
|
||||
updatePrefix(fboard);
|
||||
}
|
||||
|
||||
@@ -159,9 +131,7 @@ public class FTeamWrapper {
|
||||
|
||||
private void updatePrefixes() {
|
||||
if (FactionsPlugin.getInstance().getConfig().getBoolean("scoreboard.default-prefixes", false)) {
|
||||
for (FScoreboard fboard : teams.keySet()) {
|
||||
updatePrefix(fboard);
|
||||
}
|
||||
for (FScoreboard fboard : teams.keySet()) updatePrefix(fboard);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
package com.massivecraft.factions.util;
|
||||
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
@@ -42,30 +41,23 @@ import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/*
|
||||
* References
|
||||
*
|
||||
* * * GitHub: https://github.com/CryptoMorin/XSeries/blob/master/XMaterial.java
|
||||
* * XSeries: https://www.spigotmc.org/threads/378136/
|
||||
/**
|
||||
* <b>XMaterial</b> - Data Values/Pre-flattening<br>
|
||||
* 1.13 and above as priority.
|
||||
* <p>
|
||||
* This class is mainly designed to support ItemStacks.
|
||||
* If you want to use it on blocks you'll have to
|
||||
* use <a href="https://github.com/CryptoMorin/XSeries/blob/master/XBlock.java">XBlock</a>
|
||||
* <p>
|
||||
* Pre-flattening: https://minecraft.gamepedia.com/Java_Edition_data_values/Pre-flattening
|
||||
* Materials: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
|
||||
* Materials (1.12): https://helpch.at/docs/1.12.2/index.html?org/bukkit/Material.html
|
||||
* Material IDs: https://minecraft-ids.grahamedgecombe.com/
|
||||
* Material Source Code: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse/src/main/java/org/bukkit/Material.java
|
||||
* XMaterial v1: https://www.spigotmc.org/threads/329630/
|
||||
*/
|
||||
|
||||
/**
|
||||
* <b>XMaterial</b> - Data Values/Pre-flattening<br>
|
||||
* Supports 1.8-1.15<br>
|
||||
* 1.13 and above as priority.
|
||||
* <p>
|
||||
* This class is mainly designed to support ItemStacks.
|
||||
* If you want to use it on blocks you'll have to
|
||||
* use <a href="https://github.com/CryptoMorin/XSeries/blob/master/XBlock.java">XBlock</a>
|
||||
*
|
||||
* @author Crypto Morin
|
||||
* @version 4.0.0
|
||||
* @version 5.0.0
|
||||
* @see Material
|
||||
* @see ItemStack
|
||||
*/
|
||||
@@ -96,6 +88,7 @@ public enum XMaterial {
|
||||
*/
|
||||
AIR,
|
||||
ALLIUM(2, "RED_ROSE"),
|
||||
ANCIENT_DEBRIS("1.16"),
|
||||
ANDESITE(5, "STONE"),
|
||||
ANDESITE_SLAB,
|
||||
ANDESITE_STAIRS,
|
||||
@@ -112,6 +105,7 @@ public enum XMaterial {
|
||||
BAMBOO_SAPLING("1.14"),
|
||||
BARREL("1.14", "CHEST", ""),
|
||||
BARRIER,
|
||||
BASALT("1.16"),
|
||||
BAT_SPAWN_EGG(65, "MONSTER_EGG"),
|
||||
BEACON,
|
||||
BEDROCK,
|
||||
@@ -144,8 +138,12 @@ public enum XMaterial {
|
||||
BIRCH_TRAPDOOR("TRAP_DOOR"),
|
||||
BIRCH_WALL_SIGN("SIGN_POST", "WALL_SIGN"),
|
||||
BIRCH_WOOD(2, "LOG"),
|
||||
BLACKSTONE("1.16"),
|
||||
BLACKSTONE_SLAB("1.16"),
|
||||
BLACKSTONE_STAIRS("1.16"),
|
||||
BLACKSTONE_WALL("1.16"),
|
||||
BLACK_BANNER("BANNER", "STANDING_BANNER"),
|
||||
BLACK_BED(15, "BED", "BED_BLOCK"),
|
||||
BLACK_BED(15, "BED_BLOCK", "BED"),
|
||||
BLACK_CARPET(15, "CARPET"),
|
||||
BLACK_CONCRETE(15, "CONCRETE"),
|
||||
BLACK_CONCRETE_POWDER(15, "CONCRETE_POWDER"),
|
||||
@@ -161,8 +159,8 @@ public enum XMaterial {
|
||||
BLAZE_POWDER,
|
||||
BLAZE_ROD,
|
||||
BLAZE_SPAWN_EGG(61, "MONSTER_EGG"),
|
||||
BLUE_BANNER(11, "BANNER", "STANDING_BANNER"),
|
||||
BLUE_BED(4, "BED", "BED_BLOCK"),
|
||||
BLUE_BANNER(4, "BANNER", "STANDING_BANNER"),
|
||||
BLUE_BED(11, "BED_BLOCK", "BED"),
|
||||
BLUE_CARPET(11, "CARPET"),
|
||||
BLUE_CONCRETE(11, "CONCRETE"),
|
||||
BLUE_CONCRETE_POWDER(11, "CONCRETE_POWDER"),
|
||||
@@ -173,8 +171,8 @@ public enum XMaterial {
|
||||
BLUE_SHULKER_BOX,
|
||||
BLUE_STAINED_GLASS(11, "STAINED_GLASS"),
|
||||
BLUE_STAINED_GLASS_PANE(11, "THIN_GLASS", "STAINED_GLASS_PANE"),
|
||||
BLUE_TERRACOTTA(11, "STAINED_CLAY"),
|
||||
BLUE_WALL_BANNER(11, "WALL_BANNER"),
|
||||
BLUE_TERRACOTTA(11, "HARD_CLAY", "STAINED_CLAY"),
|
||||
BLUE_WALL_BANNER(4, "WALL_BANNER"),
|
||||
BLUE_WOOL(11, "WOOL"),
|
||||
BONE,
|
||||
BONE_BLOCK,
|
||||
@@ -195,7 +193,7 @@ public enum XMaterial {
|
||||
BRICK_STAIRS,
|
||||
BRICK_WALL,
|
||||
BROWN_BANNER(3, "BANNER", "STANDING_BANNER"),
|
||||
BROWN_BED(12, "BED", "BED_BLOCK"),
|
||||
BROWN_BED(12, "BED_BLOCK", "BED"),
|
||||
BROWN_CARPET(12, "CARPET"),
|
||||
BROWN_CONCRETE(12, "CONCRETE"),
|
||||
BROWN_CONCRETE_POWDER(12, "CONCRETE_POWDER"),
|
||||
@@ -232,6 +230,7 @@ public enum XMaterial {
|
||||
*/
|
||||
CAVE_AIR("AIR"),
|
||||
CAVE_SPIDER_SPAWN_EGG(59, "MONSTER_EGG"),
|
||||
CHAIN("1.16"),
|
||||
CHAINMAIL_BOOTS,
|
||||
CHAINMAIL_CHESTPLATE,
|
||||
CHAINMAIL_HELMET,
|
||||
@@ -243,6 +242,8 @@ public enum XMaterial {
|
||||
CHICKEN("RAW_CHICKEN"),
|
||||
CHICKEN_SPAWN_EGG(93, "MONSTER_EGG"),
|
||||
CHIPPED_ANVIL(1, "ANVIL"),
|
||||
CHISELED_NETHER_BRICKS(1, "NETHER_BRICKS"),
|
||||
CHISELED_POLISHED_BLACKSTONE("1.16", "POLISHED_BLACKSTONE"),
|
||||
CHISELED_QUARTZ_BLOCK(1, "QUARTZ_BLOCK"),
|
||||
CHISELED_RED_SANDSTONE(1, "RED_SANDSTONE"),
|
||||
CHISELED_SANDSTONE(1, "SANDSTONE"),
|
||||
@@ -269,7 +270,14 @@ public enum XMaterial {
|
||||
COD_SPAWN_EGG("1.13", "MONSTER_EGG", ""),
|
||||
COMMAND_BLOCK("COMMAND"),
|
||||
COMMAND_BLOCK_MINECART("COMMAND_MINECART"),
|
||||
COMPARATOR("REDSTONE_COMPARATOR", "REDSTONE_COMPARATOR_ON", "REDSTONE_COMPARATOR_OFF"),
|
||||
/**
|
||||
* Unlike redstone torch and redstone lamp... neither REDTONE_COMPARATOR_OFF nor REDSTONE_COMPARATOR_ON
|
||||
* are items. REDSTONE_COMPARATOR is.
|
||||
*
|
||||
* @see #REDSTONE_TORCH
|
||||
* @see #REDSTONE_LAMP
|
||||
*/
|
||||
COMPARATOR("REDSTONE_COMPARATOR_OFF", "REDSTONE_COMPARATOR_ON", "REDSTONE_COMPARATOR"),
|
||||
COMPASS,
|
||||
COMPOSTER("1.14", "CAULDRON", ""),
|
||||
CONDUIT("1.13", "BEACON"),
|
||||
@@ -283,19 +291,38 @@ public enum XMaterial {
|
||||
COOKIE,
|
||||
CORNFLOWER(4, "1.14", "BLUE_DYE", ""),
|
||||
COW_SPAWN_EGG(92, "MONSTER_EGG"),
|
||||
CRACKED_NETHER_BRICKS(2, "NETHER_BRICKS"),
|
||||
CRACKED_POLISHED_BLACKSTONE_BRICKS("1.16", "POLISHED_BLACKSTONE_BRICKS"),
|
||||
CRACKED_STONE_BRICKS(2, "SMOOTH_BRICK"),
|
||||
CRAFTING_TABLE("WORKBENCH"),
|
||||
CREEPER_BANNER_PATTERN,
|
||||
CREEPER_HEAD(4, "SKULL", "SKULL_ITEM"),
|
||||
CREEPER_SPAWN_EGG(50, "MONSTER_EGG"),
|
||||
CREEPER_WALL_HEAD(4, "SKULL", "SKULL_ITEM"),
|
||||
CRIMSON_BUTTON("1.16"),
|
||||
CRIMSON_DOOR("1.16"),
|
||||
CRIMSON_FENCE("1.16"),
|
||||
CRIMSON_FENCE_GATE("1.16"),
|
||||
CRIMSON_FUNGUS("1.16"),
|
||||
CRIMSON_HYPHAE("1.16"),
|
||||
CRIMSON_NYLIUM("1.16"),
|
||||
CRIMSON_PLANKS("1.16"),
|
||||
CRIMSON_PRESSURE_PLATE("1.16"),
|
||||
CRIMSON_ROOTS("1.16"),
|
||||
CRIMSON_SIGN("1.16"),
|
||||
CRIMSON_SLAB("1.16"),
|
||||
CRIMSON_STAIRS("1.16"),
|
||||
CRIMSON_STEM("1.16"),
|
||||
CRIMSON_TRAPDOOR("1.16"),
|
||||
CRIMSON_WALL_SIGN("1.16"),
|
||||
CROSSBOW,
|
||||
CRYING_OBSIDIAN("1.16"),
|
||||
CUT_RED_SANDSTONE("1.13"),
|
||||
CUT_RED_SANDSTONE_SLAB("STONE_SLAB2"),
|
||||
CUT_SANDSTONE("1.13"),
|
||||
CUT_SANDSTONE_SLAB("STEP"),
|
||||
CYAN_BANNER(6, "BANNER", "STANDING_BANNER"),
|
||||
CYAN_BED(9, "BED", "BED_BLOCK"),
|
||||
CYAN_BED(9, "BED_BLOCK", "BED"),
|
||||
CYAN_CARPET(9, "CARPET"),
|
||||
CYAN_CONCRETE(9, "CONCRETE"),
|
||||
CYAN_CONCRETE_POWDER(9, "CONCRETE_POWDER"),
|
||||
@@ -314,13 +341,13 @@ public enum XMaterial {
|
||||
DARK_OAK_DOOR("DARK_OAK_DOOR_ITEM"),
|
||||
DARK_OAK_FENCE,
|
||||
DARK_OAK_FENCE_GATE,
|
||||
DARK_OAK_LEAVES(1, "LEAVES", "LEAVES_2"),
|
||||
DARK_OAK_LEAVES(4, "LEAVES", "LEAVES_2"),
|
||||
DARK_OAK_LOG(1, "LOG", "LOG_2"),
|
||||
DARK_OAK_PLANKS(5, "WOOD"),
|
||||
DARK_OAK_PRESSURE_PLATE("WOOD_PLATE"),
|
||||
DARK_OAK_SAPLING(5, "SAPLING"),
|
||||
DARK_OAK_SIGN("SIGN"),
|
||||
DARK_OAK_SLAB("WOOD_STEP", "WOODEN_SLAB", "WOOD_DOUBLE_STEP"),
|
||||
DARK_OAK_SLAB(5, "WOOD_STEP", "WOODEN_SLAB", "WOOD_DOUBLE_STEP"),
|
||||
DARK_OAK_STAIRS,
|
||||
DARK_OAK_TRAPDOOR("TRAP_DOOR"),
|
||||
DARK_OAK_WALL_SIGN("SIGN_POST", "WALL_SIGN"),
|
||||
@@ -402,7 +429,7 @@ public enum XMaterial {
|
||||
END_ROD("1.9", "BLAZE_ROD", ""),
|
||||
END_STONE("ENDER_STONE"),
|
||||
END_STONE_BRICKS("END_BRICKS"),
|
||||
END_STONE_BRICK_SLAB(4, "STEP"),
|
||||
END_STONE_BRICK_SLAB(6, "STEP"),
|
||||
END_STONE_BRICK_STAIRS("SMOOTH_STAIRS"),
|
||||
END_STONE_BRICK_WALL,
|
||||
EVOKER_SPAWN_EGG(34, "MONSTER_EGG"),
|
||||
@@ -410,7 +437,12 @@ public enum XMaterial {
|
||||
FARMLAND("SOIL"),
|
||||
FEATHER,
|
||||
FERMENTED_SPIDER_EYE,
|
||||
FERN(2, "LONG_GRASS"),
|
||||
FERN(1, "LONG_GRASS"),
|
||||
/**
|
||||
* For some reasons filled map items are really special.
|
||||
* Their data value starts from 0 and every time a player
|
||||
* creates a new map that maps data value increases.
|
||||
*/
|
||||
FILLED_MAP("MAP"),
|
||||
FIRE,
|
||||
FIREWORK_ROCKET("FIREWORK"),
|
||||
@@ -467,7 +499,7 @@ public enum XMaterial {
|
||||
GRASS_PATH,
|
||||
GRAVEL,
|
||||
GRAY_BANNER(8, "BANNER", "STANDING_BANNER"),
|
||||
GRAY_BED(7, "BED", "BED_BLOCK"),
|
||||
GRAY_BED(7, "BED_BLOCK", "BED"),
|
||||
GRAY_CARPET(7, "CARPET"),
|
||||
GRAY_CONCRETE(7, "CONCRETE"),
|
||||
GRAY_CONCRETE_POWDER(7, "CONCRETE_POWDER"),
|
||||
@@ -480,7 +512,7 @@ public enum XMaterial {
|
||||
GRAY_WALL_BANNER(8, "WALL_BANNER"),
|
||||
GRAY_WOOL(7, "WOOL"),
|
||||
GREEN_BANNER(2, "BANNER", "STANDING_BANNER"),
|
||||
GREEN_BED(13, "BED", "BED_BLOCK"),
|
||||
GREEN_BED(13, "BED_BLOCK", "BED"),
|
||||
GREEN_CARPET(13, "CARPET"),
|
||||
GREEN_CONCRETE(13, "CONCRETE"),
|
||||
GREEN_CONCRETE_POWDER(13, "CONCRETE_POWDER"),
|
||||
@@ -498,6 +530,7 @@ public enum XMaterial {
|
||||
HAY_BLOCK,
|
||||
HEART_OF_THE_SEA("1.13"),
|
||||
HEAVY_WEIGHTED_PRESSURE_PLATE("IRON_PLATE"),
|
||||
HOGLIN_SPAWN_EGG("1.16", "MONSTER_EGG"),
|
||||
HONEYCOMB("1.15"),
|
||||
HONEYCOMB_BLOCK("1.15"),
|
||||
HONEY_BLOCK("1.15", "SLIME_BLOCK", ""),
|
||||
@@ -575,8 +608,8 @@ public enum XMaterial {
|
||||
LEATHER_LEGGINGS,
|
||||
LECTERN("1.14", "BOOKSHELF", ""),
|
||||
LEVER,
|
||||
LIGHT_BLUE_BANNER(3, "BANNER", "STANDING_BANNER"),
|
||||
LIGHT_BLUE_BED(3, "BED", "BED_BLOCK"),
|
||||
LIGHT_BLUE_BANNER(12, "BANNER", "STANDING_BANNER"),
|
||||
LIGHT_BLUE_BED(3, "BED_BLOCK", "BED"),
|
||||
LIGHT_BLUE_CARPET(3, "CARPET"),
|
||||
LIGHT_BLUE_CONCRETE(3, "CONCRETE"),
|
||||
LIGHT_BLUE_CONCRETE_POWDER(3, "CONCRETE_POWDER"),
|
||||
@@ -589,16 +622,16 @@ public enum XMaterial {
|
||||
LIGHT_BLUE_WALL_BANNER(12, "WALL_BANNER", "BANNER", "STANDING_BANNER"),
|
||||
LIGHT_BLUE_WOOL(3, "WOOL"),
|
||||
LIGHT_GRAY_BANNER(7, "BANNER", "STANDING_BANNER"),
|
||||
LIGHT_GRAY_BED(8, "BED", "BED_BLOCK"),
|
||||
LIGHT_GRAY_BED(8, "BED_BLOCK", "BED"),
|
||||
LIGHT_GRAY_CARPET(8, "CARPET"),
|
||||
LIGHT_GRAY_CONCRETE(8, "CONCRETE"),
|
||||
LIGHT_GRAY_CONCRETE_POWDER(8, "CONCRETE_POWDER"),
|
||||
LIGHT_GRAY_DYE(7, "INK_SACK"),
|
||||
/**
|
||||
* Renamed to SILVER_GLAZED_TERRACOTTA in 1.13
|
||||
* Renamed to SILVER_GLAZED_TERRACOTTA in 1.12
|
||||
* Renamed to LIGHT_GRAY_GLAZED_TERRACOTTA in 1.14
|
||||
*/
|
||||
LIGHT_GRAY_GLAZED_TERRACOTTA(8, "1.12", "HARD_CLAY", "STAINED_CLAY", "LIGHT_GRAY_TERRACOTTA", "SILVER_GLAZED_TERRACOTTA"),
|
||||
LIGHT_GRAY_GLAZED_TERRACOTTA("1.12", "HARD_CLAY", "STAINED_CLAY", "LIGHT_GRAY_TERRACOTTA", "SILVER_GLAZED_TERRACOTTA"),
|
||||
LIGHT_GRAY_SHULKER_BOX("SILVER_SHULKER_BOX"),
|
||||
LIGHT_GRAY_STAINED_GLASS(8, "STAINED_GLASS"),
|
||||
LIGHT_GRAY_STAINED_GLASS_PANE(8, "THIN_GLASS", "STAINED_GLASS_PANE"),
|
||||
@@ -610,7 +643,7 @@ public enum XMaterial {
|
||||
LILY_OF_THE_VALLEY(15, "1.14", "WHITE_DYE", ""),
|
||||
LILY_PAD("WATER_LILY"),
|
||||
LIME_BANNER(10, "BANNER", "STANDING_BANNER"),
|
||||
LIME_BED(5, "BED", "BED_BLOCK"),
|
||||
LIME_BED(5, "BED_BLOCK", "BED"),
|
||||
LIME_CARPET(5, "CARPET"),
|
||||
LIME_CONCRETE(5, "CONCRETE"),
|
||||
LIME_CONCRETE_POWDER(5, "CONCRETE_POWDER"),
|
||||
@@ -624,9 +657,10 @@ public enum XMaterial {
|
||||
LIME_WOOL(5, "WOOL"),
|
||||
LINGERING_POTION,
|
||||
LLAMA_SPAWN_EGG(103, "MONSTER_EGG"),
|
||||
LODESTONE("1.16"),
|
||||
LOOM("1.14"),
|
||||
MAGENTA_BANNER(13, "BANNER", "STANDING_BANNER"),
|
||||
MAGENTA_BED(2, "BED", "BED_BLOCK"),
|
||||
MAGENTA_BED(2, "BED_BLOCK", "BED"),
|
||||
MAGENTA_CARPET(2, "CARPET"),
|
||||
MAGENTA_CONCRETE(2, "CONCRETE"),
|
||||
MAGENTA_CONCRETE_POWDER(2, "CONCRETE_POWDER"),
|
||||
@@ -641,6 +675,13 @@ public enum XMaterial {
|
||||
MAGMA_BLOCK("1.10", "MAGMA"),
|
||||
MAGMA_CREAM,
|
||||
MAGMA_CUBE_SPAWN_EGG(62, "MONSTER_EGG"),
|
||||
/**
|
||||
* Adding this to the duplicated list will give you a filled map
|
||||
* for 1.13+ versions and removing it from duplicated list will
|
||||
* still give you a filled map in -1.12 versions.
|
||||
* Since higher versions are our priority I'll keep 1.13+ support
|
||||
* until I can come up with something to fix it.
|
||||
*/
|
||||
MAP("EMPTY_MAP"),
|
||||
MELON("MELON_BLOCK"),
|
||||
MELON_SEEDS,
|
||||
@@ -655,7 +696,7 @@ public enum XMaterial {
|
||||
MOSSY_COBBLESTONE_STAIRS,
|
||||
MOSSY_COBBLESTONE_WALL(1, "COBBLE_WALL", "COBBLESTONE_WALL"),
|
||||
MOSSY_STONE_BRICKS(1, "SMOOTH_BRICK"),
|
||||
MOSSY_STONE_BRICK_SLAB(4, "STEP"),
|
||||
MOSSY_STONE_BRICK_SLAB(5, "STEP"),
|
||||
MOSSY_STONE_BRICK_STAIRS("SMOOTH_STAIRS"),
|
||||
MOSSY_STONE_BRICK_WALL,
|
||||
MOVING_PISTON("PISTON_BASE", "PISTON_MOVING_PIECE"),
|
||||
@@ -678,15 +719,29 @@ public enum XMaterial {
|
||||
MYCELIUM("MYCEL"),
|
||||
NAME_TAG,
|
||||
NAUTILUS_SHELL("1.13"),
|
||||
NETHERITE_AXE("1.16"),
|
||||
NETHERITE_BLOCK("1.16"),
|
||||
NETHERITE_BOOTS("1.16"),
|
||||
NETHERITE_CHESTPLATE("1.16"),
|
||||
NETHERITE_HELMET("1.16"),
|
||||
NETHERITE_HOE("1.16"),
|
||||
NETHERITE_INGOT("1.16"),
|
||||
NETHERITE_LEGGINGS("1.16"),
|
||||
NETHERITE_PICKAXE("1.16"),
|
||||
NETHERITE_SCRAP("1.16"),
|
||||
NETHERITE_SHOVEL("1.16"),
|
||||
NETHERITE_SWORD("1.16"),
|
||||
NETHERRACK,
|
||||
NETHER_BRICK("NETHER_BRICK_ITEM"),
|
||||
NETHER_BRICKS("NETHER_BRICK"),
|
||||
NETHER_BRICK_FENCE("NETHER_FENCE"),
|
||||
NETHER_BRICK_SLAB(4, "STEP"),
|
||||
NETHER_BRICK_SLAB(6, "STEP"),
|
||||
NETHER_BRICK_STAIRS,
|
||||
NETHER_BRICK_WALL,
|
||||
NETHER_GOLD_ORE("1.16"),
|
||||
NETHER_PORTAL("PORTAL"),
|
||||
NETHER_QUARTZ_ORE("QUARTZ_ORE"),
|
||||
NETHER_SPROUTS("1.16"),
|
||||
NETHER_STAR,
|
||||
/**
|
||||
* Just like mentioned in https://minecraft.gamepedia.com/Nether_Wart
|
||||
@@ -716,7 +771,7 @@ public enum XMaterial {
|
||||
OBSIDIAN,
|
||||
OCELOT_SPAWN_EGG(98, "MONSTER_EGG"),
|
||||
ORANGE_BANNER(14, "BANNER", "STANDING_BANNER"),
|
||||
ORANGE_BED(1, "BED", "BED_BLOCK"),
|
||||
ORANGE_BED(1, "BED_BLOCK", "BED"),
|
||||
ORANGE_CARPET(1, "CARPET"),
|
||||
ORANGE_CONCRETE(1, "CONCRETE"),
|
||||
ORANGE_CONCRETE_POWDER(1, "CONCRETE_POWDER"),
|
||||
@@ -742,7 +797,7 @@ public enum XMaterial {
|
||||
PIG_SPAWN_EGG(90, "MONSTER_EGG"),
|
||||
PILLAGER_SPAWN_EGG("1.14"),
|
||||
PINK_BANNER(9, "BANNER", "STANDING_BANNER"),
|
||||
PINK_BED(6, "BED", "BED_BLOCK"),
|
||||
PINK_BED(6, "BED_BLOCK", "BED"),
|
||||
PINK_CARPET(6, "CARPET"),
|
||||
PINK_CONCRETE(6, "CONCRETE"),
|
||||
PINK_CONCRETE_POWDER(6, "CONCRETE_POWDER"),
|
||||
@@ -753,7 +808,7 @@ public enum XMaterial {
|
||||
PINK_STAINED_GLASS_PANE(6, "THIN_GLASS", "STAINED_GLASS_PANE"),
|
||||
PINK_TERRACOTTA(6, "HARD_CLAY", "STAINED_CLAY"),
|
||||
PINK_TULIP(7, "RED_ROSE"),
|
||||
PINK_WALL_BANNER(14, "WALL_BANNER"),
|
||||
PINK_WALL_BANNER(9, "WALL_BANNER"),
|
||||
PINK_WOOL(6, "WOOL"),
|
||||
PISTON("PISTON_BASE"),
|
||||
PISTON_HEAD("PISTON_EXTENSION"),
|
||||
@@ -765,6 +820,17 @@ public enum XMaterial {
|
||||
POLISHED_ANDESITE(6, "STONE"),
|
||||
POLISHED_ANDESITE_SLAB,
|
||||
POLISHED_ANDESITE_STAIRS,
|
||||
POLISHED_BASALT("1.16"),
|
||||
POLISHED_BLACKSTONE("1.16"),
|
||||
POLISHED_BLACKSTONE_BRICKS("1.16"),
|
||||
POLISHED_BLACKSTONE_BRICK_SLAB("1.16"),
|
||||
POLISHED_BLACKSTONE_BRICK_STAIRS("1.16"),
|
||||
POLISHED_BLACKSTONE_BRICK_WALL("1.16"),
|
||||
POLISHED_BLACKSTONE_BUTTON("1.16"),
|
||||
POLISHED_BLACKSTONE_PRESSURE_PLATE("1.16"),
|
||||
POLISHED_BLACKSTONE_SLAB("1.16"),
|
||||
POLISHED_BLACKSTONE_STAIRS("1.16"),
|
||||
POLISHED_BLACKSTONE_WALL("1.16"),
|
||||
POLISHED_DIORITE(4, "STONE"),
|
||||
POLISHED_DIORITE_SLAB,
|
||||
POLISHED_DIORITE_STAIRS,
|
||||
@@ -820,7 +886,7 @@ public enum XMaterial {
|
||||
PUMPKIN_SEEDS,
|
||||
PUMPKIN_STEM,
|
||||
PURPLE_BANNER(5, "BANNER", "STANDING_BANNER"),
|
||||
PURPLE_BED(10, "BED", "BED_BLOCK"),
|
||||
PURPLE_BED(10, "BED_BLOCK", "BED"),
|
||||
PURPLE_CARPET(10, "CARPET"),
|
||||
PURPLE_CONCRETE(10, "CONCRETE"),
|
||||
PURPLE_CONCRETE_POWDER(10, "CONCRETE_POWDER"),
|
||||
@@ -850,17 +916,34 @@ public enum XMaterial {
|
||||
RAVAGER_SPAWN_EGG("1.14"),
|
||||
REDSTONE,
|
||||
REDSTONE_BLOCK,
|
||||
REDSTONE_LAMP("REDSTONE_LAMP_OFF", "REDSTONE_LAMP_ON"),
|
||||
/**
|
||||
* Unlike redstone torch, REDSTONE_LAMP_ON isn't an item.
|
||||
* The name is just here on the list for matching.
|
||||
*
|
||||
* @see #REDSTONE_TORCH
|
||||
*/
|
||||
REDSTONE_LAMP("REDSTONE_LAMP_ON", "REDSTONE_LAMP_OFF"),
|
||||
REDSTONE_ORE("GLOWING_REDSTONE_ORE"),
|
||||
REDSTONE_TORCH("REDSTONE_TORCH_ON", "REDSTONE_TORCH_OFF"),
|
||||
REDSTONE_WALL_TORCH(1, "REDSTONE_TORCH_ON", "REDSTONE_TORCH_OFF"),
|
||||
/**
|
||||
* REDSTONE_TORCH_OFF isn't an item, but a block.
|
||||
* But REDSTONE_TORCH_ON is the item.
|
||||
* The name is just here on the list for matching.
|
||||
*/
|
||||
REDSTONE_TORCH("REDSTONE_TORCH_OFF", "REDSTONE_TORCH_ON"),
|
||||
REDSTONE_WALL_TORCH,
|
||||
REDSTONE_WIRE,
|
||||
RED_BANNER(1, "BANNER", "STANDING_BANNER"),
|
||||
RED_BED(14, "BED", "BED_BLOCK"),
|
||||
/**
|
||||
* Data value 14 or 0
|
||||
*/
|
||||
RED_BED(0, "BED_BLOCK", "BED"),
|
||||
RED_CARPET(14, "CARPET"),
|
||||
RED_CONCRETE(14, "CONCRETE"),
|
||||
RED_CONCRETE_POWDER(14, "CONCRETE_POWDER"),
|
||||
RED_DYE(1, "ROSE_RED"),
|
||||
/**
|
||||
* Data value 0 or 1?
|
||||
*/
|
||||
RED_DYE(0, "INK_SACK", "ROSE_RED"),
|
||||
RED_GLAZED_TERRACOTTA(14, "1.12", "HARD_CLAY", "STAINED_CLAY", "RED_TERRACOTTA"),
|
||||
RED_MUSHROOM,
|
||||
RED_MUSHROOM_BLOCK("RED_MUSHROOM", "HUGE_MUSHROOM_2"),
|
||||
@@ -882,6 +965,7 @@ public enum XMaterial {
|
||||
RED_WOOL(14, "WOOL"),
|
||||
REPEATER("DIODE", "DIODE_BLOCK_ON", "DIODE_BLOCK_OFF"),
|
||||
REPEATING_COMMAND_BLOCK("COMMAND", "COMMAND_REPEATING"),
|
||||
RESPAWN_ANCHOR("1.16"),
|
||||
ROSE_BUSH(4, "DOUBLE_PLANT"),
|
||||
ROTTEN_FLESH,
|
||||
SADDLE,
|
||||
@@ -901,6 +985,7 @@ public enum XMaterial {
|
||||
SHEARS,
|
||||
SHEEP_SPAWN_EGG(91, "MONSTER_EGG"),
|
||||
SHIELD,
|
||||
SHROOMLIGHT("1.16"),
|
||||
SHULKER_BOX("PURPLE_SHULKER_BOX"),
|
||||
SHULKER_SHELL,
|
||||
SHULKER_SPAWN_EGG(69, "MONSTER_EGG"),
|
||||
@@ -929,7 +1014,13 @@ public enum XMaterial {
|
||||
SNOW,
|
||||
SNOWBALL("SNOW_BALL"),
|
||||
SNOW_BLOCK,
|
||||
SOUL_CAMPFIRE("1.16"),
|
||||
SOUL_FIRE("1.16"),
|
||||
SOUL_LANTERN("1.16"),
|
||||
SOUL_SAND,
|
||||
SOUL_SOIL("1.16"),
|
||||
SOUL_TORCH("1.16"),
|
||||
SOUL_WALL_TORCH("1.16"),
|
||||
SPAWNER("MOB_SPAWNER"),
|
||||
SPECTRAL_ARROW("1.9", "ARROW", ""),
|
||||
SPIDER_EYE,
|
||||
@@ -976,6 +1067,8 @@ public enum XMaterial {
|
||||
STRIPPED_ACACIA_WOOD("LOG_2"),
|
||||
STRIPPED_BIRCH_LOG(2, "LOG"),
|
||||
STRIPPED_BIRCH_WOOD(2, "LOG"),
|
||||
STRIPPED_CRIMSON_HYPHAE("1.16"),
|
||||
STRIPPED_CRIMSON_STEM("1.16"),
|
||||
STRIPPED_DARK_OAK_LOG("LOG"),
|
||||
STRIPPED_DARK_OAK_WOOD("LOG"),
|
||||
STRIPPED_JUNGLE_LOG(3, "LOG"),
|
||||
@@ -984,6 +1077,8 @@ public enum XMaterial {
|
||||
STRIPPED_OAK_WOOD("LOG"),
|
||||
STRIPPED_SPRUCE_LOG(1, "LOG"),
|
||||
STRIPPED_SPRUCE_WOOD(1, "LOG"),
|
||||
STRIPPED_WARPED_HYPHAE("1.16"),
|
||||
STRIPPED_WARPED_STEM("1.16"),
|
||||
STRUCTURE_BLOCK,
|
||||
/**
|
||||
* Originally developers used barrier blocks for its purpose.
|
||||
@@ -1002,6 +1097,7 @@ public enum XMaterial {
|
||||
SWEET_BERRY_BUSH("1.14", "GRASS", ""),
|
||||
TALL_GRASS(2, "DOUBLE_PLANT"),
|
||||
TALL_SEAGRASS(2, "1.13", "TALL_GRASS", ""),
|
||||
TARGET("1.16"),
|
||||
TERRACOTTA("HARD_CLAY"),
|
||||
TIPPED_ARROW("1.9", "ARROW", ""),
|
||||
TNT,
|
||||
@@ -1023,6 +1119,8 @@ public enum XMaterial {
|
||||
TURTLE_EGG("1.13", "EGG", ""),
|
||||
TURTLE_HELMET("1.13", "IRON_HELMET", ""),
|
||||
TURTLE_SPAWN_EGG("1.13", "CHICKEN_SPAWN_EGG", ""),
|
||||
TWISTING_VINES("1.16"),
|
||||
TWISTING_VINES_PLANT("1.16"),
|
||||
VEX_SPAWN_EGG(35, "MONSTER_EGG"),
|
||||
VILLAGER_SPAWN_EGG(120, "MONSTER_EGG"),
|
||||
VINDICATOR_SPAWN_EGG(36, "MONSTER_EGG"),
|
||||
@@ -1035,6 +1133,24 @@ public enum XMaterial {
|
||||
VOID_AIR("AIR"),
|
||||
WALL_TORCH("TORCH"),
|
||||
WANDERING_TRADER_SPAWN_EGG("1.14", "VILLAGER_SPAWN_EGG", ""),
|
||||
WARPED_BUTTON("1.16"),
|
||||
WARPED_DOOR("1.16"),
|
||||
WARPED_FENCE("1.16"),
|
||||
WARPED_FENCE_GATE("1.16"),
|
||||
WARPED_FUNGUS("1.16"),
|
||||
WARPED_FUNGUS_ON_A_STICK("1.16"),
|
||||
WARPED_HYPHAE("1.16"),
|
||||
WARPED_NYLIUM("1.16"),
|
||||
WARPED_PLANKS("1.16"),
|
||||
WARPED_PRESSURE_PLATE("1.16"),
|
||||
WARPED_ROOTS("1.16"),
|
||||
WARPED_SIGN("1.16"),
|
||||
WARPED_SLAB("1.16"),
|
||||
WARPED_STAIRS("1.16"),
|
||||
WARPED_STEM("1.16"),
|
||||
WARPED_TRAPDOOR("1.16"),
|
||||
WARPED_WALL_SIGN("1.16"),
|
||||
WARPED_WART_BLOCK("1.16"),
|
||||
/**
|
||||
* This is used for blocks only.
|
||||
* In 1.13- WATER will turn into STATIONARY_WATER after it finished spreading.
|
||||
@@ -1044,6 +1160,8 @@ public enum XMaterial {
|
||||
*/
|
||||
WATER("STATIONARY_WATER"),
|
||||
WATER_BUCKET,
|
||||
WEEPING_VINES("1.16"),
|
||||
WEEPING_VINES_PLANT("1.16"),
|
||||
WET_SPONGE(1, "SPONGE"),
|
||||
/**
|
||||
* Wheat is a known material in pre-1.13
|
||||
@@ -1052,16 +1170,16 @@ public enum XMaterial {
|
||||
WHEAT("CROPS"),
|
||||
WHEAT_SEEDS("SEEDS"),
|
||||
WHITE_BANNER(15, "BANNER", "STANDING_BANNER"),
|
||||
WHITE_BED("BED", "BED_BLOCK"),
|
||||
WHITE_BED("BED_BLOCK", "BED"),
|
||||
WHITE_CARPET("CARPET"),
|
||||
WHITE_CONCRETE("CONCRETE"),
|
||||
WHITE_CONCRETE_POWDER("CONCRETE_POWDER"),
|
||||
WHITE_DYE(15, "1.14", "INK_SACK", "BONE_MEAL"),
|
||||
WHITE_GLAZED_TERRACOTTA("1.12", "HARD_CLAY", "STAINED_CLAY", "WHITE_TERRACOTTA"),
|
||||
WHITE_GLAZED_TERRACOTTA("1.12", "HARD_CLAY", "STAINED_CLAY"),
|
||||
WHITE_SHULKER_BOX,
|
||||
WHITE_STAINED_GLASS("STAINED_GLASS"),
|
||||
WHITE_STAINED_GLASS_PANE("THIN_GLASS", "STAINED_GLASS_PANE"),
|
||||
WHITE_TERRACOTTA("HARD_CLAY", "TERRACOTTA"),
|
||||
WHITE_TERRACOTTA("HARD_CLAY", "STAINED_CLAY", "TERRACOTTA"),
|
||||
WHITE_TULIP(6, "RED_ROSE"),
|
||||
WHITE_WALL_BANNER(15, "WALL_BANNER"),
|
||||
WHITE_WOOL("WOOL"),
|
||||
@@ -1079,7 +1197,7 @@ public enum XMaterial {
|
||||
WRITABLE_BOOK("BOOK_AND_QUILL"),
|
||||
WRITTEN_BOOK,
|
||||
YELLOW_BANNER(11, "BANNER", "STANDING_BANNER"),
|
||||
YELLOW_BED(4, "BED", "BED_BLOCK"),
|
||||
YELLOW_BED(4, "BED_BLOCK", "BED"),
|
||||
YELLOW_CARPET(4, "CARPET"),
|
||||
YELLOW_CONCRETE(4, "CONCRETE"),
|
||||
YELLOW_CONCRETE_POWDER(4, "CONCRETE_POWDER"),
|
||||
@@ -1096,7 +1214,8 @@ public enum XMaterial {
|
||||
ZOMBIE_PIGMAN_SPAWN_EGG(57, "MONSTER_EGG"),
|
||||
ZOMBIE_SPAWN_EGG(54, "MONSTER_EGG"),
|
||||
ZOMBIE_VILLAGER_SPAWN_EGG(27, "MONSTER_EGG"),
|
||||
ZOMBIE_WALL_HEAD(2, "SKULL", "SKULL_ITEM");
|
||||
ZOMBIE_WALL_HEAD(2, "SKULL", "SKULL_ITEM"),
|
||||
ZOMBIFIED_PIGLIN_SPAWN_EGG(54, "MONSTER_EGG");
|
||||
|
||||
|
||||
/**
|
||||
@@ -1132,16 +1251,26 @@ public enum XMaterial {
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
private static final ImmutableMap<XMaterial, XMaterial> DUPLICATED = Maps.immutableEnumMap(ImmutableMap.<XMaterial, XMaterial>builder()
|
||||
private static final ImmutableMap<XMaterial, XMaterial> duplicated = Maps.immutableEnumMap(ImmutableMap.<XMaterial, XMaterial>builder()
|
||||
.put(MELON, MELON_SLICE)
|
||||
.put(CARROT, CARROTS)
|
||||
.put(POTATO, POTATOES)
|
||||
.put(BEETROOT, BEETROOTS)
|
||||
.put(BROWN_MUSHROOM, BROWN_MUSHROOM_BLOCK)
|
||||
.put(BRICK, BRICKS)
|
||||
.put(RED_MUSHROOM, RED_MUSHROOM_BLOCK)
|
||||
.put(MAP, FILLED_MAP)
|
||||
.put(NETHER_BRICK, NETHER_BRICKS)
|
||||
|
||||
// Illegal Elements
|
||||
// Since both 1.12 and 1.13 have <type>_DOOR XMaterial will use it
|
||||
// for 1.12 to parse the material, but it needs <type>_DOOR_ITEM.
|
||||
// We'll trick XMaterial into thinking this needs to be parsed
|
||||
// using the old methods.
|
||||
.put(DARK_OAK_DOOR, DARK_OAK_DOOR)
|
||||
.put(ACACIA_DOOR, ACACIA_DOOR)
|
||||
.put(BIRCH_DOOR, BIRCH_DOOR)
|
||||
.put(JUNGLE_DOOR, JUNGLE_DOOR)
|
||||
.put(SPRUCE_DOOR, SPRUCE_DOOR)
|
||||
|
||||
.build()
|
||||
);
|
||||
/*
|
||||
@@ -1232,7 +1361,7 @@ public enum XMaterial {
|
||||
* An invocation of this method yields the cached result from the expression:
|
||||
* <p>
|
||||
* <blockquote>
|
||||
* {@link #supports(int 13)}}
|
||||
* {@link #supports(int) 13}}
|
||||
* </blockquote>
|
||||
*
|
||||
* @return true if 1.13 or higher.
|
||||
@@ -1283,13 +1412,14 @@ public enum XMaterial {
|
||||
@Nullable
|
||||
private static XMaterial requestOldXMaterial(@Nonnull String name, byte data) {
|
||||
String holder = name + data;
|
||||
XMaterial material = NAME_CACHE.getIfPresent(holder);
|
||||
if (material != null) return material;
|
||||
XMaterial cache = NAME_CACHE.getIfPresent(holder);
|
||||
if (cache != null) return cache;
|
||||
|
||||
for (XMaterial materials : VALUES) {
|
||||
if ((data == -1 || data == materials.data) && materials.anyMatchLegacy(name)) {
|
||||
NAME_CACHE.put(holder, materials);
|
||||
return materials;
|
||||
for (XMaterial material : VALUES) {
|
||||
// Not using material.name().equals(name) check is intended.
|
||||
if ((data == -1 || data == material.data) && material.anyMatchLegacy(name)) {
|
||||
NAME_CACHE.put(holder, material);
|
||||
return material;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1320,37 +1450,15 @@ public enum XMaterial {
|
||||
/**
|
||||
* Parses the given material name as an XMaterial with unspecified data value.
|
||||
*
|
||||
* @see #matchXMaterial(String, byte)
|
||||
* @see #matchXMaterialWithData(String)
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@Nonnull
|
||||
public static Optional<XMaterial> matchXMaterial(@Nonnull String name) {
|
||||
return matchXMaterial(name, (byte) -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the given material name as an XMaterial.
|
||||
* Can also be used like: <b>MATERIAL:DATA</b>
|
||||
* <p>
|
||||
* <b>Examples</b>
|
||||
* <pre>
|
||||
* INK_SACK:1 -> RED_DYE
|
||||
* WOOL, 14 -> RED_WOOL
|
||||
* </pre>
|
||||
*
|
||||
* @see #matchDefinedXMaterial(String, byte)
|
||||
* @see #matchXMaterial(ItemStack)
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@Nonnull
|
||||
public static Optional<XMaterial> matchXMaterial(@Nonnull String name, byte data) {
|
||||
Validate.notEmpty(name, "Cannot match a material with null or empty material name");
|
||||
Optional<XMaterial> oldMatch = matchXMaterialWithData(name);
|
||||
if (oldMatch.isPresent()) return oldMatch;
|
||||
|
||||
// -1 Determines whether the item's data value is unknown and only the name is given.
|
||||
// Checking if the item is damageable won't do anything as the data is not going to be checked in requestOldMaterial anyway.
|
||||
return matchDefinedXMaterial(format(name), data);
|
||||
return matchDefinedXMaterial(format(name), (byte) -1);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1360,8 +1468,8 @@ public enum XMaterial {
|
||||
* <p>
|
||||
* <b>Examples</b>
|
||||
* <p><pre>
|
||||
* INK_SACK:1 -> RED_DYE
|
||||
* WOOL, 14 -> RED_WOOL
|
||||
* {@code INK_SACK:1 -> RED_DYE}
|
||||
* {@code WOOL, 14 -> RED_WOOL}
|
||||
* </pre>
|
||||
*
|
||||
* @param name the material string that consists of the material name, data and separator character.
|
||||
@@ -1394,7 +1502,7 @@ public enum XMaterial {
|
||||
public static XMaterial matchXMaterial(@Nonnull Material material) {
|
||||
Objects.requireNonNull(material, "Cannot match null material");
|
||||
return matchDefinedXMaterial(material.name(), (byte) -1)
|
||||
.orElseThrow(() -> new IllegalArgumentException("Unsupported Material: " + material));
|
||||
.orElseThrow(() -> new IllegalArgumentException("Unsupported Material With No Bytes: " + material.name()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1411,9 +1519,10 @@ public enum XMaterial {
|
||||
public static XMaterial matchXMaterial(@Nonnull ItemStack item) {
|
||||
Objects.requireNonNull(item, "Cannot match null ItemStack");
|
||||
String material = item.getType().name();
|
||||
return matchDefinedXMaterial(material,
|
||||
isDamageable(material) ? (byte) 0 : (byte) item.getDurability())
|
||||
.orElseThrow(() -> new IllegalArgumentException("Unsupported Material: " + material));
|
||||
byte data = (byte) (ISFLAT || isDamageable(material) ? 0 : item.getDurability());
|
||||
|
||||
return matchDefinedXMaterial(material, data)
|
||||
.orElseThrow(() -> new IllegalArgumentException("Unsupported Material: " + material + " (" + data + ')'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1423,7 +1532,6 @@ public enum XMaterial {
|
||||
* @param name the formatted name of the material.
|
||||
* @param data the data value of the material.
|
||||
* @return an XMaterial (with the same data value if specified)
|
||||
* @see #matchXMaterial(String, byte)
|
||||
* @see #matchXMaterial(Material)
|
||||
* @see #matchXMaterial(int, byte)
|
||||
* @see #matchXMaterial(ItemStack)
|
||||
@@ -1436,7 +1544,7 @@ public enum XMaterial {
|
||||
// Do basic number and boolean checks before accessing more complex enum stuff.
|
||||
// Maybe we can simplify (ISFLAT || !duplicated) with the (!ISFLAT && duplicated) under it to save a few nanoseconds?
|
||||
// if (!Boolean.valueOf(Boolean.getBoolean(Boolean.TRUE.toString())).equals(Boolean.FALSE.booleanValue())) return null;
|
||||
if (data <= 0 && (ISFLAT || !duplicated)) {
|
||||
if (data <= 0 && !duplicated) {
|
||||
// Apparently the transform method is more efficient than toJavaUtil()
|
||||
// toJavaUtil isn't even supported in older versions.
|
||||
Optional<XMaterial> xMat = Enums.getIfPresent(XMaterial.class, name).transform(Optional::of).or(Optional.empty());
|
||||
@@ -1447,8 +1555,20 @@ public enum XMaterial {
|
||||
// I've concluded that this is just an infinite loop that keeps
|
||||
// going around the Singular Form and the Plural Form materials. A waste of brain cells and a waste of time.
|
||||
// This solution works just fine anyway.
|
||||
if (!ISFLAT && duplicated) return Optional.ofNullable(requestDuplicatedXMaterial(name, data));
|
||||
return Optional.ofNullable(requestOldXMaterial(name, data));
|
||||
XMaterial xMat = requestOldXMaterial(name, data);
|
||||
if (xMat == null) {
|
||||
// Special case. Refer to FILLED_MAP for more info.
|
||||
if (data > 0 && name.endsWith("MAP")) return Optional.of(FILLED_MAP);
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
if (!ISFLAT && duplicated && xMat.name().charAt(xMat.name().length() - 1) == 'S') {
|
||||
// A solution for XMaterial Paradox.
|
||||
// Manually parses the duplicated materials to find the exact material based on the server version.
|
||||
// If ends with "S" -> Plural Form Material
|
||||
return Enums.getIfPresent(XMaterial.class, name).transform(Optional::of).or(Optional.empty());
|
||||
}
|
||||
return Optional.ofNullable(xMat);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1463,13 +1583,12 @@ public enum XMaterial {
|
||||
* @see #isDuplicated()
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public static boolean isDuplicated(@Nonnull String name) {
|
||||
Validate.notEmpty(name, "Cannot check duplication for null or empty material name");
|
||||
name = format(name);
|
||||
|
||||
private static boolean isDuplicated(@Nonnull String name) {
|
||||
// Don't use matchXMaterial() since this method is being called from matchXMaterial() itself and will cause a StackOverflowError.
|
||||
for (Map.Entry<XMaterial, XMaterial> duplicated : DUPLICATED.entrySet())
|
||||
if (duplicated.getKey().name().equals(name) || duplicated.getKey().anyMatchLegacy(name)) return true;
|
||||
for (Map.Entry<XMaterial, XMaterial> duplicated : duplicated.entrySet()) {
|
||||
XMaterial material = duplicated.getKey();
|
||||
if (material.name().equals(name) || material.anyMatchLegacy(name)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1493,60 +1612,6 @@ public enum XMaterial {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
* A solution for <b>XMaterial Paradox</b>.
|
||||
* Manually parses the duplicated materials to find the exact material based on the server version.
|
||||
*
|
||||
* @param name the name of the material.
|
||||
* @return the duplicated XMaterial based on the version.
|
||||
* @throws IllegalArgumentException may be thrown. If thrown, it's a bug.
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@Nullable
|
||||
private static XMaterial requestDuplicatedXMaterial(@Nonnull String name, byte data) {
|
||||
XMaterial mat = requestOldXMaterial(name, data);
|
||||
// If ends with "S" -> Plural Form Material
|
||||
return mat.name().charAt(mat.name().length() - 1) == 'S' ? Enums.getIfPresent(XMaterial.class, name).orNull() : mat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Always returns the value with the given duplicated material key name.
|
||||
*
|
||||
* @param name the name of the material.
|
||||
* @return the new XMaterial of this duplicated material.
|
||||
* @see #getXMaterialIfDuplicated(String)
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@Nonnull
|
||||
public static Optional<XMaterial> getNewXMaterialIfDuplicated(@Nonnull String name) {
|
||||
Validate.notEmpty(name, "Cannot get new duplicated material for null or empty material name");
|
||||
name = format(name);
|
||||
|
||||
for (Map.Entry<XMaterial, XMaterial> duplicated : DUPLICATED.entrySet())
|
||||
if (duplicated.getKey().name().equals(name)) return Optional.of(duplicated.getKey());
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the item is duplicated for a different purpose in new versions from {@link #DUPLICATED}.
|
||||
*
|
||||
* @param name the name of the material.
|
||||
* @return the other XMaterial (key or value) of the XMaterial (key or value).
|
||||
* @see #matchXMaterial(String, byte)
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@Nullable
|
||||
public static XMaterial getXMaterialIfDuplicated(@Nonnull String name) {
|
||||
Validate.notEmpty(name, "Cannot get duplicated material for null or empty material name");
|
||||
name = format(name);
|
||||
|
||||
for (Map.Entry<XMaterial, XMaterial> duplicated : DUPLICATED.entrySet())
|
||||
if (duplicated.getKey().name().equals(name)) return duplicated.getValue();
|
||||
else if (duplicated.getValue().name().equals(name)) return duplicated.getKey();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to build the string like an enum name.
|
||||
* Removes all the spaces, numbers and extra non-English characters. Also removes some config/in-game based strings.
|
||||
@@ -1564,7 +1629,7 @@ public enum XMaterial {
|
||||
/**
|
||||
* Checks if the specified version is the same version or higher than the current server version.
|
||||
*
|
||||
* @param version the major version to be checked. "1." is ignored -> 1.12 = 12 | 1.9 = 9
|
||||
* @param version the major version to be checked. "1." is ignored. E.g. 1.12 = 12 | 1.9 = 9
|
||||
* @return true of the version is equal or higher than the current version.
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@@ -1663,14 +1728,14 @@ public enum XMaterial {
|
||||
* <br>
|
||||
* <b>{@code CONTAINS} Examples:</b>
|
||||
* <pre>
|
||||
* "CONTAINS:CHEST" -> CHEST, ENDERCHEST, TRAPPED_CHEST -> true
|
||||
* "cOnTaINS:dYe" -> GREEN_DYE, YELLOW_DYE, BLUE_DYE, INK_SACK -> true
|
||||
* {@code "CONTAINS:CHEST" -> CHEST, ENDERCHEST, TRAPPED_CHEST -> true}
|
||||
* {@code "cOnTaINS:dYe" -> GREEN_DYE, YELLOW_DYE, BLUE_DYE, INK_SACK -> true}
|
||||
* </pre>
|
||||
* <p>
|
||||
* <b>{@code REGEX} Examples</b>
|
||||
* <pre>
|
||||
* "REGEX:^.+_.+_.+$" -> Every Material with 3 underlines or more: SHULKER_SPAWN_EGG, SILVERFISH_SPAWN_EGG, SKELETON_HORSE_SPAWN_EGG
|
||||
* "REGEX:^.{1,3}$" -> Material names that have 3 letters only: BED, MAP, AIR
|
||||
* {@code "REGEX:^.+_.+_.+$" -> Every Material with 3 underlines or more: SHULKER_SPAWN_EGG, SILVERFISH_SPAWN_EGG, SKELETON_HORSE_SPAWN_EGG}
|
||||
* {@code "REGEX:^.{1,3}$" -> Material names that have 3 letters only: BED, MAP, AIR}
|
||||
* </pre>
|
||||
* <p>
|
||||
* The reason that there are tags for {@code CONTAINS} and {@code REGEX}
|
||||
@@ -1803,8 +1868,7 @@ public enum XMaterial {
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public int getId() {
|
||||
if (this.data != 0 || (this.legacy.length != 0 && Integer.parseInt(this.legacy[0].substring(2)) >= 13))
|
||||
return -1;
|
||||
if (this.data != 0 || (this.legacy.length != 0 && Integer.parseInt(this.legacy[0].substring(2)) >= 13)) return -1;
|
||||
Material material = this.parseMaterial();
|
||||
return material == null ? -1 : material.getId();
|
||||
}
|
||||
@@ -1813,25 +1877,11 @@ public enum XMaterial {
|
||||
* Checks if the material has any duplicates.
|
||||
*
|
||||
* @return true if there is a duplicated name for this material, otherwise false.
|
||||
* @see #getXMaterialIfDuplicated()
|
||||
* @see #isDuplicated(String)
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public boolean isDuplicated() {
|
||||
return DUPLICATED.containsKey(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the item is duplicated for a different purpose in new versions.
|
||||
*
|
||||
* @return true if the item's name is duplicated, otherwise false.
|
||||
* @see #isDuplicated()
|
||||
* @see #getNewXMaterialIfDuplicated(String)
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@Nullable
|
||||
public XMaterial getXMaterialIfDuplicated() {
|
||||
return DUPLICATED.get(this);
|
||||
return duplicated.containsKey(this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1891,7 +1941,7 @@ public enum XMaterial {
|
||||
* Parses an item from this XMaterial.
|
||||
* Uses data values on older versions.
|
||||
*
|
||||
* @param suggest if true {@link #parseMaterial(boolean true)} will be used.
|
||||
* @param suggest if true {@link #parseMaterial(boolean)} true will be used.
|
||||
* @return an ItemStack with the same material (and data value if in older versions.)
|
||||
* @see #setType(ItemStack)
|
||||
* @since 2.0.0
|
||||
@@ -1921,7 +1971,6 @@ public enum XMaterial {
|
||||
*
|
||||
* @param suggest use a suggested material (from older materials) if the material is added in a later version of Minecraft.
|
||||
* @return the material related to this XMaterial based on the server version.
|
||||
* @see #matchXMaterial(String, byte)
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@SuppressWarnings("OptionalAssignedToNull")
|
||||
|
||||
@@ -73,6 +73,7 @@ public class JSONFPlayers extends MemoryFPlayers {
|
||||
if (!this.file.exists()) return new HashMap<>();
|
||||
String content = DiscUtil.readCatch(this.file);
|
||||
if (content == null) return null;
|
||||
try {
|
||||
Map<String, JSONFPlayer> data = this.gson.fromJson(content, new TypeToken<Map<String, JSONFPlayer>>() {
|
||||
}.getType());
|
||||
Set<String> list = new HashSet<>();
|
||||
@@ -150,6 +151,14 @@ public class JSONFPlayers extends MemoryFPlayers {
|
||||
Bukkit.getLogger().log(Level.INFO, "Done converting players.json to UUID.");
|
||||
}
|
||||
return data;
|
||||
} catch (NullPointerException exception) {
|
||||
exception.printStackTrace();
|
||||
if (this.file.length() < 200) {
|
||||
return new HashMap<>();
|
||||
} else {
|
||||
throw exception;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean doesKeyNeedMigration(String key) {
|
||||
|
||||
@@ -294,6 +294,7 @@ show:
|
||||
- '&4* &cBans: &f{faction-bancount}'
|
||||
- '&8&m----------------------------------------'
|
||||
# For a /f show that does not display fancy messages that are essentially empty, use minimal-show
|
||||
relational-show: true
|
||||
minimal-show: false
|
||||
|
||||
# Factions that should be exempt from /f show, case sensitive, useful for a
|
||||
|
||||
@@ -226,7 +226,7 @@ COMMAND:
|
||||
ONLINEFACTIONLESS: 'Online factionless: '
|
||||
LOCK:
|
||||
LOCKED: <i>Factions is now locked
|
||||
UNLOCKED: <i>Factions in now unlocked
|
||||
UNLOCKED: <i>Factions is now unlocked
|
||||
LOGINS:
|
||||
TOGGLE: '<i>Set login / logout notifications for Faction members to: <a>%s'
|
||||
MAP:
|
||||
|
||||
508
src/main/resources/lang/zh_CN.yml
Normal file
508
src/main/resources/lang/zh_CN.yml
Normal file
@@ -0,0 +1,508 @@
|
||||
# Saber Factions 中文汉化语言包 @ Forbidden
|
||||
# Made with love <3
|
||||
|
||||
|
||||
|
||||
root:
|
||||
AUTHOR: Forbidden
|
||||
RESPONSIBLE: Forbidden
|
||||
LANGUAGE: Simplified Chinese
|
||||
ENCODING: UTF-8
|
||||
LOCALE: zh_CN
|
||||
REQUIRESUNICODE: 'true'
|
||||
DEFAULT: 'false'
|
||||
STATE: complete
|
||||
LOCAL:
|
||||
AUTHOR: Forbidden
|
||||
RESPONSIBLE: Forbidden
|
||||
LANGUAGE: 简体中文
|
||||
REGION: 中国大陆
|
||||
STATE: 完全汉化
|
||||
COMMAND:
|
||||
ADMIN:
|
||||
NOTMEMBER: '%1$s<i> 不是您派系的一员。'
|
||||
NOTADMIN: <b>您不是派系的管理员。
|
||||
TARGETSELF: <b>目标玩家不可为您本人。
|
||||
DEMOTES: <i>您降职了帮派管理员 %1$s<i>。
|
||||
DEMOTED: <i>您被 %1$s<i> 降职了。
|
||||
PROMOTES: <i>您被 %1$s<i> 升职到了派系管理员。
|
||||
PROMOTED: '%1$s<i> 给予了 %2$s<i> %3$s<i> 的管理员。'
|
||||
AUTOCLAIM:
|
||||
ENABLED: <i>正在为 <h>%1$s<i> 自动宣称领土。
|
||||
DISABLED: <i>已禁用自动宣称领土。
|
||||
REQUIREDRANK: <b>您必须为 <h>%1$s<b> 才能宣称领土。
|
||||
OTHERFACTION: <b>您不能为 <h>%1$s<b> 宣称领土。
|
||||
AUTOHELP:
|
||||
HELPFOR: 命令 " 的帮助:
|
||||
BOOM:
|
||||
PEACEFULONLY: <b>此指令仅限于和平状态下的帮派使用。
|
||||
TOTOGGLE: 来启用爆炸
|
||||
FORTOGGLE: 要开关爆炸
|
||||
ENABLED: '%1$s<i> 已%2$s您领土的爆炸功能。'
|
||||
BYPASS:
|
||||
ENABLE: <i>您已启用管理员绕过模式。您可在任意地点建造或破坏。
|
||||
ENABLELOG: ' 已启用管理员绕过模式。'
|
||||
DISABLE: <i>您已禁用管理员绕过模式。
|
||||
DISABLELOG: ' 已禁用管理员绕过模式。'
|
||||
CHAT:
|
||||
DISABLED: <b>此服务器禁止了内置聊天频道。
|
||||
INVALIDMODE: <b>无法识别的聊天模式,<i>请键入 'a'、'f' 或 'plugin'
|
||||
MODE:
|
||||
PUBLIC: <i>公共聊天模式。
|
||||
ALLIANCE: <i>盟友聊天模式。
|
||||
FACTION: <i>派系聊天模式。
|
||||
CHATSPY:
|
||||
ENABLE: <i>您已启用顺风耳模式。
|
||||
ENABLELOG: ' 已启用顺风耳模式'
|
||||
DISABLE: <i>您已禁用顺风耳模式。
|
||||
DISABLELOG: ' 已禁用顺风耳模式。'
|
||||
CLAIM:
|
||||
INVALIDRADIUS: <b>若您指定半径,则半径至少应为 1。
|
||||
DENIED: <b>您没有指定半径宣称领土的权限。
|
||||
CONFIG:
|
||||
NOEXIST: <b>"<h>%1$s<b>" 的配置设置不存在。
|
||||
SET:
|
||||
'TRUE': '" 选项已设置为 true (已启用)。'
|
||||
'FALSE': '" 选项已设置为 false (已禁用)。'
|
||||
ADDED: '"%1$s" 设置:已添加 "%2$s"。'
|
||||
REMOVED: '"%1$s" 设置:已移除 "%2$s"。'
|
||||
OPTIONSET: '" 选项已设置为 '
|
||||
COLOURSET: '" 颜色选项已设置为 "'
|
||||
INTREQUIRED: '无法设置 "%1$s":选项需要整数值。'
|
||||
LONGREQUIRED: '无法设置 "%1$s":选项需要长整数值。'
|
||||
DOUBLEREQUIRED: '无法设置 "%1$s":选项需要双精度值。'
|
||||
FLOATREQUIRED: '无法设置 "%1$s":选项需要浮点值。'
|
||||
INVALID:
|
||||
COLOUR: '无法设置 "%1$s":"%2$s" 不是有效颜色。'
|
||||
COLLECTION: '"%1$s" 不是可用此命令修改的数据集类型。'
|
||||
MATERIAL: '无法更改 "%1$s" 集:"%2$s" 不是有效的材料。'
|
||||
TYPESET: '"%1$s" 不是可用此命令修改的数据类型集类型。'
|
||||
MATERIAL:
|
||||
ADDED: '"%1$s" 设置:添加了材料 "%2$s"。'
|
||||
REMOVED: '"%1$s" 设置:移除了材料 "%2$s"。'
|
||||
LOG: ' (%1$s 运行了指令)'
|
||||
ERROR:
|
||||
SETTING: 设置配置选项 "%1$s" 至 "%2$s" 时发生错误。
|
||||
MATCHING: 无法匹配配置选项 "%1$s",请汇报此错误。
|
||||
TYPE: '''%1$s'' 的类型为 ''%2$s'',其无法被此命令修改。'
|
||||
CREATE:
|
||||
MUSTLEAVE: <b>您必须先离开当前派系。
|
||||
INUSE: <b>此标签已被使用。
|
||||
TOCREATE: 来创建新派系
|
||||
FORCREATE: 要创建新派系
|
||||
ERROR: <b>创建派系时发生内部错误,请重试。
|
||||
CREATED: '%1$s<i> 创建了新派系 %2$s'
|
||||
YOUSHOULD: '<i>您现在应:%1$s'
|
||||
CREATEDLOG: ' 创建了新派系:'
|
||||
DEINVITE:
|
||||
CANDEINVITE: '您可取消邀请的玩家:'
|
||||
CLICKTODEINVITE: 点击取消 %1$s 的邀请
|
||||
ALREADYMEMBER: '%1$s<i> 已是 %2$s 的成员'
|
||||
MIGHTWANT: '<i>您可能想要:%1$s'
|
||||
REVOKED: '%1$s<i> 撤回了您加入 <h>%2$s<i> 的邀请。'
|
||||
REVOKES: '%1$s<i> 撤回了 %2$s <i>的邀请。'
|
||||
DELFWARP:
|
||||
DELETED: <i>已删除传送点 <a>%1$s
|
||||
INVALID: <i>无法找到传送点 <a>%1$s
|
||||
TODELETE: 来删除传送点
|
||||
FORDELETE: 要删除传送点
|
||||
DESCRIPTION:
|
||||
CHANGES: '您更改了 <h>%1$s<i> 的描述至:'
|
||||
CHANGED: '<i>帮派 %1$s<i> 更改了其描述至:'
|
||||
TOCHANGE: 来更改帮派描述
|
||||
FORCHANGE: 要更改帮派描述
|
||||
DISBAND:
|
||||
IMMUTABLE: <i>您不可解散荒地 (Wilderness)、安全区 (SafeZone) 或是战区 (WarZone)。
|
||||
MARKEDPERMANENT: <i>此帮派已被标记为永久存在,您不可解散。
|
||||
BROADCAST:
|
||||
YOURS: <h>%1$s<i> 解散了您的帮派。
|
||||
NOTYOURS: <h>%1$s<i> 解散了帮派 %2$s。
|
||||
HOLDINGS: <i>您获得了解散帮派银行内的资产,共计 %1$s。
|
||||
FWARP:
|
||||
CLICKTOWARP: 点击传送!
|
||||
COMMANDFORMAT: <i>/f warp <传送点名>
|
||||
WARPED: <i>已传送至 <a>%1$s
|
||||
INVALID: <i>无法找到传送点 <a>%1$s
|
||||
TOWARP: 来传送
|
||||
FORWARPING: 要传送
|
||||
WARPS: '传送点:'
|
||||
HELP:
|
||||
'404': <b>此页面不存在
|
||||
NEXTCREATE: <i>您可在下一页了解如何创建帮派。
|
||||
HOME: '<i>另外,别忘记设置家:'
|
||||
BANK:
|
||||
'1': <i>您的帮派有着用于支付特定物品的银行。
|
||||
'2': <i>因此,银行内应储蓄有钱款。
|
||||
'3': <i>要了解更多,请使用 money 指令。
|
||||
PLAYERTITLES: <i>玩家头衔只是为了好玩而已,没有任何钦点的意思。
|
||||
OWNERSHIP:
|
||||
'1': <i>已宣称且占有的土地已被保护。
|
||||
'2': <i>故只有所有者、帮派管理员
|
||||
'3': <i>才有完整权限。
|
||||
RELATIONS:
|
||||
'1': <i>设置您想与其他帮派达成的关系。
|
||||
'2': <i>默认情况下,您与其他帮派的关系为中立。
|
||||
'3': <i>若双方选择盟友 (ally) 则你们将成为盟友。
|
||||
'4': <i>若单方选择敌人 (enemy) 则你们将互为对头。
|
||||
'5': <i>您不可伤害帮派成员或盟友。
|
||||
'6': <i>您不可在对方领土上伤害中立成员。
|
||||
'7': <i>您可伤害敌人及未加入帮派的玩家。
|
||||
'8': ''
|
||||
'9': <i>在您领土上,来自敌人的伤害将减少。
|
||||
'10': <i>在您死亡时,您将失去影响力。影响力将随时间恢复。
|
||||
'11': <i>一个帮派的影响力为所有成员影响力的总和。
|
||||
'12': <i>一个帮派的影响力决定了其可维持多少土地。
|
||||
'13': <i>您可在影响力过少的帮派的领土上进行宣称。
|
||||
PERMISSIONS:
|
||||
'1': <i>仅有帮派成员可在其自己的领土上建造或摧毁。
|
||||
'2': '<i>同时,下列物品的使用也将受限:'
|
||||
'3': <i>门、箱子、熔炉、发射器及红石中继器。
|
||||
'4': ''
|
||||
'5': <i>请确保为您的访客在门前放置压力板。
|
||||
'6': <i>否则他/她们将无法进入。
|
||||
'7': <i>您也可以利用此方法来创建仅限成员进入的区域。
|
||||
'8': <i>同时由于发射器受保护,您可制造陷阱而
|
||||
'9': <i>不必担忧箭矢被偷。
|
||||
ADMIN:
|
||||
'1': <c>/f claim safezone <i>宣称土地为安全区
|
||||
'2': <c>/f claim warzone <i>宣称土地为战区
|
||||
'3': <c>/f autoclaim [safezone|warzone] <i>随机宣称区域
|
||||
MOAR:
|
||||
'1': '终于,管理员有命令可用了:'
|
||||
'2': '<i>给管理员的更多命令:'
|
||||
'3': '<i>给管理员的甚至更多命令:'
|
||||
HOME:
|
||||
DISABLED: <b>很抱歉,此服务器上禁用了帮派家功能。
|
||||
TELEPORTDISABLED: <b>很抱歉,此服务器上禁用了传送至帮派家功能。
|
||||
NOHOME: '<b>您的帮派没有家。'
|
||||
INENEMY: <b>您无法在对立帮派的领土上传送至您的帮派家。
|
||||
WRONGWORLD: <b>您无法在别的世界传送至您的帮派家。
|
||||
ENEMYNEAR: <b>您无法在敌人距您 %s 方块时传送至您的帮派家。
|
||||
TOTELEPORT: 来传送至您的帮派家
|
||||
FORTELEPORT: 要传送至您的帮派家
|
||||
INVITE:
|
||||
TOINVITE: 来邀请某位玩家
|
||||
FORINVITE: 要邀请某位玩家
|
||||
CLICKTOJOIN: 点击加入!
|
||||
INVITEDYOU: ' 邀请您加入 '
|
||||
INVITED: '%1$s<i> 邀请了 %2$s<i> 至您的帮派。'
|
||||
ALREADYMEMBER: '%1$s<i> 已经是 %2$s 的成员。'
|
||||
JOIN:
|
||||
CANNOTFORCE: <b>您没有移动玩家至其他帮派的权限。
|
||||
SYSTEMFACTION: <b>玩家仅可加入普通帮派,而这是一个系统帮派。
|
||||
ALREADYMEMBER: <b>%1$s %2$s 已经是 %3$s 的成员。
|
||||
ATLIMIT: ' <b>!<white> 帮派 %1$s 已达到 %2$d 位成员的限制,故 %3$s 当前无法加入。'
|
||||
INOTHERFACTION: <b>%1$s 必须先离开 %2$s 当前帮派。
|
||||
NEGATIVEPOWER: <b>%1$s 无法加入影响力为负的帮派。
|
||||
REQUIRESINVITATION: <i>此帮派需要邀请。
|
||||
ATTEMPTEDJOIN: '%1$s<i> 尝试加入您的帮派。'
|
||||
TOJOIN: 来加入帮派
|
||||
FORJOIN: 要加入帮派
|
||||
SUCCESS: <i>%1$s 已成功加入 %2$s.
|
||||
MOVED: <i>%1$s 已移动您至帮派 %2$s。
|
||||
JOINED: <i>%1$s 加入了您的帮派。
|
||||
JOINEDLOG: '%1$s 加入了帮派 %2$s。'
|
||||
MOVEDLOG: '%1$s 移动了玩家 %2$s 至帮派 %3$s。'
|
||||
KICK:
|
||||
CANDIDATES: '您可踢出的玩家:'
|
||||
CLICKTOKICK: '点击踢出 '
|
||||
SELF: <b>您无法踢出您自己。
|
||||
NONE: 此玩家不在帮派里。.
|
||||
NOTMEMBER: '%1$s<b> 不是 %2$s 的成员。'
|
||||
INSUFFICIENTRANK: <b>您的等级不足以踢出此玩家。
|
||||
NEGATIVEPOWER: <b>您无法踢出影响力为负的成员。
|
||||
TOKICK: 来踢出帮派成员
|
||||
FORKICK: 要踢出帮派成员
|
||||
FACTION: '%1$s<i> 将 %2$s<i> 踢出了帮派!:O'
|
||||
KICKS: <i>您将 %1$s<i> 踢出了帮派 %2$s<i>!
|
||||
KICKED: '%1$s<i> 将您踢出了 %2$s<i>!:O'
|
||||
LIST:
|
||||
FACTIONLIST: '帮派列表 '
|
||||
TOLIST: 来列出帮派列表
|
||||
FORLIST: 要列出帮派列表
|
||||
ONLINEFACTIONLESS: '在线的非帮派玩家:'
|
||||
LOCK:
|
||||
LOCKED: <i>帮派现已锁定
|
||||
UNLOCKED: <i>帮派现已解锁
|
||||
LOGINS:
|
||||
TOGGLE: '<i>设置帮派成员登录 / 登出提示至:<a>%s'
|
||||
MAP:
|
||||
TOSHOW: 来展示地图
|
||||
FORSHOW: 要展示地图
|
||||
UPDATE:
|
||||
ENABLED: <i>地图自动更新<green>已启用<i>。
|
||||
DISABLED: <i>地图自动更新<red>已禁用<i>。
|
||||
MOD:
|
||||
CANDIDATES: '您可提拔的玩家列表:'
|
||||
CLICKTOPROMOTE: '点击提拔 '
|
||||
NOTMEMBER: '%1$s<b> 并不是您帮派的成员。'
|
||||
NOTADMIN: <b>您不是帮派管理员。
|
||||
SELF: <b>目标玩家不可为您自己。
|
||||
TARGETISADMIN: <b>目标玩家为帮派管理员,请先降职他/她。
|
||||
REVOKES: <i>您从 %1$s 移除了调停者状态<i>。
|
||||
REVOKED: '%1$s<i> 不再是您帮派的调停者。'
|
||||
PROMOTES: '%1$s<i> 晋升到了您帮派的调停者。'
|
||||
PROMOTED: <i>您提拔了 %1$s<i> 至调停者。
|
||||
MODIFYPOWER:
|
||||
ADDED: '<i>添加了 <a>%1$f <i>影响力至 <a>%2$s。<i>四舍五入后的现影响力为:<a>%3$d'
|
||||
MONEY:
|
||||
SHORT: 帮派金钱命令
|
||||
LONG: <i>帮派金钱指令。
|
||||
MONEYBALANCE:
|
||||
SHORT: 显示帮派余额
|
||||
MONEYDEPOSIT:
|
||||
SHORT: 储蓄钱款
|
||||
DEPOSITED: '%1$s 储蓄了 %2$s 进帮派银行:%3$s'
|
||||
MONEYTRANSFERFF:
|
||||
SHORT: 转账帮派 -> 帮派
|
||||
TRANSFER: '%1$s 从帮派 "%3$s" 转账了 %2$s 至帮派 "%4$s"'
|
||||
MONEYTRANSFERFP:
|
||||
SHORT: 转账帮派 -> 插件
|
||||
TRANSFER: '%1$s 从帮派 "%3$s" 转账了 %2$s 至玩家 "%4$s"'
|
||||
MONEYTRANSFERPF:
|
||||
SHORT: 转账插件 -> 帮派
|
||||
TRANSFER: '%1$s 从玩家 "%3$s" 转账了 %2$s 至帮派 "%4$s"'
|
||||
MONEYWITHDRAW:
|
||||
SHORT: 取出钱款
|
||||
WITHDRAW: '%1$s 从帮派银行 %3$s 中取出了 %2$s'
|
||||
OPEN:
|
||||
TOOPEN: 来开放或关闭帮派
|
||||
FOROPEN: 要开放或关闭帮派
|
||||
OPEN: 开放
|
||||
CLOSED: 关闭
|
||||
CHANGES: '%1$s<i> 更改了帮派至<h>%2$s<i>.'
|
||||
CHANGED: <i>帮派 %1$s<i> 现已%2$s
|
||||
OWNER:
|
||||
DISABLED: <b>很抱歉,但服务器禁用了占有区域。
|
||||
LIMIT: <b>很抱歉,但您超过了服务器每个帮派<h>最多 %1$d <b>块占有区域的限制。
|
||||
WRONGFACTION: <b>此地块尚未被您的帮派宣称,故您不可以设置它的主权。
|
||||
NOTCLAIMED: <b>此地块尚未被任何帮派宣称,主权不可用。
|
||||
NOTMEMBER: '%1$s<i> 不是此帮派的一员。'
|
||||
CLEARED: <i>您已清除此宣称区域的主权。
|
||||
REMOVED: <i>您已从 %1$s 清除此宣称地皮的主权<i>。
|
||||
TOSET: 来设置宣称地皮的主权
|
||||
FORSET: 要设置宣称地皮的主权
|
||||
ADDED: <i>您已添加 %1$s<i> 至此宣称地皮的所有者列表。
|
||||
OWNERLIST:
|
||||
DISABLED: <b>很抱歉,但服务器禁用了占有区域。
|
||||
WRONGFACTION: <b>此地块尚未被您的帮派宣称。
|
||||
NOTCLAIMED: <i>此地块尚未被任何的帮派宣称,因此虚位以待。
|
||||
NONE: <i>这里尚未设置所有者:帮派里的所有人均可访问。
|
||||
OWNERS: '<i>当前此地块的所有者:%1$s'
|
||||
POWER:
|
||||
TOSHOW: 来显示玩家影响力信息
|
||||
FORSHOW: 要显示玩家影响力信息
|
||||
POWER: '%1$s<a> - 影响力 / 最大影响力:<i>%2$d / %3$d %4$s'
|
||||
BONUS: ' (奖励:'
|
||||
PENALTY: ' (惩罚:'
|
||||
POWERBOOST:
|
||||
HELP:
|
||||
'1': <b>您必须指定插件 "plugin" 或玩家 "player" 来指定玩家或使用 "f" 或 "faction" 来指定帮派。
|
||||
'2': <b>示例:/f powerboost plugin 玩家 0.5 -或- /f powerboost f 帮派 -5
|
||||
INVALIDNUM: <b>您必须为影响力奖惩值指定有效的数值。
|
||||
PLAYER: 玩家 "%1$s"
|
||||
FACTION: 帮派 "%1$s"
|
||||
BOOST: <i>%1$s 的最低/最高影响力级别现有 %2$d 的奖惩。
|
||||
BOOSTLOG: '%1$s 为 %2$s 设置影响力奖惩值至 %3$d。'
|
||||
RELOAD:
|
||||
TIME: <i>已从磁盘重载 <h>conf.json <i>,共花费 <h>%1$d ms<i>。
|
||||
SAFEUNCLAIMALL:
|
||||
SHORT: 取消宣称使用安全区地块
|
||||
UNCLAIMED: <i>您已取消宣称使用安全区地块。
|
||||
UNCLAIMEDLOG: '%1$s 已取消宣称使用安全区地块。'
|
||||
SAVEALL: <i>帮派信息已保存至磁盘!
|
||||
SETFWARP:
|
||||
NOTCLAIMED: <i>您仅可在您的帮派区域里设置传送点。
|
||||
LIMIT: <i>您的帮派已达到了最多传送点的数量限制 <a>(%1$d)。
|
||||
SET: <i>已设置传送点 <a>%1$s <i>至您的位置。
|
||||
TOSET: 来设置传送点
|
||||
FORSET: 要设置传送点
|
||||
SETHOME:
|
||||
DISABLED: <b>很抱歉,此服务器上禁用了帮派家功能。
|
||||
NOTCLAIMED: <b>很抱歉,帮派家仅能设置在您的宣称领土内。
|
||||
TOSET: 来设置帮派家
|
||||
FORSET: 要设置帮派家
|
||||
SET: '%1$s<i> 为您的帮派设置了帮派家。您现在可使用:'
|
||||
SETOTHER: <b>您已为帮派 %1$s<i> 设置了家。
|
||||
SHOW:
|
||||
NOFACTION:
|
||||
SELF: 您不在帮派里。
|
||||
OTHER: 这不是帮派。
|
||||
TOSHOW: 来显示帮派信息
|
||||
FORSHOW: 要显示帮派信息
|
||||
DESCRIPTION: '<a>描述:<i>%1$s'
|
||||
PEACEFUL: 此帮派处于和平状态
|
||||
PERMANENT: <a>此帮派被标记为永久,即使无成员也依然存在。
|
||||
JOINING: '<a>正在加入:<i>%1$s '
|
||||
INVITATION: 需要邀请
|
||||
UNINVITED: 无需邀请
|
||||
POWER: '<a>地块 / 影响力 / 最大影响力:<i> %1$d/%2$d/%3$d %4$s'
|
||||
BONUS: ' (奖励:'
|
||||
PENALTY: ' (惩罚:'
|
||||
DEPRECIATED: (%1$s 已弃用)
|
||||
LANDVALUE: '<a>总地块价值:<i>%1$s %2$s'
|
||||
BANKCONTAINS: '<a>银行内有:<i>%1$s'
|
||||
ALLIES: '盟友:'
|
||||
ENEMIES: '敌人:'
|
||||
MEMBERSONLINE: '在线成员:'
|
||||
MEMBERSOFFLINE: '离线成员:'
|
||||
SHOWINVITES:
|
||||
PENDING: '等待接受邀请的玩家:'
|
||||
CLICKTOREVOKE: 点击撤回 %1$s 的邀请。
|
||||
STATUS:
|
||||
FORMAT: '%1$s 影响力:%2$s 上次在线:%3$s'
|
||||
ONLINE: 在线
|
||||
AGOSUFFIX: ' 前。'
|
||||
TAG:
|
||||
TAKEN: <b>此标签已被使用
|
||||
TOCHANGE: 来更改帮派标签
|
||||
FORCHANGE: 要更改帮派标签
|
||||
FACTION: '%1$s<i> 更改了您帮派标签至 %2$s'
|
||||
CHANGED: <i>帮派 %1$s<i> 更改了其名称至 %2$s。
|
||||
TITLE:
|
||||
TOCHANGE: 来更改玩家头衔
|
||||
FORCHANGE: 要更改玩家头衔
|
||||
CHANGED: '%1$s<i> 更改了头衔:%2$s'
|
||||
UNCLAIM:
|
||||
SAFEZONE:
|
||||
SUCCESS: <i>已取消宣称安全区。
|
||||
NOPERM: <b>这里是安全区,您缺少宣称权限。
|
||||
WARZONE:
|
||||
SUCCESS: <i>已取消宣称战区。
|
||||
NOPERM: <b>这里是战区,您缺少宣称权限。
|
||||
UNCLAIMED: '%1$s<i> 取消宣称了您的部分领土。'
|
||||
UNCLAIMS: <i>您取消宣称了此领土。
|
||||
LOG: '%1$s 从帮派 %3$s 取消宣称了在 (%2$s) 处的领土'
|
||||
WRONGFACTION: <b>您未拥有此领土。
|
||||
TOUNCLAIM: 来取消宣称此领土
|
||||
FORUNCLAIM: 要取消宣称此领土
|
||||
FACTIONUNCLAIMED: '%1$s<i> 取消宣称了部分领土。'
|
||||
UNCLAIMALL:
|
||||
TOUNCLAIM: 来取消宣称所有帮派领土
|
||||
FORUNCLAIM: 要取消宣称所有帮派领土
|
||||
UNCLAIMED: '%1$s<i> 取消宣称了您所有的帮派领土。'
|
||||
LOG: '%1$s 为 %2$s 取消宣称了所有的帮派领土'
|
||||
VERSION:
|
||||
VERSION: <i>您正运行 %1$s
|
||||
WARUNCLAIMALL:
|
||||
SHORT: 取消宣称所有战区领土
|
||||
SUCCESS: <i>您取消宣称了所有战区领土。
|
||||
LOG: '%1$s 取消宣称了所有战区领土。'
|
||||
RELATIONS:
|
||||
ALLTHENOPE: <b>并不可以哦!
|
||||
MORENOPE: <b>不行哦!您不可对您自己改变关系 :)
|
||||
ALREADYINRELATIONSHIP: <b>您已为 %1$s 设置了相同的关系意愿。
|
||||
TOMARRY: 来改变关系意愿
|
||||
FORMARRY: 要改变关系意愿
|
||||
MUTUAL: <i>您的帮派现已 %1$s<i> 至 %2$s
|
||||
PEACEFUL: <i>在您帮派处于和平状态时,这将毫无作用。
|
||||
PEACEFULOTHER: <i>在对方帮派处于和平状态时,这将毫无作用。
|
||||
PROPOSAL:
|
||||
'1': '%1$s<i> 想成为您的 %2$s'
|
||||
'2': <i>键入 <c>/%1$s %2$s %3$s<i> 来同意。
|
||||
SENT: '%1$s<i> 已悉知您想成为 %2$s 的意愿'
|
||||
command:
|
||||
convert:
|
||||
backend:
|
||||
running: 已正在运行此后端。
|
||||
invalid: 无效后端
|
||||
help:
|
||||
invitations: '<i>您可能想要关闭并使用邀请:'
|
||||
LEAVE:
|
||||
PASSADMIN: <b>您必须现将管理员角色转给他人。
|
||||
NEGATIVEPOWER: <b>您不可在影响力为正时离开帮派。
|
||||
TOLEAVE: 来离开您的帮派
|
||||
FORLEAVE: 要离开您的帮派
|
||||
LEFT: '%s<i> 离开了帮派 %s<i>。'
|
||||
DISBANDED: <i>%s<i> 被解散了。
|
||||
DISBANDEDLOG: 由于帮派 %s (%s) 的最后一名玩家 (%s) 也已离开,其已被解散。
|
||||
CLAIM:
|
||||
PROTECTED: <b>此地块已被保护
|
||||
DISABLED: <b>很抱歉,此世界禁用了领土宣称功能。
|
||||
CANTCLAIM: <b>您不能为 <h>%s<b> 宣称领土。
|
||||
ALREADYOWN: '%s<i> 已拥有此地块。'
|
||||
MUSTBE: <b>您必须为 <h>%s<b> 才能宣称领土。
|
||||
MEMBERS: 帮派必须有至少 <h>%s<b> 名成员才能宣称领土。
|
||||
SAFEZONE: <b>您不能宣称安全区。
|
||||
WARZONE: <b>您不能宣称战区。
|
||||
POWER: <b>您不能宣称更多领土!您需要更多影响力!
|
||||
LIMIT: <b>已达到限制。您不可宣称更多领土!
|
||||
ALLY: <b>您无法宣称您盟友的领土。
|
||||
CONTIGIOUS: <b>您仅可宣称连到您首块宣称领土或被其他帮派控制的领土的地块!
|
||||
FACTIONCONTIGUOUS: <b>您仅可宣称连到您首块宣称领土的地块!
|
||||
PEACEFUL: '%s<i> 拥有此领土。您的帮派处于和平状态,故您不可以宣称来自其他帮派的领土。'
|
||||
PEACEFULTARGET: '%s<i> 拥有此领土,且其处于和平状态,故您不可以宣称来自他们的领土。'
|
||||
THISISSPARTA: '%s<i> 拥有此领土,且强大到足以保持此领地。'
|
||||
BORDER: <b>您必须在领地边境才能开始宣称领土。
|
||||
TOCLAIM: 来宣称此领土
|
||||
FORCLAIM: 要宣称此领土
|
||||
CLAIMED: <h>%s<i> 为 <h>%s<i> 宣称了来自 <h>%s<i> 的领土。
|
||||
CLAIMEDLOG: '%s 在 (%s) 处为帮派 %s 宣称了领土'
|
||||
GENERIC:
|
||||
NOPERMISSION: <b>您没有 %1$s 的权限。
|
||||
DOTHAT: 进行此操作
|
||||
NOPLAYERMATCH: <b>未找到匹配 "<plugin>%1$s<b>" 的玩家。
|
||||
NOPLAYERFOUND: <b>无法找到玩家 "<plugin>%1$s<b>"。
|
||||
ARGS:
|
||||
TOOFEW: '<b>参数过少。<i>示例用法:'
|
||||
TOOMANY: '<b>未知参数 "<plugin>%1$s<b>"。<i>示例用法:'
|
||||
OWNERS: '所有者:%1$s'
|
||||
PUBLICLAND: 公共帮派领土。
|
||||
FACTIONLESS: 无帮派
|
||||
SERVERADMIN: 服务器管理员
|
||||
DISABLED: 已禁用
|
||||
ENABLED: 已启用
|
||||
CONSOLEONLY: 此命令无法作为玩家运行。
|
||||
PLAYERONLY: <b>此命令只可被游戏内玩家运行。
|
||||
ASKYOURLEADER: '<i> 询问您的领袖来:'
|
||||
YOUSHOULD: '<i>您应:'
|
||||
YOUMAYWANT: '<i>您可能想要:'
|
||||
TRANSLATION:
|
||||
VERSION: '翻译:%1$s(%2$s,%3$s) 状态:%4$s'
|
||||
CONTRIBUTORS: '翻译贡献者:%1$s'
|
||||
RESPONSIBLE: '翻译负责人:%1$s'
|
||||
FACTIONTAG:
|
||||
TOOSHORT: <i>帮派标签不可少于 <h>%1$s<i> 个字符。
|
||||
TOOLONG: <i>帮派标签不可长于 <h>%s<i> 个字符。
|
||||
ALPHANUMERIC: <i>帮派标签必须为英文字母,"<h>%s<i>" 不被允许。
|
||||
COMPASS:
|
||||
SHORT:
|
||||
NORTH: 北
|
||||
EAST: 东
|
||||
SOUTH: 南
|
||||
WEST: 西
|
||||
ACTIONS:
|
||||
NOPERMISSION: '<b>{faction} 不允许您 {action}</b>'
|
||||
NOPERMISSIONPAINFUL: '<b>在 {faction} 的领土上尝试 {action} 是徒劳的</b>'
|
||||
OWNEDTERRITORYDENY: <b>您不可在此领土进行此操作,其被 {owners} 所拥有</b>
|
||||
OWNEDTERRITORYPAINDENY: <b>在 {owners} 的领土上尝试 {action} 是徒劳的</b>
|
||||
MUSTBE: '<b>您</b><h>必须为 {role}</h><b>才能 {action}。</b>'
|
||||
NOSAMEROLE: <b>{role} 无法控制相同等级的成员...</b>
|
||||
NOFACTION: '您不是任何帮派的成员。'
|
||||
CHAT:
|
||||
FACTION: 帮派聊天
|
||||
ALLIANCE: 盟友聊天
|
||||
PUBLIC: 公共聊天
|
||||
RELATION:
|
||||
MEMBER: 成员
|
||||
ALLY: 盟友
|
||||
NEUTRAL: 中立
|
||||
ENEMY: 敌人
|
||||
NOPAGES: <i>很抱歉,无页面可用。
|
||||
INVALIDPAGE: <i>无效页面,页面数必须介于 1 与 %1$d 之间。
|
||||
title: '&b帮派 &0|&r'
|
||||
wilderness: '&2荒野'
|
||||
wilderness-description: ''
|
||||
warzone: '&4战区'
|
||||
warzone-description: 估计不是最安全的地方。
|
||||
safezone: '&6安全区'
|
||||
safezone-description: 远离 PVP 及怪物。
|
||||
toggle-sb: 您已设置计分板至 {value}
|
||||
default-prefix: '{relationcolor}[{faction}] &r'
|
||||
faction-login: '&e%1$s &9已登录。'
|
||||
faction-logout: '&e%1$s &9已登出。'
|
||||
WARMUPS:
|
||||
NOTIFY:
|
||||
TELEPORT: '&e您将于 &d%2$d &e秒内传送至 &d%1$s &e。'
|
||||
ALREADY: '&c您已在准备传送。'
|
||||
CANCELLED: '&c您已取消了准备传送。'
|
||||
Reference in New Issue
Block a user