blocksMined ) {
-// this.blocksMined = blocksMined;
-// }
+
+
+ /**
+ * This constructs a player file named based upon the UUID followed
+ * by the player's name. This format is used so it's easier to identify
+ * the correct player.
+ *
+ *
+ * The format should be UUID-PlayerName.json. The UUID is a shortened
+ * format, which should still produce a unique id. The name, when read,
+ * is based upon the UUID and not the player's name, which may change.
+ * This format includes the player's name to make it easier to identify
+ * who's record is whom's.
+ *
+ *
+ * @return
+ */
+ public String getPlayerFileName() {
+
+ return filenamePlayer();
+ }
+
+
+ public File getFilePlayer() {
+ if ( filePlayer == null ) {
+ filePlayer = JsonFileIO.filePlayer( this );;
+ }
+ return filePlayer;
+ }
+ public void setFilePlayer(File filePlayer) {
+ this.filePlayer = filePlayer;
+ }
+
+ public File getFileCache() {
+ if ( fileCache == null ) {
+ fileCache = JsonFileIO.fileCache( this );
+ }
+ return fileCache;
+ }
+ public void setFileCache(File fileCache) {
+ this.fileCache = fileCache;
+ }
/**
* This is a helper function to ensure that the given file name is
@@ -364,50 +439,16 @@ public void setNames( List names ) {
*
* @return "player_" plus the least significant bits of the UID
*/
- public String filename()
+ public String filenamePlayer()
{
- return "player_" + uid.getLeastSignificantBits();
+ return getFilePlayer().getName();
}
+ public String filenameCache()
+ {
+ return getFileCache().getName();
+ }
-// /**
-// * This function will check to see if the player is on the default rank on
-// * the default ladder. If not, then it will add them.
-// *
-// *
-// * This is safe to run on anyone, even if they already are on the default ladder.
-// *
-// *
-// * Note, this will not save the player's new rank. The save function must be
-// * managed and called outside of this.
-// *
-// */
-// public void firstJoin() {
-//
-// RankLadder defaultLadder = PrisonRanks.getInstance().getDefaultLadder();
-//
-// if ( !getLadderRanks().containsKey( defaultLadder ) ) {
-//
-// Optional firstRank = defaultLadder.getLowestRank();
-//
-// if ( firstRank.isPresent() ) {
-// Rank rank = firstRank.get();
-//
-// addRank( rank );
-//
-// Prison.get().getEventBus().post(new FirstJoinEvent( this ));
-//
-// FirstJoinHandlerMessages messages = new FirstJoinHandlerMessages();
-// Output.get().logWarn( messages.firstJoinSuccess( getName() ) );
-//
-// } else {
-//
-// FirstJoinHandlerMessages messages = new FirstJoinHandlerMessages();
-// Output.get().logWarn( messages.firstJoinWarningNoRanksOnServer() );
-// }
-// }
-//
-// }
/**
* Add a rank to this player.
@@ -418,7 +459,7 @@ public String filename()
*/
public void addRank( Rank rank) {
if ( rank.getLadder() == null ) {
- throw new IllegalArgumentException("Rank must be on ladder.");
+ throw new IllegalArgumentException("Rank must be on ladder.");
}
String ladderName = rank.getLadder().getName();
@@ -430,11 +471,11 @@ public void addRank( Rank rank) {
if ( ladderRanks.containsKey( rank.getLadder() ) ) {
- // Remove the player from the old rank:
- PlayerRank oldRank = ladderRanks.get( rank.getLadder() );
- oldRank.getRank().getPlayers().remove( this );
-
- ladderRanks.remove( rank.getLadder() );
+ // Remove the player from the old rank:
+ PlayerRank oldRank = ladderRanks.get( rank.getLadder() );
+ oldRank.getRank().getPlayers().remove( this );
+
+ ladderRanks.remove( rank.getLadder() );
}
ranksRefs.put(ladderName, rank.getId());
@@ -460,9 +501,9 @@ public void addRank( Rank rank) {
* @return
*/
public PlayerRank createPlayerRank( Rank rank ) {
- PlayerRank pRank = new PlayerRank( rank, 1.0 );
-
- return pRank;
+ PlayerRank pRank = new PlayerRank( rank, 1.0 );
+
+ return pRank;
}
/**
@@ -474,7 +515,7 @@ public PlayerRank createPlayerRank( Rank rank ) {
*/
public void recalculateRankMultipliers() {
- recalculateRankMultipliers( getLadderRanks() );
+ recalculateRankMultipliers( getLadderRanks() );
}
@@ -492,25 +533,24 @@ public void recalculateRankMultipliers() {
*/
public void recalculateRankMultipliers(
TreeMap targetLadderRanks ) {
- double multiplier = 0;
-
- // First gather and calculate the multipliers:
- Set keys = targetLadderRanks.keySet();
- for ( RankLadder rankLadder : keys )
- {
- PlayerRank pRank = targetLadderRanks.get( rankLadder );
-
- double rankMultiplier = pRank.getLadderBasedRankMultiplier();
- multiplier += rankMultiplier;
+ double multiplier = 0;
+
+ // First gather and calculate the multipliers:
+ Set keys = targetLadderRanks.keySet();
+ for ( RankLadder rankLadder : keys )
+ {
+ PlayerRank pRank = targetLadderRanks.get( rankLadder );
+
+ double rankMultiplier = pRank.getLadderBasedRankMultiplier();
+ multiplier += rankMultiplier;
}
-
- // We now have the multipliers, so apply them to all ranks:
- for ( RankLadder rankLadder : keys )
- {
- PlayerRank pRank = targetLadderRanks.get( rankLadder );
-
- pRank.applyMultiplier( multiplier );
-// pRank.setRankCost( pRank.getRank().getCost() * (1.0 + multiplier) );
+
+ // We now have the multipliers, so apply them to all ranks:
+ for ( RankLadder rankLadder : keys )
+ {
+ PlayerRank pRank = targetLadderRanks.get( rankLadder );
+
+ pRank.applyMultiplier( multiplier );
}
}
@@ -528,43 +568,43 @@ public void recalculateRankMultipliers(
* @return
*/
public PlayerRank calculateTargetPlayerRank( Rank targetRank ) {
- PlayerRank targetPlayerRank = null;
-
- // Can only process if the target rank is not null and it has a ladder:
- if ( targetRank != null && targetRank.getLadder() != null ) {
-
- // Need to get the targetRank's ladder. Not all ranks have ladders.
- RankLadder targetLadder = targetRank.getLadder();
-
- // Create a new PlayerRank object for this target rank.
- // Ignore rank cost multipliers since that will be applied later.
- targetPlayerRank = new PlayerRank( targetRank );
-
- // Create a new temp targetLadderRanks TreeMap:
- TreeMap targetLadderRanks = new TreeMap<>();
-
- // Copy the player's actual ladderRanks to the targetLadderRanks:
- Set keys = getLadderRanks().keySet();
- for (RankLadder key : keys) {
- PlayerRank pRank = getLadderRanks().get( key );
-
- targetLadderRanks.put( key, pRank );
- }
-
- // Now add our targetPlayerRank to the targetLadderRanks:
- targetLadderRanks.put( targetLadder, targetPlayerRank );
-
-
- // Now recalculate all multipliers and the rank costs for the targetPlayerRank:
- recalculateRankMultipliers( targetLadderRanks );
-
- }
-
- // The targetPlayerRank now has the correct total multiplier from all
- // ladders, and it's Rank Cost is based upon those multipliers and if
- // the ladder should apply the multipliers or not:
-
- return targetPlayerRank;
+ PlayerRank targetPlayerRank = null;
+
+ // Can only process if the target rank is not null and it has a ladder:
+ if ( targetRank != null && targetRank.getLadder() != null ) {
+
+ // Need to get the targetRank's ladder. Not all ranks have ladders.
+ RankLadder targetLadder = targetRank.getLadder();
+
+ // Create a new PlayerRank object for this target rank.
+ // Ignore rank cost multipliers since that will be applied later.
+ targetPlayerRank = new PlayerRank( targetRank );
+
+ // Create a new temp targetLadderRanks TreeMap:
+ TreeMap targetLadderRanks = new TreeMap<>();
+
+ // Copy the player's actual ladderRanks to the targetLadderRanks:
+ Set keys = getLadderRanks().keySet();
+ for (RankLadder key : keys) {
+ PlayerRank pRank = getLadderRanks().get( key );
+
+ targetLadderRanks.put( key, pRank );
+ }
+
+ // Now add our targetPlayerRank to the targetLadderRanks:
+ targetLadderRanks.put( targetLadder, targetPlayerRank );
+
+
+ // Now recalculate all multipliers and the rank costs for the targetPlayerRank:
+ recalculateRankMultipliers( targetLadderRanks );
+
+ }
+
+ // The targetPlayerRank now has the correct total multiplier from all
+ // ladders, and it's Rank Cost is based upon those multipliers and if
+ // the ladder should apply the multipliers or not:
+
+ return targetPlayerRank;
}
/**
@@ -574,156 +614,41 @@ public PlayerRank calculateTargetPlayerRank( Rank targetRank ) {
* @param rank The The {@link Rank} to remove.
*/
public void removeRank(Rank rank) {
-
- if ( rank != null && rank.getLadder() != null ) {
-
- ladderRanks.remove( rank.getLadder() );
-
- ranksRefs.remove( rank.getLadder().getName() );
- }
+
+ if ( rank != null && rank.getLadder() != null ) {
+
+ ladderRanks.remove( rank.getLadder() );
+
+ ranksRefs.remove( rank.getLadder().getName() );
+ }
-// // When we loop through, we have to store our ladder name outside the loop to
-// // avoid a concurrent modification exception. So, we'll retrieve the data we need...
-// String ladderName = null;
-// for (Map.Entry rankEntry : ranksRefs.entrySet()) {
-// if (rankEntry.getValue() == rank.getId()) { // This is our rank!
-// ladderName = rankEntry.getKey();
-// }
-// }
-//
-// // ... and then remove it!
-// ranksRefs.remove(ladderName);
-//
-// ladderRanks.remove( rank.getLadder() );
}
public boolean hasLadder( String ladderName ) {
- return ranksRefs.containsKey( ladderName );
+ boolean results = false;
+
+ Set ladders = getLadderRanks().keySet();
+
+ for (RankLadder ladder : ladders) {
+ if ( ladderName != null && ladder.getName().equalsIgnoreCase(ladderName) ) {
+ results = true;
+ break;
+ }
+ }
+
+ return results;
}
-// /**
-// * Removes a ladder from this player, including whichever rank this player had in it.
-// * Cannot remove the default ladder.
-// *
-// * @param ladderName The ladder's name.
-// */
-// public boolean removeLadder(String ladderName) {
-// boolean results = false;
-// if ( !ladderName.equalsIgnoreCase("default") ) {
-// Integer id = ranksRefs.remove(ladderName);
-// results = (id != null);
-//
-// RankLadder ladder = PrisonRanks.getInstance().getLadderManager().getLadder( ladderName );
-// if ( ladder != null && !ladder.getName().equalsIgnoreCase( "default" ) ) {
-// ladderRanks.remove( ladder );
-// }
-// }
-//
-// return results;
-// }
-
-// /**
-// * Retrieves the rank that this player has in a certain ladder, if any.
-// *
-// * @param ladder The ladder to check.
-// * @return An optional containing the {@link Rank} if found, or empty if there isn't a rank by that ladder for this player.
-// */
-// public PlayerRank getRank(RankLadder ladder) {
-// PlayerRank results = null;
-//
-// if ( ladder != null ) {
-//
-// Set keys = ladderRanks.keySet();
-// for ( RankLadder key : keys )
-// {
-// if ( key != null && key.getName().equalsIgnoreCase( ladder.getName() ) ) {
-// results = ladderRanks.get( key );
-// }
-// }
-// }
-//
-// return results;
-//
-//// if (!ranksRefs.containsKey(ladder.getName())) {
-//// return null;
-//// }
-//// int id = ranksRefs.get(ladder.getName());
-//// return PrisonRanks.getInstance().getRankManager().getRank(id);
-// }
-//
-// /**
-// * Retrieves the rank that this player has the specified ladder.
-// *
-// * @param ladder The ladder name to check.
-// * @return The {@link Rank} if found, otherwise null;
-// */
-// public PlayerRank getRank( String ladderName ) {
-//
-// RankLadder ladder = PrisonRanks.getInstance().getLadderManager().getLadder( ladderName );
-// return getRank( ladder );
-//
-//// Rank results = null;
-//// if (ladder != null && ranksRefs.containsKey(ladder)) {
-//// int id = ranksRefs.get(ladder);
-//// results = PrisonRanks.getInstance().getRankManager().getRank(id);
-//// }
-//// return results;
-// }
-
-
-// public HashMap getPrestige() {
-// return prestige;
-// }
-// public void setPrestige( HashMap prestige ) {
-// this.prestige = prestige;
-// }
public void setRanks( HashMap ranks ) {
this.ranksRefs = ranks;
}
-// /**
-// * Returns all ladders this player is a part of, along with each rank the player has in that ladder.
-// *
-// * @return The map containing this data.
-// */
-// public Map getLadderRanks( RankPlayer rankPlay) {
-//
-// if ( ladderRanks.isEmpty() && !ranksRefs.isEmpty() ) {
-//
-// //Map ret = new HashMap<>();
-//
-// for (Map.Entry entry : rankPlay.getRanksRefs().entrySet()) {
-// RankLadder ladder = PrisonRanks.getInstance().getLadderManager().getLadder(entry.getKey());
-//
-// if ( ladder == null ) {
-// continue; // Skip it
-// }
-//
-// Rank rank = PrisonRanks.getInstance().getRankManager().getRank(entry.getValue());
-// if ( rank == null ) {
-// continue; // Skip it
-// }
-//
-// PlayerRank pRank = new PlayerRank( rank );
-//
-// ladderRanks.put(ladder, pRank);
-// }
-//
-// // Need to recalculate all rank multipliers:
-// recalculateRankMultipliers();
-// }
-//
-// return ladderRanks;
-// }
public TreeMap getLadderRanks() {
return ladderRanks;
}
-// public void setLadderRanks( TreeMap ladderRanks ) {
-// this.ladderRanks = ladderRanks;
-// }
private RankLadder getRankLadder( String ladderName ) {
RankLadder results = null;
@@ -827,45 +752,41 @@ public void setRanksRefs( HashMap ranksRefs ) {
* @return
*/
public boolean hasAccessToRank( Rank targetRank ) {
- boolean hasAccess = false;
-
- if ( targetRank != null && targetRank.getLadder() != null ) {
-
- PlayerRank pRank = getLadderRanks().get( targetRank.getLadder() );
-
-// PlayerRank pRank = getRank( targetRank.getLadder() );
- if ( pRank != null ) {
-
- Rank rank = pRank.getRank();
- if ( rank != null &&
- rank.getLadder().equals( targetRank.getLadder() ) ) {
-
- hasAccess = rank.equals( targetRank );
-
- // If access-to-prior-mines is enabled (defaults to true if does not exist),
- // then search prior ranks on this ladder until a match with target is found.
- if ( Prison.get().getPlatform()
- .getConfigBooleanTrue( "prison-mines.access-to-prior-mines" ) ) {
-
- Rank priorRank = rank.getRankPrior();
-
- while ( !hasAccess && priorRank != null ) {
-
- hasAccess = priorRank.equals( targetRank );
- priorRank = priorRank.getRankPrior();
- }
- }
-
- }
- }
- }
- return hasAccess;
+ boolean hasAccess = false;
+
+ if ( targetRank != null && targetRank.getLadder() != null ) {
+
+ PlayerRank pRank = getLadderRanks().get( targetRank.getLadder() );
+
+ if ( pRank != null ) {
+
+ Rank rank = pRank.getRank();
+ if ( rank != null &&
+ rank.getLadder().equals( targetRank.getLadder() ) ) {
+
+ hasAccess = rank.equals( targetRank );
+
+ // If access-to-prior-mines is enabled (defaults to true if does not exist),
+ // then search prior ranks on this ladder until a match with target is found.
+ if ( !hasAccess && Prison.get().getPlatform()
+ .getConfigBooleanTrue( "prison-mines.access-to-prior-mines" ) ) {
+
+ Rank priorRank = rank.getRankPrior();
+
+ while ( !hasAccess && priorRank != null ) {
+
+ hasAccess = priorRank.equals( targetRank );
+ priorRank = priorRank.getRankPrior();
+ }
+ }
+
+ }
+ }
+ }
+ return hasAccess;
}
- /*
- * equals() and hashCode()
- */
@Override
public boolean equals(Object o) {
@@ -959,8 +880,9 @@ public List getLineOfSightBlocks() {
@Override
- public void teleport( Location location ) {
+ public boolean teleport( Location location ) {
// Output.get().logError( "RankPlayer.teleport: Offline players cannot be teleported." );
+ return false;
}
@Override
@@ -999,8 +921,8 @@ public boolean isOp() {
*/
@Override
public boolean isPlayer() {
- Player player = getPlatformPlayer();
- return (player != null ? player.isPlayer() : false );
+ Player player = getPlatformPlayer();
+ return (player != null ? player.isPlayer() : false );
}
@@ -1026,23 +948,36 @@ public Inventory getInventory() {
return results;
}
-// @Override
-// public void printDebugInventoryInformationToConsole() {
-//
-// }
+ /**
+ * This function will use the platform to get the platform player, which is tied to the
+ * platform's player object. So on Spigot, the platformPlayer will be a SpigotPlayer object,
+ * with this instance of RankPlayer attached to it.
+ *
+ *
+ * Every five minutes, this function will refresh the platformPlayer since the instances
+ * may actually change, such as if the player logged off and back on quickly. It's never
+ * good to have a stale player object because then the wrong inventory gets updated. But
+ * at least if that ever happens, then this will 'fix it', at worse, in 5 minutes.
+ * Getting the platform player is expensive, so we do need to cache it.
+ *
+ *
+ */
@Override
public Player getPlatformPlayer() {
- Player player = null;
- Optional oPlayer = Prison.get().getPlatform().getPlayer( uid );
+ long now = System.currentTimeMillis();
+ long fiveMin = 1000 * 60* 5;
- if ( oPlayer.isPresent() ) {
- player = oPlayer.get();
+ if ( platformPlayer == null || platformPlayerTimestamp + fiveMin < now ) {
+
+ platformPlayer = Prison.get().getPlatform().getPlatformPlayer( this );
+
+ platformPlayerTimestamp = now;
}
- return player;
+ return platformPlayer;
}
@@ -1061,25 +996,38 @@ public void recalculatePermissions() {
@Override
public List getPermissions() {
- Player player = getPlatformPlayer();
- return (player == null ? new ArrayList<>() : player.getPermissions() );
+ Player player = getPlatformPlayer();
+ return (player == null ? new ArrayList<>() : player.getPermissions() );
}
@Override
public List getPermissions( String prefix ) {
- Player player = getPlatformPlayer();
- return (player == null ? new ArrayList<>() : player.getPermissions( prefix ) );
+
+ return getPermissions( prefix, getPermissions() );
}
+ @Override
+ public List getPermissions( String prefix, List perms ) {
+ Player player = getPlatformPlayer();
+ return (player == null ? new ArrayList<>() :
+ player.getPermissions( prefix, perms ) );
-
+ }
/**
* This will called by the placeholders, so need to get the actual
* multipliers that exists in the SpigotPlayer object.
*
*
- * If the player is offline, then just set to a value of 1.0 so as
+ *
If the player is offline, then it will try to use the
+ * getSellallMultiplierValue() which may not be their current
+ * sellallMulitiplier, but it's the value when they were last
+ * online and when it was updated and saved within their
+ * RankPlayer object.
+ *
+ *
+ * Otherwise, if the player is offline, then
+ * just set to a value of 1.0 so as
* not to change any other value that may be used with this function.
* If the player is offline, then there will be no inventory that can be
* accessed and hence, none to sell, so a value of 1.0 should be fine.
@@ -1088,20 +1036,36 @@ public List getPermissions( String prefix ) {
*/
@Override
public double getSellAllMultiplier() {
- double results = 1.0;
-
- Player player = getPlatformPlayer();
- if ( player != null ) {
- results = player.getSellAllMultiplier();
- }
-//
-// Optional player = Prison.get().getPlatform().getPlayer( uid );
-//
-// if ( player.isPresent() ) {
-// results = player.get().getSellAllMultiplier();
-// }
-
- return results;
+ double results = 1.0;
+
+ Player player = getPlatformPlayer();
+ if ( player != null ) {
+ results = player.getSellAllMultiplier();
+
+ if ( results != getSellallMultiplierValue() ) {
+
+ setSellallMultiplierValue( results );
+ setDirty( true );
+ }
+ }
+ else {
+ results = getSellallMultiplierValue();
+ }
+
+ return results;
+ }
+
+ @Override
+ public double getSellAllMultiplierDebug() {
+ double results = 1.0;
+
+ Player player = getPlatformPlayer();
+ if ( player != null ) {
+ results = player.getSellAllMultiplierDebug();
+
+ }
+
+ return results;
}
@@ -1116,22 +1080,22 @@ public void setPlayerBalances( TreeMap playerBalances
private void addCachedRankPlayerBalance( String currency, double amount ) {
- // Since the cache will be updated, do not allow it fetch the player's balance:
- RankPlayerBalance balance = getCachedRankPlayerBalance( currency, false );
-
- balance.addBalance( amount );
+ // Since the cache will be updated, do not allow it fetch the player's balance:
+ RankPlayerBalance balance = getCachedRankPlayerBalance( currency, false );
+
+ balance.addBalance( amount );
}
private void setCachedRankPlayerBalance( String currency, double amount ) {
- // Since the cache will be updated, do not allow it fetch the player's balance:
- RankPlayerBalance balance = getCachedRankPlayerBalance( currency, false );
-
- balance.setBalance( amount );
+ // Since the cache will be updated, do not allow it fetch the player's balance:
+ RankPlayerBalance balance = getCachedRankPlayerBalance( currency, false );
+
+ balance.setBalance( amount );
}
public RankPlayerBalance getCachedRankPlayerBalance( String currency ) {
- return getCachedRankPlayerBalance( currency, true );
+ return getCachedRankPlayerBalance( currency, true );
}
/**
@@ -1194,6 +1158,9 @@ public double getBalance() {
}
setCachedRankPlayerBalance( null, results );
+
+ // Store player's balance for stats such as TopN:
+ setCurrentBalanceTemp(results);
}
return results;
@@ -1251,6 +1218,8 @@ private boolean addBalanceEconomy( double amount ) {
if ( economy != null ) {
results = economy.addBalance( this, amount );
addCachedRankPlayerBalance( null, amount );
+
+ setCurrentBalanceTemp( economy.getBalance( this ) );
}
return results;
}
@@ -1261,12 +1230,6 @@ public void removeBalance( double amount ) {
addBalance( targetAmount );
addCachedRankPlayerBalance( null, targetAmount );
-// EconomyIntegration economy = getEconomy();
-//
-// if ( economy != null ) {
-// economy.removeBalance( this, amount );
-// addCachedRankPlayerBalance( null, -1 * amount );
-// }
}
public void setBalance( double amount ) {
@@ -1280,12 +1243,6 @@ public void setBalance( double amount ) {
addBalance( targetAmount );
addCachedRankPlayerBalance( null, targetAmount );
-// EconomyIntegration economy = getEconomy();
-//
-// if ( economy != null ) {
-// economy.setBalance( this, amount );
-// setCachedRankPlayerBalance( null, amount );
-// }
}
@@ -1474,7 +1431,12 @@ public PlayerCache getPlayerCache() {
@Override
public PlayerCachePlayerData getPlayerCachePlayerData() {
- return PlayerCache.getInstance().getOnlinePlayer( this );
+ PlayerCachePlayerData cacheData = PlayerCache.getInstance().getOnlinePlayer( this );
+
+ // Do not update here... it gets called too many times:
+ //updateTotalLastValues( cacheData );
+
+ return cacheData;
}
@Override
@@ -1534,6 +1496,7 @@ public PlayerRank getNextPlayerRank() {
"Please try restarting the server to see if that fixes the problem before contacting " +
"prison's support team. Thanks!"
));
+ return null;
}
Rank nRank = rankCurrent.getRank().getRankNext();
@@ -1549,7 +1512,6 @@ public PlayerRank getNextPlayerRank() {
// If the player does not have a presetige rank, the getRankLadder will return null.
-// RankLadder rLadder = getRankLadder( RankLadder.PRESTIGES );
nRank = rLadder == null ? null : rLadder.getLowestRank().orElse(null);
}
@@ -1561,7 +1523,6 @@ public PlayerRank getNextPlayerRank() {
}
PlayerRank pRankNext = calculateTargetPlayerRank( nRank );
-// PlayerRank pRankNext = rankCurrent.getTargetPlayerRankForPlayer( this, nRank );
return pRankNext;
}
@@ -1582,68 +1543,7 @@ public void calculateRankScore() {
double balance = getBalance( rankNextCurrency );
-// RankPlayerBalance cachedBalance = getCachedRankPlayerBalance( rankNextCurrency, true );
-//
-// double balance = cachedBalance.getBalance();
-
calculateRankScore( rankNextCurrency, cost, balance );
-
-
-// PlayerRank rankCurrent = getPlayerRankDefault();
-
-// Rank nRank = rankCurrent.getRank().getRankNext();
-//
-// // If player does not have a next rank, then try to use the next prestige rank:
-// if ( nRank == null ) {
-// PlayerRank prestigeRankCurrent = getPlayerRankPrestiges();
-//
-// // if they don't have a current prestige rank, then use the lowest rank:
-// if ( prestigeRankCurrent == null ) {
-// RankLadder rLadder = getRankLadder( RankLadder.PRESTIGES );
-// nRank = rLadder == null ? null : rLadder.getLowestRank().orElse(null);
-// }
-//
-// if ( prestigeRankCurrent != null ) {
-// nRank = prestigeRankCurrent.getRank() == null ?
-// null : prestigeRankCurrent.getRank().getRankNext();
-// }
-//
-// }
-//
-//
-// PlayerRank pRankNext = rankCurrent.getTargetPlayerRankForPlayer( this, nRank );
-
-// String rankNextCurrency = nRank == null ? "" : nRank.getCurrency();
-// double balance = getBalance( rankNextCurrency );
-
-
-// double balance = getBalance( rankNextCurrency );
-// double score = balance;
-// double penalty = 0d;
-//
-// // Do not apply the penalty if cost is zero:
-// if ( cost > 0 && isHesitancyDelayPenaltyEnabled() ) {
-// score = balance > cost ? cost : score;
-//
-// double excess = balance > cost ? balance - cost : 0d;
-// penalty = excess * 0.2d;
-// }
-//
-// score = (score - penalty);
-//
-// if ( cost > 0 ) {
-// score /= cost * 100.0d;
-// }
-//
-//// double balanceThreshold = cost * RANK_SCORE_BALANCE_THRESHOLD_PERCENT;
-//
-//// setRankScoreBalance( balance );
-//// setRankScoreCurrency( rankNextCurrency );
-//// setRankScoreBalanceThreshold( balanceThreshold );
-// setRankScore( score );
-// setRankScorePenalty( penalty );
-//
-//// setRankScoreCooldown( System.currentTimeMillis() + RANK_SCORE_COOLDOWN_MS );
}
private void calculateRankScore( String currency, double cost, double playerBalance ) {
@@ -1672,56 +1572,12 @@ private void calculateRankScore( String currency, double cost, double playerBala
setRankScoreCurrency( currency );
}
-// private void checkRecalculateRankScore() {
-//
-// calculateRankScore();
-//
-//// if ( getRankScoreCooldown() == 0L ||
-//// System.currentTimeMillis() > getRankScoreCooldown()
-//// ) {
-////
-//// double currentBalance = getBalance( getRankScoreCurrency() );
-////
-//// if ( getRankScoreBalance() != 0 && (
-//// currentBalance == getRankScoreBalance() ||
-//// currentBalance >= (getRankScoreBalance() - getRankScoreBalanceThreshold()) ||
-//// currentBalance <= (getRankScoreBalance() + getRankScoreBalanceThreshold() ) )) {
-////
-//// // increment the cooldown since the balance is either the same, or still
-//// // within the threshold range:
-//// setRankScoreCooldown( System.currentTimeMillis() + RANK_SCORE_COOLDOWN_MS );
-//// }
-//// else {
-//// calculateRankScore( currentBalance );
-//// }
-//// }
-// }
-
-// /**
-// * By setting rankScoreCooldown to zero, it will force that player to have it's
-// * rank score to be recalculated. The most expensive part is getting the player's
-// * balance from Vault.
-// *
-// *
-// */
-// public void forcePlayerToRecalculateRankScore() {
-// rankScoreCooldown = 0L;
-// }
+
public static String printRankScoreLine1Header() {
String header = coreTopNLine1HeaderMsg();
-// String header = String.format(
-// "Rank %-16s %-9s %-6s %-9s %-9s %-9s",
-// "Player",
-// "Prestiges",
-// "Rank",
-// "Balance",
-// "Rank-Score",
-// "Penalty"
-//
-// );
return header;
}
@@ -1768,16 +1624,6 @@ public String printRankScoreLine1( int rankPostion ) {
balanceMetricStr
);
-// String message = String.format(
-// " %-3s %-18s %-7s %-7s %9s %9s %9s",
-// rankScoreStr,
-// getName(),
-// prestRankTagNc,
-// defRankTagNc,
-// balanceKmbtStr,
-// dFmt.format( getRankScore() ),
-// sPenaltyStr
-// );
message = message
.replace(prestRankTagNc, prestRankTag + "&r")
@@ -1789,14 +1635,6 @@ public String printRankScoreLine1( int rankPostion ) {
public static String printRankScoreLine2Header() {
String header = coreTopNLine2HeaderMsg();
-// String header = String.format(
-// "Rank %s %s %-15s %9s",
-// "Ranks",
-// "Rank-Score",
-// "Player",
-// "Balance"
-//
-// );
return header;
}
@@ -1826,21 +1664,6 @@ public String printRankScoreLine2( int rankPostion ) {
String playerName = getName();
-// DecimalFormat dFmt = Prison.get().getDecimalFormat("#,##0.00");
-//
-// PlayerRank prestRank = getPlayerRankPrestiges();
-// PlayerRank defRank = getPlayerRankDefault();
-//
-// String prestRankTag = prestRank == null ? "---" : prestRank.getRank().getTag();
-// String defRankTag = defRank == null ? "---" : defRank.getRank().getTag();
-//
-// String prestRankTagNc = Text.stripColor(prestRankTag);
-// String defRankTagNc = Text.stripColor(defRankTag);
-//
-// String balanceKmbtStr = PlaceholdersUtil.formattedKmbtSISize( getRankScoreBalance(), dFmt, " " );
-//// String sPenaltyStr = PlaceholdersUtil.formattedKmbtSISize( getRankScorePenalty(), dFmt, " " );
-//
-// String ranks = prestRankTagNc + defRankTagNc;
String message = coreTopNLine2DetailMsg(
playerName,
@@ -1851,19 +1674,6 @@ public String printRankScoreLine2( int rankPostion ) {
prestRankTagNc, defRankTagNc,
balanceFmtStr, balanceKmbtStr, balanceMetricStr );
-// String message = String.format(
-// " %-3s %-9s %6s %-17s %9s",
-// (rankPostion > 0 ? Integer.toString(rankPostion) : ""),
-// ranks,
-// dFmt.format( getRankScore() ),
-// getName(),
-// balanceKmbtStr
-// );
-//
-// message = message
-// .replace(prestRankTagNc, prestRankTag + "&r")
-// .replace(defRankTagNc, defRankTag + "&r");
-
return message;
}
@@ -1886,18 +1696,9 @@ public void setRankScoreCurrency( String rankScoreCurrency ) {
this.rankScoreCurrency = rankScoreCurrency;
}
-// public double getRankScoreBalanceThreshold() {
-// return rankScoreBalanceThreshold;
-// }
-// public void setRankScoreBalanceThreshold( double rankScoreBalanceThreshold ) {
-// this.rankScoreBalanceThreshold = rankScoreBalanceThreshold;
-// }
public double getRankScore() {
- // check if the rankScore needs to be reset:
-// checkRecalculateRankScore();
-
return rankScore;
}
public void setRankScore( double rankScore ) {
@@ -1911,12 +1712,26 @@ public void setRankScorePenalty( double rankScorePenalty ) {
this.rankScorePenalty = rankScorePenalty;
}
+ /**
+ * Returns the player's current sellallMultipliers listing if they are
+ * online. If they are not online, then this returns their last saved
+ * listing, which will not be their current listing since they could have
+ * changed since the player was last online.
+ *
+ *
+ */
@Override
public List getSellAllMultiplierListings() {
Player player = Prison.get().getPlatform().getPlayer(getUUID()).orElse(null);
- return player == null ? new ArrayList<>() : player.getSellAllMultiplierListings();
+ return player == null ?
+
+ // NOTE: player is offline, so use the saved sellall multiplier list:
+ getSellallMultipliers() :
+
+ // Online player: The actual live multiplier listings:
+ player.getSellAllMultiplierListings();
}
@@ -2034,10 +1849,98 @@ private String applySecondaryPlaceholdersCheck( String placeholder, String value
public void doNothing() {
}
-// public long getRankScoreCooldown() {
-// return rankScoreCooldown;
-// }
-// public void setRankScoreCooldown( long rankScoreCooldown ) {
-// this.rankScoreCooldown = rankScoreCooldown;
-// }
+
+
+ public long getLastSaved() {
+ return lastSaved;
+ }
+ public void setLastSaved(long lastSaved) {
+ this.lastSaved = lastSaved;
+ }
+
+
+ /**
+ * Notice: This last refreshed timestamp refers to when the permsSnapShot
+ * and sellallMultipliers were last updated. It maybe be older than the
+ * last time the players were seen?
+ * @return
+ */
+ public long getLastRefreshed() {
+ return lastRefreshed;
+ }
+ public void setLastRefreshed(long lastRefreshed) {
+ this.lastRefreshed = lastRefreshed;
+ }
+
+ /**
+ * DO NOT USE!
+ *
+ * This is just temporary and unofficial list of permissions
+ * to be used when the player is offline. These are only accurate
+ * when they are extracted when the player is online and the player's
+ * RankPlayer object is saved.
+ *
+ * @return
+ */
+ public List getPermsSnapShot() {
+ return permsSnapShot;
+ }
+ public void setPermsSnapShot(List permsSnapShot) {
+ this.permsSnapShot = permsSnapShot;
+ }
+
+
+ /**
+ * DO NOT USE!
+ *
+ * This is just a temporary and unofficial storage of the multiplier.
+ * This is not the current multiplier. And as such, should never be
+ * used as the current multiplier.
+ *
+ * This could be used in the same way that the
+ * getSellallMultipliers() listing is used... for references only
+ * when the player is offline.
+ *
+ * @return
+ */
+ public double getSellallMultiplierValue() {
+ return sellallMultiplierValue;
+ }
+ public void setSellallMultiplierValue(double sellallMultiplierValue) {
+ this.sellallMultiplierValue = sellallMultiplierValue;
+ }
+
+ /**
+ * DO NOT USE!
+ *
+ * This is just temporary and unofficial list of sellall multipliers
+ * to be used when the player is offline. These are only accurate
+ * when they are extracted when the player is online and the player's
+ * RankPlayer object is saved.
+ *
+ * @return
+ */
+ public List getSellallMultipliers() {
+ return sellallMultipliers;
+ }
+ public void setSellallMultipliers(List sellallMultipliers) {
+ this.sellallMultipliers = sellallMultipliers;
+ }
+
+
+ /**
+ * This miscText is not used for any specific purpose other than to hold a String
+ * value. It can be used to return a message from a function, but it should always
+ * be cleared when done using it.
+ *
+ * @return
+ */
+ @Override
+ public String getMiscText() {
+ return miscText;
+ }
+ @Override
+ public void setMiscText( String text ) {
+ miscText = text;
+ }
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/ranks/data/StatsRankPlayerBalanceData.java b/prison-core/src/main/java/tech/mcprison/prison/ranks/data/StatsRankPlayerBalanceData.java
index 94cf3440e..f2195849d 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/ranks/data/StatsRankPlayerBalanceData.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/ranks/data/StatsRankPlayerBalanceData.java
@@ -45,12 +45,9 @@ public void recalc( boolean isPenaltyEnabled ) {
// This calculates the target rank, and takes in to consideration the player's existing rank:
PlayerRank pRankNext = player.calculateTargetPlayerRank( rank.getRankNext() );
-// PlayerRank pRankNext = pRank.getTargetPlayerRankForPlayer( player, rank.getRankNext() );
- //PlayerRank pRankNext = new PlayerRank( rank.getRankNext(), pRank.getRankMultiplier() );
cost = pRankNext.getRankCost();
}
-// double cost = rank.getRankNext() == null ? rank.getCost() : rank.getRankNext().getCost();
double penalty = 0d;
// Do not apply the penalty if cost is zero:
diff --git a/prison-core/src/main/java/tech/mcprison/prison/selection/SelectionListener.java b/prison-core/src/main/java/tech/mcprison/prison/selection/SelectionListener.java
index 3b9a2f756..08b59a56a 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/selection/SelectionListener.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/selection/SelectionListener.java
@@ -37,7 +37,7 @@ public void init() {
@Subscribe
public void onPlayerInteract(PrisonPlayerInteractEvent e) {
ItemStack ourItem = e.getItemInHand();
- ItemStack toolItem = SelectionManager.SELECTION_TOOL;
+ ItemStack toolItem = ItemStack.SELECTION_WAND;
if ( ourItem == null || !ourItem.equals(toolItem)) {
return;
@@ -53,7 +53,8 @@ public void onPlayerInteract(PrisonPlayerInteractEvent e) {
.sendMessage("&7First position set to &8" + e.getClicked().toBlockCoordinates());
checkForEvent(e.getPlayer(), sel);
- } else if (e.getAction() == PrisonPlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) {
+ }
+ else if (e.getAction() == PrisonPlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) {
// Set second position
Selection sel = Prison.get().getSelectionManager().getSelection(e.getPlayer());
sel.setMax(e.getClicked());
diff --git a/prison-core/src/main/java/tech/mcprison/prison/selection/SelectionManager.java b/prison-core/src/main/java/tech/mcprison/prison/selection/SelectionManager.java
index 7d8aea24e..4d8ba5f7f 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/selection/SelectionManager.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/selection/SelectionManager.java
@@ -23,7 +23,6 @@
import tech.mcprison.prison.internal.ItemStack;
import tech.mcprison.prison.internal.Player;
-import tech.mcprison.prison.internal.block.PrisonBlock;
import tech.mcprison.prison.internal.inventory.Inventory;
import tech.mcprison.prison.output.Output;
@@ -32,9 +31,6 @@
*/
public class SelectionManager {
- public static final ItemStack SELECTION_TOOL =
- new ItemStack("&6Selection Wand", 1, PrisonBlock.BLAZE_ROD, "&7Corner 1 - Left click",
- "&7Corner 2 - Right click");
private Map selectionMap;
public SelectionManager() {
@@ -51,7 +47,7 @@ public SelectionManager() {
public void bestowSelectionTool(Player player) {
int countBefore = selectionWandCount( player );
- player.give(SELECTION_TOOL);
+ player.give( ItemStack.SELECTION_WAND );
int countAfter = selectionWandCount( player );
@@ -66,9 +62,8 @@ private int selectionWandCount( Player player) {
for (ItemStack is : inv.getItems()) {
if ( is != null &&
- // is.getName().toLowerCase().contains( "selection wand" ) &&
- // is.getDisplayName().toLowerCase().contains( "selection wand" ) &&
- is.getMaterial().compareTo( PrisonBlock.BLAZE_ROD ) == 0 ) {
+ is.getMaterial().compareTo( ItemStack.SELECTION_WAND.getMaterial() ) == 0
+ ) {
count += is.getAmount();
}
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/spatial/CoordinateKey.java b/prison-core/src/main/java/tech/mcprison/prison/spatial/CoordinateKey.java
index 2a0f9e6fe..15fa80119 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/spatial/CoordinateKey.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/spatial/CoordinateKey.java
@@ -1,62 +1,68 @@
package tech.mcprison.prison.spatial;
+/**
+ * @deprecated Not used
+ */
public class CoordinateKey
- implements Comparable {
+// implements Comparable
+{
- private int x;
- private int y;
- private int z;
+ // NOTE This class is not used, so it has been commented out before removal.
- public CoordinateKey( int x, int y, int z ) {
- super();
-
- this.x = x;
- this.y = y;
- this.z = z;
- }
-
- @Override
- public int compareTo( CoordinateKey skey )
- {
- int results = 0;
-
- if ( skey == null ) {
- results = -1;
- }
- else {
- results = Integer.compare( x, skey.getX() );
-
- if ( results == 0 ) {
- results = Integer.compare( z, skey.getZ() );
-
- if ( results == 0 ) {
- results = Integer.compare( y, skey.getY() );
- }
- }
- }
-
- return results;
- }
-
- public int getX() {
- return x;
- }
- public void setX( int x ) {
- this.x = x;
- }
-
- public int getY() {
- return y;
- }
- public void setY( int y ) {
- this.y = y;
- }
-
- public int getZ() {
- return z;
- }
- public void setZ( int z ) {
- this.z = z;
- }
+// private int x;
+// private int y;
+// private int z;
+//
+// public CoordinateKey( int x, int y, int z ) {
+// super();
+//
+// this.x = x;
+// this.y = y;
+// this.z = z;
+// }
+//
+// @Override
+// public int compareTo( CoordinateKey skey )
+// {
+// int results = 0;
+//
+// if ( skey == null ) {
+// results = -1;
+// }
+// else {
+// results = Integer.compare( x, skey.getX() );
+//
+// if ( results == 0 ) {
+// results = Integer.compare( z, skey.getZ() );
+//
+// if ( results == 0 ) {
+// results = Integer.compare( y, skey.getY() );
+// }
+// }
+// }
+//
+// return results;
+// }
+//
+// public int getX() {
+// return x;
+// }
+// public void setX( int x ) {
+// this.x = x;
+// }
+//
+// public int getY() {
+// return y;
+// }
+// public void setY( int y ) {
+// this.y = y;
+// }
+//
+// public int getZ() {
+// return z;
+// }
+// public void setZ( int z ) {
+// this.z = z;
+// }
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/spatial/SpatialIndex.java b/prison-core/src/main/java/tech/mcprison/prison/spatial/SpatialIndex.java
index 4d3749df6..c87cc4f28 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/spatial/SpatialIndex.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/spatial/SpatialIndex.java
@@ -1,13 +1,16 @@
package tech.mcprison.prison.spatial;
-import java.util.NavigableMap;
-
+/**
+ * @deprecated
+ */
public class SpatialIndex
{
- public static final int SPATIAL_INDEX_GRANULARIT = 25;
+ // NOTE: This class is not used. Contents has been commented out before removal.
- private NavigableMap idxX;
- private NavigableMap idxY;
- private NavigableMap idxZ;
+// public static final int SPATIAL_INDEX_GRANULARIT = 25;
+//
+// private NavigableMap idxX;
+// private NavigableMap idxY;
+// private NavigableMap idxZ;
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/spatial/SpatialIndexData.java b/prison-core/src/main/java/tech/mcprison/prison/spatial/SpatialIndexData.java
index dcfb9f601..ade59eda4 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/spatial/SpatialIndexData.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/spatial/SpatialIndexData.java
@@ -1,11 +1,17 @@
package tech.mcprison.prison.spatial;
+
+/**
+ * @deprecated
+ */
public class SpatialIndexData
{
- private int x;
- private int y;
- private int z;
+ // NOTE: class is not used and has been commented out before removal.
+
+// private int x;
+// private int y;
+// private int z;
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/store/Collection.java b/prison-core/src/main/java/tech/mcprison/prison/store/Collection.java
index 49b8aee74..192919312 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/store/Collection.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/store/Collection.java
@@ -32,10 +32,12 @@ public interface Collection {
public Optional get(String key);
- public void save(Document document);
- public void save(String filename, Document document);
+ public void save(String filename, Document document,
+ String oldFilename, String fileType);
+ boolean exists(String name);
+
public boolean delete(String name);
public File backup(String name);
diff --git a/prison-core/src/main/java/tech/mcprison/prison/tasks/PrisonCommandTaskData.java b/prison-core/src/main/java/tech/mcprison/prison/tasks/PrisonCommandTaskData.java
index 3c4c20f8d..d2fb697bb 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/tasks/PrisonCommandTaskData.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/tasks/PrisonCommandTaskData.java
@@ -82,7 +82,12 @@ public enum CommandEnvironment {
;
}
- public enum CustomPlaceholders {
+
+ /**
+ * These are placeholders used within Block Events.
+ *
+ */
+ public enum BlockEventCustomPlaceholders {
player(CommandEnvironment.all_commands,
"{player} provides a player's name."),
@@ -108,6 +113,20 @@ public enum CustomPlaceholders {
"{syncPlayer} runs the command as the payer in a new sync task."),
+ range(CommandEnvironment.all_commands,
+ "{range: } inserts a randomly choosen number within the "
+ + "range specified, all inclusive."),
+
+ ifPerm(CommandEnvironment.all_commands,
+ "{ifPerm:} Continues executing commands in the chain if "
+ + "the player has the perm ''.",
+ "ifPerm:" ),
+ ifNotPerm(CommandEnvironment.all_commands,
+ "{ifNotPerm:} Stops executing commands in the chain if "
+ + "the player has the perm ''.",
+ "ifNotPerm:" ),
+
+
firstJoin(CommandEnvironment.rank_commands,
"{firstJoin} runs the command on first join events for new players"),
promote(CommandEnvironment.rank_commands,
@@ -203,14 +222,23 @@ public enum CustomPlaceholders {
private final CommandEnvironment environment;
private final String description;
+ private final String exampleUsage;
- private CustomPlaceholders( CommandEnvironment environment ) {
+ private BlockEventCustomPlaceholders( CommandEnvironment environment ) {
this.environment = environment;
this.description = null;
+ this.exampleUsage = null;
}
- private CustomPlaceholders( CommandEnvironment environment, String description ) {
+ private BlockEventCustomPlaceholders( CommandEnvironment environment, String description ) {
this.environment = environment;
this.description = description;
+ this.exampleUsage = null;
+ }
+ private BlockEventCustomPlaceholders( CommandEnvironment environment, String description,
+ String exampleUsage ) {
+ this.environment = environment;
+ this.description = description;
+ this.exampleUsage = exampleUsage;
}
public static String listPlaceholders( CommandEnvironment environment ) {
@@ -218,7 +246,7 @@ public static String listPlaceholders( CommandEnvironment environment ) {
if ( environment != null ) {
- for ( CustomPlaceholders cp : values() ) {
+ for ( BlockEventCustomPlaceholders cp : values() ) {
if ( environment.equals( cp.getEnvironment() ) ) {
if ( sb.length() > 0 ) {
@@ -240,7 +268,11 @@ public static String listPlaceholders( CommandEnvironment environment ) {
* @return
*/
public String getPlaceholder() {
- return "{" + name() + "}";
+ return "{" +
+ ( getExampleUsage() != null ?
+ getExampleUsage() :
+ name() )
+ + "}";
}
public CommandEnvironment getEnvironment() {
@@ -250,6 +282,10 @@ public CommandEnvironment getEnvironment() {
public String getDescription() {
return description;
}
+
+ public String getExampleUsage() {
+ return exampleUsage;
+ }
}
@@ -291,11 +327,60 @@ public PrisonCommandTaskData( String errorMessagePrefix,
command = command.replace( "{syncPlayer}", "" );
}
+ if ( command.contains( "{range:") ) {
+ command = taskInsertRange( command );
+ }
+
this.cmd = command;
this.taskMode = taskMode;
}
+ protected String taskInsertRange(String command) {
+
+ int idx = command.indexOf("{range:");
+ if ( idx != -1 ) {
+
+ int idxEnd = command.indexOf("}", idx );
+ if ( idxEnd != -1 ) {
+ try {
+ String oValue = command.substring( idx, idxEnd + 1);
+ String results = "";
+
+ String nValues = oValue.replace( "{range:", "").replace( "}", "" ).trim();
+ String[] lowHigh = nValues.split( " " );
+
+ int low = Integer.parseInt( lowHigh[0] );
+ int high = Integer.parseInt( lowHigh[1] );
+
+ if ( high < low ) {
+ int temp = low;
+ low = high;
+ high = temp;
+ }
+
+ if ( low == high ) {
+ results = Integer.toString( low );
+ }
+ else {
+ int range = high - low;
+ int rnd = ((int) Math.round(Math.random() * range));
+ results = Integer.toString( low + rnd );
+ }
+
+ command = command.replace( oValue, results );
+ }
+ catch (NumberFormatException e) {
+ // ignore: invalid numbers
+ }
+
+ }
+
+ }
+
+ return command;
+ }
+
public String getDebugDetails() {
StringBuilder sb = new StringBuilder();
@@ -350,26 +435,6 @@ public void runCommandTask() {
public void runCommandTask( Player player ) {
-// if ( command.contains( "{inline}" ) ) {
-// taskMode = TaskMode.inline;
-// command = command.replace( "{inline}", "" );
-// }
-//
-// if ( command.contains( "{inlinePlayer}" ) ) {
-// taskMode = TaskMode.inlinePlayer;
-// command = command.replace( "{inlinePlayer}", "" );
-// }
-//
-// if ( command.contains( "{sync}" ) ) {
-// taskMode = TaskMode.sync;
-// command = command.replace( "{sync}", "" );
-// }
-//
-// if ( command.contains( "{syncPlayer}" ) ) {
-// taskMode = TaskMode.syncPlayer;
-// command = command.replace( "{syncPlayer}", "" );
-// }
-//
String commandTranslated = translateCommand( player, getCmd() );
// Split multiple commands in to a List of individual tasks:
@@ -386,37 +451,6 @@ public void runCommandTask( Player player ) {
runTask( player );
-// PrisonDispatchCommandTask task =
-// new PrisonDispatchCommandTask( tasks, errorMessage,
-// player, taskMode.isPlayerTask() );
-
-
- // Ignore taskMode since it's already running in a new sync task:
-// task.run();
-
-
- // NOTE: taskMode is no longer used, since all tasks are being ran
- // within a sync task that has already been submitted.
-// switch ( taskMode )
-// {
-// case inline:
-// case inlinePlayer:
-// // Don't submit, but run it here within this thread:
-// task.run();
-// break;
-//
-// case sync:
-// case syncPlayer:
-// //case "async": // async will cause failures so run as sync:
-//
-// // submit task:
-// setTaskId( PrisonTaskSubmitter.runTaskLater(task, 0) );
-// break;
-//
-// default:
-// break;
-// }
-
}
}
@@ -432,6 +466,28 @@ public void runTask( Player player ) {
// was failing with leading spaces after spliting after a ";" so trim to fix it:
task = task == null ? "" : task.trim();
+
+
+ // If the task is '{ifPerm:}' then the player must have the perm to
+ // continue:
+ if ( task.toLowerCase().startsWith( "{ifperm:" ) ) {
+ String perm = task.substring( 8, task.length() - 1 );
+
+ boolean hasPerm = player.hasPermission( perm );
+
+ if ( !hasPerm ) {
+ break;
+ }
+ }
+ if ( task.toLowerCase().startsWith( "{ifnotperm:" ) ) {
+ String perm = task.substring( 11, task.length() - 1 );
+
+ boolean hasPerm = player.hasPermission( perm );
+
+ if ( hasPerm ) {
+ break;
+ }
+ }
// Apply the custom placeholders:
@@ -514,7 +570,7 @@ private String translateCommand( Player player, String command ) {
* characters.
* @param value The value that is used to replace the placeholder.
*/
- public void addCustomPlaceholder( CustomPlaceholders placeholder, String value ) {
+ public void addCustomPlaceholder( BlockEventCustomPlaceholders placeholder, String value ) {
PrisonCommandTaskPlaceholderData cph = new PrisonCommandTaskPlaceholderData( placeholder, value);
getCustomPlaceholders().add( cph );
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/tasks/PrisonCommandTaskPlaceholderData.java b/prison-core/src/main/java/tech/mcprison/prison/tasks/PrisonCommandTaskPlaceholderData.java
index 407441a20..a9d884db5 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/tasks/PrisonCommandTaskPlaceholderData.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/tasks/PrisonCommandTaskPlaceholderData.java
@@ -1,13 +1,13 @@
package tech.mcprison.prison.tasks;
-import tech.mcprison.prison.tasks.PrisonCommandTaskData.CustomPlaceholders;
+import tech.mcprison.prison.tasks.PrisonCommandTaskData.BlockEventCustomPlaceholders;
public class PrisonCommandTaskPlaceholderData {
- private CustomPlaceholders placeholder;
+ private BlockEventCustomPlaceholders placeholder;
private String value;
- public PrisonCommandTaskPlaceholderData( CustomPlaceholders placeholder, String value ) {
+ public PrisonCommandTaskPlaceholderData( BlockEventCustomPlaceholders placeholder, String value ) {
super();
this.placeholder = placeholder;
@@ -27,10 +27,10 @@ public String replace( String text ) {
return results;
}
- public CustomPlaceholders getPlaceholder() {
+ public BlockEventCustomPlaceholders getPlaceholder() {
return placeholder;
}
- public void setPlaceholder( CustomPlaceholders placeholder ) {
+ public void setPlaceholder( BlockEventCustomPlaceholders placeholder ) {
this.placeholder = placeholder;
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/tasks/PrisonDispatchCommandTask.java b/prison-core/src/main/java/tech/mcprison/prison/tasks/PrisonDispatchCommandTask.java
index f041c6c12..6d67c3b34 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/tasks/PrisonDispatchCommandTask.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/tasks/PrisonDispatchCommandTask.java
@@ -44,6 +44,27 @@ public void run() {
long start = System.nanoTime();
+ // If the task is '{ifPerm:}' then the player must have the perm to
+ // continue:
+ if ( task.toLowerCase().startsWith( "{ifperm:" ) ) {
+ String perm = task.substring( 8, task.length() - 1 );
+
+ boolean hasPerm = player.hasPermission( perm );
+
+ if ( !hasPerm ) {
+ break;
+ }
+ }
+ if ( task.toLowerCase().startsWith( "{ifnotperm:" ) ) {
+ String perm = task.substring( 11, task.length() - 1 );
+
+ boolean hasPerm = player.hasPermission( perm );
+
+ if ( hasPerm ) {
+ break;
+ }
+ }
+
// Apply the custom placeholders:
for ( PrisonCommandTaskPlaceholderData cPlaceholder : getCustomPlaceholders() ) {
if ( cPlaceholder.contains( task ) ) {
@@ -52,6 +73,7 @@ public void run() {
}
try {
+
if ( playerTask && player != null ) {
// double start = System.currentTimeMillis();
diff --git a/prison-core/src/main/java/tech/mcprison/prison/tasks/PrisonTaskSubmitter.java b/prison-core/src/main/java/tech/mcprison/prison/tasks/PrisonTaskSubmitter.java
index cc22ab101..72370f7f9 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/tasks/PrisonTaskSubmitter.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/tasks/PrisonTaskSubmitter.java
@@ -27,9 +27,9 @@ public static int runTaskLater( PrisonRunnable task, long delayInTicks ) {
* @return The task ID.
*/
public static int runTaskLaterAsync(Runnable task, long delayInTicks) {
- int taskId = Prison.get().getPlatform().getScheduler().runTaskLaterAsync(task, delayInTicks);
-
- return taskId;
+ int taskId = Prison.get().getPlatform().getScheduler().runTaskLaterAsync(task, delayInTicks);
+
+ return taskId;
}
/**
@@ -41,10 +41,10 @@ public static int runTaskLaterAsync(Runnable task, long delayInTicks) {
* @return The task ID.
*/
public static int runTaskTimer(Runnable task, long delayInTicks, long intervalInTicks){
- int taskId = Prison.get().getPlatform().getScheduler().runTaskTimer(task, delayInTicks,
- intervalInTicks);
-
- return taskId;
+ int taskId = Prison.get().getPlatform().getScheduler().runTaskTimer(task, delayInTicks,
+ intervalInTicks);
+
+ return taskId;
}
/**
@@ -56,10 +56,10 @@ public static int runTaskTimer(Runnable task, long delayInTicks, long intervalIn
* @return The task ID.
*/
public static int runTaskTimerAsync(Runnable task, long delayInTicks, long intervalInTicks){
- int taskId = Prison.get().getPlatform().getScheduler().runTaskTimerAsync(task, delayInTicks,
- intervalInTicks);
-
- return taskId;
+ int taskId = Prison.get().getPlatform().getScheduler().runTaskTimerAsync(task, delayInTicks,
+ intervalInTicks);
+
+ return taskId;
}
/**
@@ -68,14 +68,14 @@ public static int runTaskTimerAsync(Runnable task, long delayInTicks, long inter
* @param taskId The task's ID.
*/
public static void cancelTask(int taskId) {
- Prison.get().getPlatform().getScheduler().cancelTask( taskId );
+ Prison.get().getPlatform().getScheduler().cancelTask( taskId );
}
/**
* Cancels all tasks registered through this scheduler.
*/
public static void cancelAll(){
- Prison.get().getPlatform().getScheduler().cancelAll();
+ Prison.get().getPlatform().getScheduler().cancelAll();
}
/**
@@ -85,7 +85,7 @@ public static void cancelAll(){
* @return
*/
public static boolean isPrimaryThread() {
- return Prison.get().getPlatform().getScheduler().isPrimaryThread();
+ return Prison.get().getPlatform().getScheduler().isPrimaryThread();
}
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/troubleshoot/inbuilt/ItemTroubleshooter.java b/prison-core/src/main/java/tech/mcprison/prison/troubleshoot/inbuilt/ItemTroubleshooter.java
index d11e77076..b76ae86c7 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/troubleshoot/inbuilt/ItemTroubleshooter.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/troubleshoot/inbuilt/ItemTroubleshooter.java
@@ -4,39 +4,14 @@
* Inbuilt troubleshooter to scan the 'items.csv' file to ensure it's valid.
*
* @author Faizaan A. Datoo
+ *
+ * @deprecated
*/
public class ItemTroubleshooter
-// extends Troubleshooter
- {
+{
+
+ // NOTE: The commented out source in this class has been removed. See git's history to view it.
+ // This class was related to the old block model and would search through the old block
+ // text file to find something that may have matched a key phrase.
-// public ItemTroubleshooter() {
-// super("item_scan", "Run this if you have trouble with the items.csv file.");
-// }
-//
-// @Override public TroubleshootResult invoke(CommandSender invoker) {
-//
-// // Let's do our own test of initializing the ItemManager.
-// try {
-// ItemManager ourManager = new ItemManager();
-// ourManager.getItems();
-// } catch (Exception e) {
-// // OK, so something's wrong
-// // Let's try deleting the file and telling the user to relaunch.
-//
-// File itemsCsv = new File(PrisonAPI.getPluginDirectory(), "items.csv");
-// boolean deleted = itemsCsv.delete();
-// if (deleted) {
-// return new TroubleshootResult(TroubleshootResult.Result.USER_ACTION,
-// "We've found a problem with your items.csv file. We deleted it so that a new and non-corrupted one is generated. Please restart your server for the changes to take effect.");
-// } else {
-// // We can only hot delete on *NIX systems.
-// return new TroubleshootResult(TroubleshootResult.Result.FAILURE,
-// "We've found a problem with your items.csv file. We tried deleting it, but it could not be successfully deleted. Please stop your server, delete '/plugins/Prison/items.csv', and start your server again.");
-// }
-// }
-//
-// // Nothing is wrong.
-// return new TroubleshootResult(TroubleshootResult.Result.SUCCESS,
-// "No problems were found with your item manager or items.csv file.");
-// }
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/util/BluesSemanticVersionComparator.java b/prison-core/src/main/java/tech/mcprison/prison/util/BluesSemanticVersionComparator.java
new file mode 100644
index 000000000..f28c54565
--- /dev/null
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/BluesSemanticVersionComparator.java
@@ -0,0 +1,160 @@
+package tech.mcprison.prison.util;
+
+import tech.mcprison.prison.Prison;
+
+/**
+ * This class provides a real comparator for semantic versioning
+ * for spiget. This addresses issues seen with incorrect notifications.
+ * Extensive unit tests back the correct functionality of this code base.
+ *
+ *
+ * Spiget's versions have totally failed on so many levels that they
+ * should not imply it has anything to do with semVer at all.
+ * The inherent problems with the solutions provided by spiget, is that they may work
+ * some of the time, but then fail once certain incorrect assumptions about semVers
+ * are realized. Intermittent failures are to be expected. For example, if someone
+ * is using version 2.3.11 and 2.4.0 is released, spiget's SEM_VER
+ * comparator will think the older version is newer than the current release.
+ * Why does that fail? Because they just remove the periods and take the remainder
+ * characters and then parse them all as one integer, then they compare integers. The
+ * context of major, minor, and patch is completely lost, plus it does not factor
+ * in prerelease tagging as semVer supports.
+ *
+ *
+ * To provide a product that actually works with real semVers, the website
+ * https://semver.org/ was used as the
+ * "standard" to base this functionality upon, and to which our tests are
+ * measured against.
+ *
+ *
+ * The result of the new architecture is a solution that ends up being very
+ * simple for this class.
+ *
+ *
+ * @author RoyalBlueRanger 2020-01-28
+ * @return
+ */
+public class BluesSemanticVersionComparator
+// extends VersionComparator
+{
+
+ public boolean isNewer(String currentVersion, String checkVersion) {
+ return performComparisons( currentVersion, checkVersion);
+ }
+
+ /**
+ * This function will take two String values and convert both to a
+ * SemanticVersioningData objects, that in turn, will parse the string
+ * and encapsulate the full representation as an object. Since this object
+ * implements comparable, its then as simple as comparing the new semVer to the
+ * current semVer to find out if it is actually newer.
+ *
+ *
+ * The semantic versions must be valid. At a minimum they have to
+ * have a format such as 1.0.0. If one is invalid, then compareTo will
+ * favor the valid semVer. If both are invalid then compareTo will return
+ * a negative -1000, which will equate to false result.
+ *
+ *
+ * @param currentVersion A String value representing the current semVer
+ * @param checkVersion A String value representing the checked semVer
+ * @return True if the checkVersion is a higher semVer than the current version
+ */
+ public boolean performComparisons( String currentVersion, String checkVersion ) {
+
+ BluesSemanticVersionData currentSemVer = new BluesSemanticVersionData(currentVersion);
+ BluesSemanticVersionData checkSemVer = new BluesSemanticVersionData(checkVersion);
+
+ return (checkSemVer.compareTo( currentSemVer ) > 0);
+ }
+
+ /**
+ * Example how to use:
+ *
+ *
+ *
+ * String ver = Bukkit.getVersion().trim();
+ * ver = ver.substring( ver.indexOf("(MC: ") + 5, ver.length() -1 );
+ * if ( new BluesSpigetSemVerComparator().compareTo(ver, "1.9.0") ) {
+ * // if mc version is less than 1.9.0
+ * }
+ *
+ *
+ * @param currentVersion
+ * @param checkVersion
+ * @return
+ */
+ public int compareTo( String currentVersion, String checkVersion ) {
+
+ BluesSemanticVersionData currentSemVer = new BluesSemanticVersionData(currentVersion);
+ BluesSemanticVersionData checkSemVer = new BluesSemanticVersionData(checkVersion);
+
+ return currentSemVer.compareTo( checkSemVer );
+ }
+
+ /**
+ * This uses the minecraft version of the server to compare to the provided version.
+ *
+ *
+ * Samples of what a bukkit, spigot, and paper version would look like. Notice
+ * they all have the version at the end between (MC: and ).
+ *
+ *
+ *
+ * - Spigot 1.8.8: git-Spigot-21fe707-e1ebe52 (MC: 1.8.8)
+ * - Spigot 1.10.2: git-Spigot-de459a2-51263e9 (MC: 1.10.2)
+ * - Spigot 1.12.2: git-Spigot-79a30d7-acbc348 (MC: 1.12.2)
+ * - Spigot 1.15.2: git-Spigot-2040c4c-893ad93 (MC: 1.15.2)
+ * - Paper 1.10.2: git-Paper-916.2 (MC: 1.10.2)
+ * - Paper 1.14.2: git-Paper-234 (MC: 1.14.4)
+ *
+ *
+ * * Example how to use:
+ *
+ *
+ *
+ * if ( new BluesSpigetSemVerComparator().compareMCVersionTo("1.9.0") < 0 ) {
+ * // if mc version is less than 1.9.0
+ * }
+ *
+ *
+ * @param checkVersion
+ * @return
+ */
+ public int compareMCVersionTo( String checkVersion ) {
+ int results = -1;
+ String currentVersion = getBukkitVersion();
+ if ( currentVersion != null ) {
+
+ results = compareTo( currentVersion, checkVersion );
+ }
+ return results;
+ }
+
+ public String getBukkitVersion() {
+ // Minecraft version: git-Paper-21 (MC: 1.15)
+
+ return getBukkitVersion( getBukkitVersionRaw() );
+ }
+
+
+ private String getBukkitVersionRaw() {
+ return Prison.get().getMinecraftVersion();
+ }
+
+ public String getBukkitVersion( String currentVersion ) {
+ String results = null;
+
+ if ( currentVersion != null ) {
+ currentVersion = currentVersion.trim().toLowerCase();
+ int i = currentVersion.indexOf("(mc:");
+ int len = currentVersion.length();
+ if ( i >= 0 && (i+4 < len)) {
+ results = currentVersion.substring( i + 4, len - 1 ).trim();
+ }
+ }
+
+ return results;
+ }
+
+}
diff --git a/prison-spigot/src/main/java/tech/mcprison/prison/spigot/spiget/BluesSemanticVersionData.java b/prison-core/src/main/java/tech/mcprison/prison/util/BluesSemanticVersionData.java
similarity index 99%
rename from prison-spigot/src/main/java/tech/mcprison/prison/spigot/spiget/BluesSemanticVersionData.java
rename to prison-core/src/main/java/tech/mcprison/prison/util/BluesSemanticVersionData.java
index 87e06f588..510b3cd00 100644
--- a/prison-spigot/src/main/java/tech/mcprison/prison/spigot/spiget/BluesSemanticVersionData.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/BluesSemanticVersionData.java
@@ -1,4 +1,4 @@
-package tech.mcprison.prison.spigot.spiget;
+package tech.mcprison.prison.util;
import java.util.ArrayList;
import java.util.List;
diff --git a/prison-core/src/main/java/tech/mcprison/prison/util/Bounds.java b/prison-core/src/main/java/tech/mcprison/prison/util/Bounds.java
index 707f2b3bf..91a4af970 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/util/Bounds.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/Bounds.java
@@ -18,6 +18,8 @@
package tech.mcprison.prison.util;
+import java.util.Optional;
+
import tech.mcprison.prison.Prison;
import tech.mcprison.prison.internal.World;
@@ -298,16 +300,49 @@ public Bounds( Bounds bounds, Edges edge, int amount ) {
}
+
+ /**
+ * This function should be called after loading a mine from
+ * storage, and this function should reconnect all dynamic objects
+ * that could not be stored with the core Mine data.
+ *
+ *
+ * Examples: World objects.
+ *
+ */
+ public void reconnectObjects() {
+
+ if ( getMin() != null && getMin().getWorld() == null ) {
+ String worldName = getMin().getWorldName();
+
+ Optional worldOpt = Prison.get().getPlatform().getWorld(worldName);
+
+ if ( worldOpt.isPresent() ) {
+ World world = worldOpt.get();
+
+ setWorld( world );
+ }
+ }
+ }
+
+ /**
+ * Sets the world on the min, max, and center objects.
+ * If the other locations have a different world set, it
+ * will be replaced with this new world.
+ *
+ *
+ * @param world
+ */
public void setWorld( World world ) {
if ( world != null ) {
- if ( getMin().getWorld() == null ) {
+ if ( getMin() != null ) {
getMin().setWorld( world );
}
- if ( getMax().getWorld() == null ) {
+ if ( getMax() != null ) {
getMax().setWorld( world );
}
- if ( getCenter().getWorld() == null ) {
+ if ( getCenter() != null ) {
getCenter().setWorld( world );
}
}
@@ -355,11 +390,11 @@ public double getArea() {
}
public boolean within(Location location) {
- return within( location, false, false );
+ return within( location, false, false );
}
public boolean withinIncludeTopBottomOfMine(Location location) {
- return within( location, true, true );
+ return within( location, true, true );
}
/**
@@ -374,27 +409,27 @@ public boolean withinIncludeTopBottomOfMine(Location location) {
* @return true if the location is within the bounds, false otherwise.
*/
private boolean within(Location location, boolean includeTopOfMine, boolean includeOneBelowMine ) {
- boolean results = false;
-
- if ( withinSameWorld( location )) {
-
- double ourX = Math.floor(location.getX());
- double ourY = Math.floor(location.getY());
- double ourZ = Math.floor(location.getZ());
-
- results = ourX >= getxMin() && ourX <= getxMax() // Within X
- && ourY >= (getyMin() - (includeOneBelowMine ? 1 : 0)) &&
- ourY <= (getyMax() + (includeTopOfMine ? 1 : 0)) // Within Y
- && ourZ >= getzMin() && ourZ <= getzMax(); // Within Z
- }
+ boolean results = false;
+
+ if ( withinSameWorld( location )) {
+
+ double ourX = Math.floor(location.getX());
+ double ourY = Math.floor(location.getY());
+ double ourZ = Math.floor(location.getZ());
+
+ results = ourX >= getxMin() && ourX <= getxMax() // Within X
+ && ourY >= (getyMin() - (includeOneBelowMine ? 1 : 0)) &&
+ ourY <= (getyMax() + (includeTopOfMine ? 1 : 0)) // Within Y
+ && ourZ >= getzMin() && ourZ <= getzMax(); // Within Z
+ }
return results;
}
public boolean withinSameWorld(Location location) {
- return getCenter().getWorld() != null && location.getWorld() != null &&
- getCenter().getWorld().getName().equalsIgnoreCase(
- location.getWorld().getName() );
+ return getCenter().getWorld() != null && location.getWorld() != null &&
+ getCenter().getWorld().getName().equalsIgnoreCase(
+ location.getWorld().getName() );
}
/**
@@ -413,17 +448,17 @@ public boolean withinSameWorld(Location location) {
* @return
*/
public boolean within(Location location, long radius) {
- boolean results = false;
-
- if ( withinSameWorld( location ) ) {
+ boolean results = false;
+
+ if ( withinSameWorld( location ) ) {
- // Ignore y since this is radius from the center axis of the mine:
- double distance = getDistance(location);
-
- results = distance <= radius;
- }
+ // Ignore y since this is radius from the center axis of the mine:
+ double distance = getDistance(location);
+
+ results = distance <= radius;
+ }
- return results;
+ return results;
}
/**
@@ -432,38 +467,38 @@ public boolean within(Location location, long radius) {
* @return
*/
public double getDistance() {
- double deltaX = getMin().getX() - getMax().getX();
- double deltaZ = getMin().getZ() - getMax().getZ();
- double distance = Math.sqrt( (deltaX * deltaX) + (deltaZ * deltaZ) );
- return Math.round( distance );
+ double deltaX = getMin().getX() - getMax().getX();
+ double deltaZ = getMin().getZ() - getMax().getZ();
+ double distance = Math.sqrt( (deltaX * deltaX) + (deltaZ * deltaZ) );
+ return Math.round( distance );
}
public double getDistance3d() {
- double deltaX = getMin().getX() - getMax().getX();
- double deltaY = getMin().getY() - getMax().getY();
- double deltaZ = getMin().getZ() - getMax().getZ();
- double distance = Math.sqrt( (deltaX * deltaX) + (deltaY * deltaY) + (deltaZ * deltaZ) );
- return Math.round( distance );
+ double deltaX = getMin().getX() - getMax().getX();
+ double deltaY = getMin().getY() - getMax().getY();
+ double deltaZ = getMin().getZ() - getMax().getZ();
+ double distance = Math.sqrt( (deltaX * deltaX) + (deltaY * deltaY) + (deltaZ * deltaZ) );
+ return Math.round( distance );
}
public double getDistance(Location location) {
- double deltaX = getCenter().getX() - location.getX();
- double deltaZ = getCenter().getZ() - location.getZ();
- double distance = Math.sqrt( (deltaX * deltaX) + (deltaZ * deltaZ) );
+ double deltaX = getCenter().getX() - location.getX();
+ double deltaZ = getCenter().getZ() - location.getZ();
+ double distance = Math.sqrt( (deltaX * deltaX) + (deltaZ * deltaZ) );
return Math.round( distance );
}
public double getDistance3d(Location location) {
- double deltaX = getCenter().getX() - location.getX();
- double deltaY = getCenter().getY() - location.getY();
- double deltaZ = getCenter().getZ() - location.getZ();
- double distance = Math.sqrt( (deltaX * deltaX) + (deltaY * deltaY) + (deltaZ * deltaZ) );
- return distance;
+ double deltaX = getCenter().getX() - location.getX();
+ double deltaY = getCenter().getY() - location.getY();
+ double deltaZ = getCenter().getZ() - location.getZ();
+ double distance = Math.sqrt( (deltaX * deltaX) + (deltaY * deltaY) + (deltaZ * deltaZ) );
+ return distance;
}
public String getDimensions() {
- return "&7" + Math.round(getWidth()) + "&8x&7" +
- Math.round(getHeight()) + "&8x&7" + Math.round(getLength());
+ return "&7" + Math.round(getWidth()) + "&8x&7" +
+ Math.round(getHeight()) + "&8x&7" + Math.round(getLength());
}
public Location getMin() {
@@ -478,12 +513,28 @@ public Location getCenter()
{
return center;
}
+
- @Override public String toString() {
+ public double getRadius() {
+ double radius = getDistance3d() / 2.0;
+ return radius;
+ }
+
+
+ @Override
+ public String toString() {
return "Bounds{" + "min=" + min.toCoordinates() + ", max=" + max.toCoordinates() + '}';
}
- @Override public boolean equals(Object o) {
+
+ /**
+ * This will check to see if two Bounds are equal.
+ * If any point is null, then this should always return
+ * false.
+ *
+ */
+ @Override
+ public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -492,9 +543,16 @@ public Location getCenter()
}
Bounds bounds = (Bounds) o;
- return min != null ?
- min.equals(bounds.min) :
- bounds.min == null && (max != null ? max.equals(bounds.max) : bounds.max == null);
+
+ // If any point is null, then this must return false:
+ if ( getMin() == null || getMax() == null ||
+ bounds.getMin() == null || bounds.getMax() == null ) {
+ return false;
+ }
+
+ return getMin().equals(bounds.getMin()) &&
+ getMax().equals(bounds.getMax());
+
}
@Override public int hashCode() {
diff --git a/prison-core/src/main/java/tech/mcprison/prison/util/ChatColor.java b/prison-core/src/main/java/tech/mcprison/prison/util/ChatColor.java
index cba2bd4c1..5820a7fb1 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/util/ChatColor.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/ChatColor.java
@@ -32,70 +32,64 @@
* @since API 1.0
*/
public enum ChatColor {
+ BLACK('0', 0x00),
+
+ DARK_BLUE('1', 0x1),
+
+ DARK_GREEN('2', 0x2),
+
+ DARK_AQUA('3', 0x3),
+
+ DARK_RED('4', 0x4),
+
+ DARK_PURPLE('5', 0x5),
+
+ GOLD('6', 0x6),
+
+ GRAY('7', 0x7),
+
+ DARK_GRAY('8', 0x8),
+
+ BLUE('9', 0x9),
+
+ GREEN('a', 0xA),
+
+ AQUA('b', 0xB),
+
+ RED('c', 0xC),
+
+ LIGHT_PURPLE('d', 0xD),
+
+ YELLOW('e', 0xE),
+
+ WHITE('f', 0xF),
+
/**
- * Represents black
- */
- BLACK('0', 0x00), /**
- * Represents dark blue
- */
- DARK_BLUE('1', 0x1), /**
- * Represents dark green
- */
- DARK_GREEN('2', 0x2), /**
- * Represents dark blue (aqua)
- */
- DARK_AQUA('3', 0x3), /**
- * Represents dark red
- */
- DARK_RED('4', 0x4), /**
- * Represents dark purple
- */
- DARK_PURPLE('5', 0x5), /**
- * Represents gold
- */
- GOLD('6', 0x6), /**
- * Represents gray
- */
- GRAY('7', 0x7), /**
- * Represents dark gray
- */
- DARK_GRAY('8', 0x8), /**
- * Represents blue
- */
- BLUE('9', 0x9), /**
- * Represents green
- */
- GREEN('a', 0xA), /**
- * Represents aqua
- */
- AQUA('b', 0xB), /**
- * Represents red
- */
- RED('c', 0xC), /**
- * Represents light purple
- */
- LIGHT_PURPLE('d', 0xD), /**
- * Represents yellow
- */
- YELLOW('e', 0xE), /**
- * Represents white
- */
- WHITE('f', 0xF), /**
* Represents magical characters that change around randomly
*/
- MAGIC('k', 0x10, true), /**
+ MAGIC('k', 0x10, true),
+
+ /**
* Makes the text bold.
*/
- BOLD('l', 0x11, true), /**
+ BOLD('l', 0x11, true),
+
+ /**
* Makes a line appear through the text.
*/
- STRIKETHROUGH('m', 0x12, true), /**
+ STRIKETHROUGH('m', 0x12, true),
+
+ /**
* Makes the text appear underlined.
*/
- UNDERLINE('n', 0x13, true), /**
+ UNDERLINE('n', 0x13, true),
+
+ /**
* Makes the text italic.
*/
- ITALIC('o', 0x14, true), /**
+ ITALIC('o', 0x14, true),
+
+ /**
* Resets all previous chat colors or formats.
*/
RESET('r', 0x15);
@@ -106,7 +100,7 @@ public enum ChatColor {
*/
public static final char COLOR_CHAR = '\u00A7';
private static final Pattern STRIP_COLOR_PATTERN =
- Pattern.compile("(?i)" + String.valueOf(COLOR_CHAR) + "|&[0-9A-FK-OR]");
+ Pattern.compile("(?i)" + String.valueOf(COLOR_CHAR) + "|&[0-9A-FK-OR]");
private final static Map BY_ID = Maps.newHashMap();
private final static Map BY_CHAR = Maps.newHashMap();
diff --git a/prison-core/src/main/java/tech/mcprison/prison/util/CollectionUtil.java b/prison-core/src/main/java/tech/mcprison/prison/util/CollectionUtil.java
index bc66ecbec..1486b4e1b 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/util/CollectionUtil.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/CollectionUtil.java
@@ -31,16 +31,9 @@
*/
public class CollectionUtil {
- /*
- * Constructor
- */
-
private CollectionUtil() {
}
- /*
- * Methods
- */
/**
* Creates a map out of an infinite amount of parameters. Every odd parameter (1, 3, 5, etc.) is a
diff --git a/prison-core/src/main/java/tech/mcprison/prison/util/ConversionUtil.java b/prison-core/src/main/java/tech/mcprison/prison/util/ConversionUtil.java
index b70e97444..1a09e5934 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/util/ConversionUtil.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/ConversionUtil.java
@@ -4,11 +4,11 @@ public class ConversionUtil
{
public static int doubleToInt(Object d) {
- return Math.toIntExact(Math.round((double) d));
+ return d == null ? -1 : Math.toIntExact(Math.round((double) d));
}
public static long doubleToLong(Object d) {
- return Math.round((double) d);
+ return d == null ? -1 : Math.round((double) d);
}
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/util/ExampleJavaDoubleVsBigDecimal.java b/prison-core/src/main/java/tech/mcprison/prison/util/ExampleJavaDoubleVsBigDecimal.java
index b3cd94e07..92805762e 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/util/ExampleJavaDoubleVsBigDecimal.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/ExampleJavaDoubleVsBigDecimal.java
@@ -55,7 +55,6 @@ private ArrayList runSample() {
sb.append( ".111111" );
DecimalFormat dFmt = new DecimalFormat( "#,##0.000000" );
-// DecimalFormat iFmt = new DecimalFormat( "#,##0.00000" );
for ( int i = 1; i < 35; i++ ) {
sb.insert( 0, "1" );
diff --git a/prison-core/src/main/java/tech/mcprison/prison/util/ItemManager.java b/prison-core/src/main/java/tech/mcprison/prison/util/ItemManager.java
index 2d72b97aa..3a1aba47f 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/util/ItemManager.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/ItemManager.java
@@ -26,60 +26,6 @@
*/
public class ItemManager {
-// private Multimap items;
-
+ // This commented out code has been purged. See git for the history.
- /**
- * This has not been used for a while. Will need to provide an alternative way to
- * add custom blocks.
- *
- * @throws Exception
- */
-// @Deprecated
-// public ItemManager() throws Exception {
-// items = ArrayListMultimap.create();
-// /*
-// File file = new File(Prison.get().getDataFolder(), "/items.csv");
-//
-// if (!file.exists()) {
-// try (
-// // make sure the InputStream is properly closed. May not be 100% needed here:
-// InputStream inputStream = getClass().getResourceAsStream("/items.csv");
-// )
-// {
-// Files.copy(inputStream, Paths.get(file.getPath()));
-// }
-// catch (Exception e) {
-// throw new IOException("Error while copying items.csv from the jar resource to a " +
-// "file within the plugins directory:", e);
-// }
-// }
-// try (
-// // Was a memory leak... always must be closed, so the try with resource ensures that it is:
-// BufferedReader in = new BufferedReader(new FileReader(file));
-// )
-// {
-// String inputLine;
-//
-// while ((inputLine = in.readLine()) != null) {
-// if (!inputLine.startsWith("#")) {
-// String[] array = inputLine.split(",");
-// String itemName = array[0];
-// int id = Integer.parseInt(array[1]);
-// short data = Short.parseShort(array[2]);
-// items.put(BlockType.getBlockWithData(id, data), itemName.toLowerCase());
-// }
-// }
-//
-// }
-// catch (Exception e) {
-// throw new IOException("Error while reading items.csv -- it's probably invalid", e);
-// }
-// */
-// }
-//
-// public Map> getItems() {
-// return items.asMap();
-// }
-
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/util/Location.java b/prison-core/src/main/java/tech/mcprison/prison/util/Location.java
index 734a63a81..3921ff741 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/util/Location.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/Location.java
@@ -18,7 +18,14 @@
package tech.mcprison.prison.util;
+import java.text.DecimalFormat;
+import java.util.Optional;
+
import tech.mcprison.prison.Prison;
+import tech.mcprison.prison.bombs.MineBombs.AnimationArmorStandItemLocation;
+import tech.mcprison.prison.internal.ArmorStand;
+import tech.mcprison.prison.internal.Entity;
+import tech.mcprison.prison.internal.EntityType;
import tech.mcprison.prison.internal.World;
import tech.mcprison.prison.internal.block.Block;
import tech.mcprison.prison.internal.block.PrisonBlock;
@@ -31,7 +38,9 @@
*/
public class Location {
- private World world;
+ private transient World world;
+ private String worldName;
+
private double x, y, z;
private float pitch, yaw;
@@ -41,34 +50,65 @@ public class Location {
private boolean isCorner;
public Location(World world, double x, double y, double z, float pitch, float yaw, Vector direction) {
- this.world = world;
- this.x = x;
- this.y = y;
- this.z = z;
- this.pitch = pitch;
- this.yaw = yaw;
- this.direction = direction;
+ this.world = world;
+ this.worldName = world == null ? null : world.getName();
+
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.pitch = pitch;
+ this.yaw = yaw;
+ this.direction = direction;
}
+
public Location(World world, double x, double y, double z, float pitch, float yaw) {
- this( world, x, y, z, pitch, yaw, new Vector() );
+ this( world, x, y, z, pitch, yaw, new Vector() );
}
public Location(World world, double x, double y, double z) {
- this( world, x, y, z, 0.0f, 0.0f);
+ this( world, x, y, z, 0.0f, 0.0f);
}
public Location(String worldName, int x, int y, int z) {
- this( Prison.get().getPlatform().getWorld( worldName ).orElse( null ), (double) x, (double) y, (double) z );
+ this( Prison.get().getPlatform().getWorld( worldName ).orElse( null ), (double) x, (double) y, (double) z );
}
public Location(Location clone) {
- this( clone.getWorld(), clone.getX(), clone.getY(), clone.getZ(),
+ this( clone.getWorld(), clone.getX(), clone.getY(), clone.getZ(),
clone.getPitch(), clone.getYaw(), clone.getDirection());
}
public Location() {
}
+ public Location clone() {
+ return new Location( this );
+ }
+
+
+ /**
+ * This function should be called after loading a mine from
+ * storage, and this function should reconnect all dynamic objects
+ * that could not be stored with the core Mine data.
+ *
+ *
+ * Examples: World objects.
+ *
+ */
+ public void reconnectObects() {
+ if ( getWorld() == null ) {
+ String worldName = getWorldName();
+
+ Optional worldOpt = Prison.get().getPlatform().getWorld(worldName);
+
+ if ( worldOpt.isPresent() ) {
+ World world = worldOpt.get();
+
+ setWorld( world );
+ }
+ }
+ }
+
public World getWorld() {
return world;
}
@@ -77,7 +117,14 @@ public void setWorld(World world) {
this.world = world;
}
- public double getX() {
+ public String getWorldName() {
+ return worldName;
+ }
+ public void setWorldName(String worldName) {
+ this.worldName = worldName;
+ }
+
+ public double getX() {
return x;
}
@@ -121,20 +168,34 @@ public Vector getDirection() {
return direction;
}
+ /**
+ * Sets the {@link #getYaw() yaw} and {@link #getPitch() pitch} to point
+ * in the direction of the vector.
+ *
+ * @param vector the direction vector
+ * @return the same location
+ */
public void setDirection( Vector direction ) {
this.direction = direction;
}
+ /**
+ * Return the integer part of the double, which means
+ * it should not be rounded; use floor instead.
+ *
+ *
+ * @return
+ */
public int getBlockX() {
- return Math.toIntExact(Math.round(getX()));
+ return (int) Math.floor(getX());
}
public int getBlockY() {
- return Math.toIntExact(Math.round(getY()));
+ return (int) Math.floor(getY());
}
public int getBlockZ() {
- return Math.toIntExact(Math.round(getZ()));
+ return (int) Math.floor(getZ());
}
public Block getBlockAt() {
@@ -142,11 +203,11 @@ public Block getBlockAt() {
}
public Block getBlockAt( boolean containsCustomBlocks ) {
- return world.getBlockAt( this, containsCustomBlocks );
+ return world.getBlockAt( this, containsCustomBlocks );
}
public void setBlockAsync( PrisonBlock prisonBlock ) {
- world.setBlockAsync( prisonBlock, this );
+ world.setBlockAsync( prisonBlock, this );
}
/**
@@ -171,7 +232,42 @@ public void setCorner(boolean isCorner) {
this.isCorner = isCorner;
}
- @Override public boolean equals(Object o) {
+ /**
+ * This compares to see if two different locations are the same.
+ *
+ *
+ * There are a few problems with this function. First we need to
+ * figure out if we want to check to see if we have exactly the same
+ * object or not, of which we shouldn't expect it to be the same object
+ * or we could just use the "==" equality test on the two objects.
+ * Therefore, we know it's not going to be the same object, but we want
+ * to determine if two objects are at the same location. This is
+ * yet another problem. What does it mean to be in the same location?
+ * If item A has an x value of 3.84928 and item B has 3.1489203 should
+ * that be the same location? Yes, it should. Because the two items
+ * are within the same "block" for that x value (ignoring y and z axis
+ * for this example).
+ *
+ *
+ * Therefore, this should check to see if two locations are within
+ * the same block or not. Likewise, where the "item" is looking should
+ * never be a factor since two items can be looking off in to different
+ * directions and still be in the same block. In other words, this
+ * check of having the same location is for the physical block, and not
+ * where they are looking.
+ *
+ *
+ * There may be situations were the pitch and yaw must match, but
+ * in general, it should not be used for this function. Also, the float
+ * values should NOT be used either since an x value of 3.123456 will not
+ * be considered in the same block if it has a value of 3.123450 since
+ * the block is not what that is checking. So integer values must
+ * be used in this method.
+ *
+ *
+ */
+ @Override
+ public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -181,15 +277,21 @@ public void setCorner(boolean isCorner) {
Location location = (Location) o;
- return Double.compare(location.x, x) == 0 && Double.compare(location.y, y) == 0
- && Double.compare(location.z, z) == 0 && Float.compare(location.pitch, pitch) == 0
- && Float.compare(location.yaw, yaw) == 0 && (world != null ?
- world.getName().equals(location.world.getName()) :
- location.world == null);
+ // Must be in the same world:
+ if ( world == null || location.world == null ||
+ !getWorld().getName().equalsIgnoreCase( location.getWorld().getName()) ) {
+ return false;
+ }
+
+
+ return location.getBlockX() == getBlockX() &&
+ location.getBlockY() == getBlockY() &&
+ location.getBlockZ() == getBlockZ();
}
- @Override public int hashCode() {
+ @Override
+ public int hashCode() {
int result;
long temp;
result = world != null ? world.hashCode() : 0;
@@ -204,13 +306,26 @@ public void setCorner(boolean isCorner) {
return result;
}
- @Override public String toString() {
- return "Location{" + "world=" + world + ", x=" + x + ", y=" + y + ", z=" + z + ", pitch="
- + pitch + ", yaw=" + yaw + '}';
+ @Override
+ public String toString() {
+
+ DecimalFormat dFmt = new DecimalFormat( "0.00" );
+
+ return "Location{" + "world=" + world.getName() + ", "
+ + "x=" + dFmt.format(x) + ", "
+ + "y=" + dFmt.format(y) + ", "
+ + "z=" + dFmt.format(z) + ", "
+ + "pitch=" + dFmt.format(pitch) + ", "
+ + "yaw=" + dFmt.format(yaw) + '}';
}
/**
- * Returns the values in coordinate (x, y, z) format.
+ * Returns the values in coordinate '(x, y, z)' format.
+ * Uses doubles with no rounding. Has spaces after the commas.
+ *
+ *
+ * Example: (-15.1, 35.666667, 124.000325)
+ *
*
* @return The {@link String} containing coordinates.
*/
@@ -218,29 +333,51 @@ public String toCoordinates() {
return "(" + x + ", " + y + ", " + z + ")";
}
-
+ /**
+ * Returns the values in coordinate '(worldName, x, y, z)' format.
+ * Uses only the integer part of the doubles with no rounding. Has spaces after the commas.
+ *
+ *
+ * Example: (PrisonWorld, -15, 35, 124)
+ *
+ * @return
+ */
public String toWorldCoordinates() {
- return "(" + world.getName() + "," + ((int) x) + "," + ((int) y) + "," + ((int) z) + ")";
+ return "(" + world.getName() + "," + ((int) x) + "," + ((int) y) + "," + ((int) z) + ")";
}
+ /**
+ * Using a String value of the WorldCoordinates, decodes the string value
+ * to a Location object.
+ *
+ *
+ * @param worldCoordinats such as '(PrisonWorld, -15, 35, 124)'
+ * @return
+ */
public static Location decodeWorldCoordinates( String worldCoordinats ) {
- Location results = null;
- String[] d = worldCoordinats.replaceAll( "\\(|\\)", "" ).split( "," );
-
- if ( d != null && d.length == 4 ) {
- results = new Location( d[0], Integer.parseInt( d[1] ), Integer.parseInt( d[2] ), Integer.parseInt( d[3] ) );
- }
- return results;
+ Location results = null;
+ String[] d = worldCoordinats.replaceAll( "\\(|\\)", "" ).split( "," );
+
+ if ( d != null && d.length == 4 ) {
+ results = new Location( d[0], Integer.parseInt( d[1] ), Integer.parseInt( d[2] ), Integer.parseInt( d[3] ) );
+ }
+ return results;
}
/**
- * Returns the values in coordinate (x, y, z) format, to the nearest block (i.e. no decimals).
- *
+ * Returns the values in coordinate '(x, y, z)' format, to the nearest
+ * block (i.e. no decimals, rounded, spaces after commas).
+ *
+ *
+ * Example: (-15, 35, 124)
+ *
+ *
* @return The {@link String} containing coordinates.
*/
public String toBlockCoordinates() {
return "(" + Math.round(x) + ", " + Math.round(y) + ", " + Math.round(z) + ")";
}
+
public Location add( Vector direction )
{
Location results = new Location( this );
@@ -253,6 +390,19 @@ public Location add( Vector direction )
return results;
}
+ /**
+ * This returns a vector based upon the current location.
+ *
+ * Note that this is based upon org.bucket.location.Location.toVector() and
+ * it does not use yaw.
+ *
+ * @return
+ */
+ public Vector toVector() {
+ Vector results = new Vector( getX(), getY(), getZ() );
+ return results;
+ }
+
/**
* This function will clone the current location object and then add/subtract the amount of
* x, y, and/or z to that location. To keep the same value for one or more of these coordinates
@@ -290,5 +440,21 @@ public Block getBlockAtDelta( int x, int y, int z )
return getWorld().getBlockAt( results );
}
+
+ public Entity spawnEntity( EntityType entityType ) {
+ return getWorld().spawnEntity( this, entityType );
+ }
+
+ public ArmorStand spawnArmorStand() {
+ return getWorld().spawnArmorStand( this );
+ }
+
+ public ArmorStand spawnArmorStand( String itemName, AnimationArmorStandItemLocation asLocation ) {
+
+ return getWorld().spawnArmorStand( this, itemName, asLocation );
+ }
+
+
+
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/util/MaterialType.java b/prison-core/src/main/java/tech/mcprison/prison/util/MaterialType.java
index 7776831f4..d2c1051a9 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/util/MaterialType.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/MaterialType.java
@@ -2,11 +2,14 @@
public enum MaterialType
{
- BLOCK,
- ITEM,
+ // NOTE: This is no longer used. This was used with the old block system.
+ not_used;
- NOT_SET,
-
- INVALID;
+// BLOCK,
+// ITEM,
+//
+// NOT_SET,
+//
+// INVALID;
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/util/MaterialVersion.java b/prison-core/src/main/java/tech/mcprison/prison/util/MaterialVersion.java
index 2374c5a27..7dba2bac4 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/util/MaterialVersion.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/MaterialVersion.java
@@ -2,17 +2,20 @@
public enum MaterialVersion
{
- v1_8,
+ // NOTE: This is no longer used. This was used with the old block system.
+ not_used;
- v1_9,
- v1_10,
-
- v1_11,
- v1_12,
- v1_13,
-
- v1_14,
- v1_15,
- v1_16
- ;
+// v1_8,
+//
+// v1_9,
+// v1_10,
+//
+// v1_11,
+// v1_12,
+// v1_13,
+//
+// v1_14,
+// v1_15,
+// v1_16
+// ;
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/util/ObsoleteBlockType.java b/prison-core/src/main/java/tech/mcprison/prison/util/ObsoleteBlockType.java
index cbf4e6c34..dcc24c53e 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/util/ObsoleteBlockType.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/ObsoleteBlockType.java
@@ -18,10 +18,6 @@
package tech.mcprison.prison.util;
-import java.util.ArrayList;
-import java.util.List;
-
-
/**
*
All of the old blocks in the game. This list is obsolete, and was used in
* v3.2.0 and earlier. It because obsolete with the new block model which was
@@ -54,1267 +50,7 @@
@Deprecated
public enum ObsoleteBlockType {
- /**
- * Identifying a block as a MaterialType.BLOCK will allow the
- * block search to only show entries that will be placable within a mine.
- *
- * Cannot dynamically check for blocks at run time since each major version
- * has slightly different sets and the names of this enum do not match the names
- * of the Material.
- */
-
- IGNORE( -1, "prison:ignore", -1, MaterialType.BLOCK ),
- NULL_BLOCK( -2, "prison:null_block", -1, MaterialType.INVALID ),
-
-
- // This was auto-generated from WorldEdit's blocks.json
- // @formatter:off
-
-
- // NOTE: Double slabs are ones that players cannot naturally place, and they are
- // similar to the main block type. It appears like they have been replaced,
- // but not sure with what. I suspect no one will use them anyway, and if they
- // do, then mapping them to their counter part block. There are a few doubles
- // that have been mapped to "smooth" in the later versions, so they are used when
- // possible.
-
-
- DOUBLE_STONE_SLAB( 43, "minecraft:double_stone_slab", 0, MaterialType.BLOCK, "smooth_stone" ),
- DOUBLE_SANDSTONE_SLAB( 43, "minecraft:double_stone_slab", 1, MaterialType.BLOCK, "smooth_sandstone_slab" ),
- DOUBLE_WOODEN_SLAB( 43, "minecraft:double_stone_slab", 2, MaterialType.BLOCK, "OAK_PLANKS" ),
- DOUBLE_COBBLESTONE_SLAB( 43, "minecraft:double_stone_slab", 3, MaterialType.BLOCK, "COBBLESTONE" ),
- DOUBLE_BRICK_SLAB( 43, "minecraft:double_stone_slab", 4, MaterialType.BLOCK, "BRICKS" ),
- DOUBLE_STONE_BRICK_SLAB( 43, "minecraft:double_stone_slab", 5, MaterialType.BLOCK, "STONE_BRICKS" ),
- DOUBLE_NETHER_BRICK_SLAB( 43, "minecraft:double_stone_slab", 6, MaterialType.BLOCK, "NETHER_BRICKS" ),
- DOUBLE_QUARTZ_SLAB( 43, "minecraft:double_stone_slab", 7, MaterialType.BLOCK, "SMOOTH_QUARTZ" ),
-
- DOUBLE_OAK_WOOD_SLAB( 125, "minecraft:double_wooden_slab", 0, MaterialType.BLOCK, "OAK_PLANKS" ),
- DOUBLE_SPRUCE_WOOD_SLAB( 125, "minecraft:double_wooden_slab", 1, MaterialType.BLOCK, "SPRUCE_PLANKS" ),
- DOUBLE_BIRCH_WOOD_SLAB( 125, "minecraft:double_wooden_slab", 2, MaterialType.BLOCK, "BIRCH_PLANKS" ),
- DOUBLE_JUNGLE_WOOD_SLAB( 125, "minecraft:double_wooden_slab", 3, MaterialType.BLOCK, "JUNGLE_PLANKS" ),
- DOUBLE_ACACIA_WOOD_SLAB( 125, "minecraft:double_wooden_slab", 4, MaterialType.BLOCK, "ACACIA_PLANKS" ),
- DOUBLE_DARK_OAK_WOOD_SLAB( 125, "minecraft:double_wooden_slab", 5, MaterialType.BLOCK, "DARK_OAK_PLANKS" ),
-
- DOUBLE_RED_SANDSTONE_SLAB( 181, "minecraft:double_stone_slab2", 0, MaterialType.BLOCK, "RED_SANDSTONE" ),
- PURPUR_DOUBLE_SLAB( 204, "minecraft:purpur_double_slab", 0, MaterialType.BLOCK, "PURPUR_BLOCK" ),
-
-
-
- AIR( 0, "minecraft:air", 0, MaterialType.BLOCK ),
- STONE( 1, "minecraft:stone", 0, MaterialType.BLOCK ),
- GRANITE( 1, "minecraft:stone", 1, MaterialType.BLOCK ),
- POLISHED_GRANITE( 1, "minecraft:stone", 2, MaterialType.BLOCK ),
- DIORITE( 1, "minecraft:stone", 3, MaterialType.BLOCK ),
- POLISHED_DIORITE( 1, "minecraft:stone", 4, MaterialType.BLOCK ),
- ANDESITE( 1, "minecraft:stone", 5, MaterialType.BLOCK ),
- POLISHED_ANDESITE( 1, "minecraft:stone", 6, MaterialType.BLOCK ),
-
- GRASS( 2, "minecraft:grass", 0, MaterialType.BLOCK ),
- GRASS_BLOCK( 2, "minecraft:grass_block", 0, MaterialType.BLOCK ),
-
- DIRT( 3, "minecraft:dirt", 0, MaterialType.BLOCK ),
- COARSE_DIRT( 3, "minecraft:dirt", 1, MaterialType.BLOCK ),
- PODZOL( 3, "minecraft:dirt", 2, MaterialType.BLOCK ),
- COBBLESTONE( 4, "minecraft:cobblestone", 0, MaterialType.BLOCK ),
-
- OAK_WOOD_PLANK( 5, "minecraft:planks", 0, MaterialType.BLOCK, "OAK_PLANKS" ),
- SPRUCE_WOOD_PLANK( 5, "minecraft:planks", 1, MaterialType.BLOCK, "SPRUCE_PLANKS" ),
- BIRCH_WOOD_PLANK( 5, "minecraft:planks", 2, MaterialType.BLOCK, "BIRCH_PLANKS" ),
- JUNGLE_WOOD_PLANK( 5, "minecraft:planks", 3, MaterialType.BLOCK, "JUNGLE_PLANKS" ),
- ACACIA_WOOD_PLANK( 5, "minecraft:planks", 4, MaterialType.BLOCK, "ACACIA_PLANKS" ),
- DARK_OAK_WOOD_PLANK( 5, "minecraft:planks", 5, MaterialType.BLOCK, "DARK_OAK_PLANKS" ),
-
- OAK_SAPLING( 6, "minecraft:sapling", 0, MaterialType.BLOCK ),
- SPRUCE_SAPLING( 6, "minecraft:sapling", 1, MaterialType.BLOCK ),
- BIRCH_SAPLING( 6, "minecraft:sapling", 2, MaterialType.BLOCK ),
- JUNGLE_SAPLING( 6, "minecraft:sapling", 3, MaterialType.BLOCK ),
- ACACIA_SAPLING( 6, "minecraft:sapling", 4, MaterialType.BLOCK ),
- DARK_OAK_SAPLING( 6, "minecraft:sapling", 5, MaterialType.BLOCK ),
- BEDROCK( 7, "minecraft:bedrock", 0, MaterialType.BLOCK ),
-
- FLOWING_WATER( 8, "minecraft:flowing_water", 0, MaterialType.BLOCK, "WATER" ),
-
- STILL_WATER( 9, "minecraft:water", 0, MaterialType.BLOCK, "STATIONARY_WATER"),
-
- STATIONARY_WATER_01( 9, "minecraft:water", 1, MaterialType.BLOCK, "STATIONARY_WATER"),
- STATIONARY_WATER_02( 9, "minecraft:water", 2, MaterialType.BLOCK, "STATIONARY_WATER"),
- STATIONARY_WATER_03( 9, "minecraft:water", 3, MaterialType.BLOCK, "STATIONARY_WATER"),
- STATIONARY_WATER_04( 9, "minecraft:water", 4, MaterialType.BLOCK, "STATIONARY_WATER"),
- STATIONARY_WATER_05( 9, "minecraft:water", 5, MaterialType.BLOCK, "STATIONARY_WATER"),
- STATIONARY_WATER_06( 9, "minecraft:water", 6, MaterialType.BLOCK, "STATIONARY_WATER"),
- STATIONARY_WATER_07( 9, "minecraft:water", 7, MaterialType.BLOCK, "STATIONARY_WATER"),
- STATIONARY_WATER_08( 9, "minecraft:water", 8, MaterialType.BLOCK, "STATIONARY_WATER"),
- STATIONARY_WATER_09( 9, "minecraft:water", 9, MaterialType.BLOCK, "STATIONARY_WATER"),
- STATIONARY_WATER_10( 9, "minecraft:water", 10, MaterialType.BLOCK, "STATIONARY_WATER"),
-
-
- FLOWING_LAVA( 10, "minecraft:flowing_lava", 0, MaterialType.BLOCK, "LAVA" ),
- STILL_LAVA( 11, "minecraft:lava", 0, MaterialType.BLOCK ),
-
- SAND( 12, "minecraft:sand", 0, MaterialType.BLOCK ),
- RED_SAND( 12, "minecraft:sand", 1, MaterialType.BLOCK ),
- GRAVEL( 13, "minecraft:gravel", 0, MaterialType.BLOCK ),
- GOLD_ORE( 14, "minecraft:gold_ore", 0, MaterialType.BLOCK ),
- IRON_ORE( 15, "minecraft:iron_ore", 0, MaterialType.BLOCK ),
- COAL_ORE( 16, "minecraft:coal_ore", 0, MaterialType.BLOCK ),
-
- OAK_WOOD( 17, "minecraft:log", 0, MaterialType.BLOCK ),
- SPRUCE_WOOD( 17, "minecraft:log", 1, MaterialType.BLOCK ),
- BIRCH_WOOD( 17, "minecraft:log", 2, MaterialType.BLOCK ),
- JUNGLE_WOOD( 17, "minecraft:log", 3, MaterialType.BLOCK, "jungle_planks" ),
-
- OAK_LEAVES( 18, "minecraft:leaves", 0, MaterialType.BLOCK ),
- SPRUCE_LEAVES( 18, "minecraft:leaves", 1, MaterialType.BLOCK ),
- BIRCH_LEAVES( 18, "minecraft:leaves", 2, MaterialType.BLOCK ),
- JUNGLE_LEAVES( 18, "minecraft:leaves", 3, MaterialType.BLOCK ),
-
- SPONGE( 19, "minecraft:sponge", 0, MaterialType.BLOCK ),
- WET_SPONGE( 19, "minecraft:sponge", 1, MaterialType.BLOCK ),
- GLASS( 20, "minecraft:glass", 0, MaterialType.BLOCK ),
-
-
- LAPIS_ORE( 21, "minecraft:lapis_ore", 0, MaterialType.BLOCK, "LAPIS_LAZULI_ORE" ),
- LAPIS_LAZULI_ORE( 21, "minecraft:lapis_ore", 0, MaterialType.BLOCK ), // obsolete...
-
- LAPIS_BLOCK( 22, "minecraft:lapis_block", 0, MaterialType.BLOCK, "LAPIS_LAZULI_BLOCK" ),
- LAPIS_LAZULI_BLOCK( 22, "minecraft:lapis_block", 0, MaterialType.BLOCK ), // obsolete...
-
- DISPENSER( 23, "minecraft:dispenser", 0, MaterialType.BLOCK ),
- SANDSTONE( 24, "minecraft:sandstone", 0, MaterialType.BLOCK ),
- CHISELED_SANDSTONE( 24, "minecraft:sandstone", 1, MaterialType.BLOCK ),
- SMOOTH_SANDSTONE( 24, "minecraft:sandstone", 2, MaterialType.BLOCK ),
- NOTE_BLOCK( 25, "minecraft:noteblock", 0, MaterialType.BLOCK ),
- BED( 26, "minecraft:bed", 0 ),
- POWERED_RAIL( 27, "minecraft:golden_rail", 0, MaterialType.BLOCK ),
- DETECTOR_RAIL( 28, "minecraft:detector_rail", 0, MaterialType.BLOCK ),
- STICKY_PISTON( 29, "minecraft:sticky_piston", 0, MaterialType.BLOCK ),
- COBWEB( 30, "minecraft:web", 0, MaterialType.BLOCK ),
- DEAD_SHRUB( 31, "minecraft:tallgrass", 0, MaterialType.BLOCK, "DEAD_BUSH" ),
- TALL_GRASS( 31, "minecraft:tallgrass", 1, MaterialType.BLOCK ),
- FERN( 31, "minecraft:tallgrass", 2, MaterialType.BLOCK ),
- DEAD_BUSH( 32, "minecraft:deadbush", 0, MaterialType.BLOCK, "DEAD_BUSH" ),
- PISTON( 33, "minecraft:piston", 0, MaterialType.BLOCK ),
- PISTON_HEAD( 34, "minecraft:piston_head", 0, MaterialType.BLOCK ),
- WHITE_WOOL( 35, "minecraft:wool", 0, MaterialType.BLOCK ),
- ORANGE_WOOL( 35, "minecraft:wool", 1, MaterialType.BLOCK ),
- MAGENTA_WOOL( 35, "minecraft:wool", 2, MaterialType.BLOCK ),
- LIGHT_BLUE_WOOL( 35, "minecraft:wool", 3, MaterialType.BLOCK ),
- YELLOW_WOOL( 35, "minecraft:wool", 4, MaterialType.BLOCK ),
- LIME_WOOL( 35, "minecraft:wool", 5, MaterialType.BLOCK ),
- PINK_WOOL( 35, "minecraft:wool", 6, MaterialType.BLOCK ),
- GRAY_WOOL( 35, "minecraft:wool", 7, MaterialType.BLOCK ),
- LIGHT_GRAY_WOOL( 35, "minecraft:wool", 8, MaterialType.BLOCK ),
- CYAN_WOOL( 35, "minecraft:wool", 9, MaterialType.BLOCK ),
- PURPLE_WOOL( 35, "minecraft:wool", 10, MaterialType.BLOCK ),
- BLUE_WOOL( 35, "minecraft:wool", 11, MaterialType.BLOCK ),
- BROWN_WOOL( 35, "minecraft:wool", 12, MaterialType.BLOCK ),
- GREEN_WOOL( 35, "minecraft:wool", 13, MaterialType.BLOCK ),
- RED_WOOL( 35, "minecraft:wool", 14, MaterialType.BLOCK ),
- BLACK_WOOL( 35, "minecraft:wool", 15, MaterialType.BLOCK ),
-
- DANDELION( 37, "minecraft:yellow_flower", 0, MaterialType.BLOCK ),
- POPPY( 38, "minecraft:red_flower", 0, MaterialType.BLOCK, "RED_ROSE" ),
- BLUE_ORCHID( 38, "minecraft:red_flower", 1, MaterialType.BLOCK ),
- ALLIUM( 38, "minecraft:red_flower", 2, MaterialType.BLOCK ),
- AZURE_BLUET( 38, "minecraft:red_flower", 3, MaterialType.BLOCK, "AZURE_BLUET" ),
- RED_TULIP( 38, "minecraft:red_flower", 4, MaterialType.BLOCK ),
- ORANGE_TULIP( 38, "minecraft:red_flower", 5, MaterialType.BLOCK ),
- WHITE_TULIP( 38, "minecraft:red_flower", 6, MaterialType.BLOCK ),
- PINK_TULIP( 38, "minecraft:red_flower", 7, MaterialType.BLOCK ),
- OXEYE_DAISY( 38, "minecraft:red_flower", 8, MaterialType.BLOCK ),
- BROWN_MUSHROOM( 39, "minecraft:brown_mushroom", 0, MaterialType.BLOCK ),
- RED_MUSHROOM( 40, "minecraft:red_mushroom", 0, MaterialType.BLOCK ),
- GOLD_BLOCK( 41, "minecraft:gold_block", 0, MaterialType.BLOCK ),
- IRON_BLOCK( 42, "minecraft:iron_block", 0, MaterialType.BLOCK ),
-
-
- STONE_SLAB( 44, "minecraft:stone_slab", 0, MaterialType.BLOCK ),
- SANDSTONE_SLAB( 44, "minecraft:stone_slab", 1, MaterialType.BLOCK ),
- WOODEN_SLAB( 44, "minecraft:stone_slab", 2, MaterialType.BLOCK ),
- COBBLESTONE_SLAB( 44, "minecraft:stone_slab", 3, MaterialType.BLOCK ),
- BRICK_SLAB( 44, "minecraft:stone_slab", 4, MaterialType.BLOCK, "STONE_BRICK_SLAB" ),
- STONE_BRICK_SLAB( 44, "minecraft:stone_slab", 5, MaterialType.BLOCK ),
- NETHER_BRICK_SLAB( 44, "minecraft:stone_slab", 6, MaterialType.BLOCK ),
- QUARTZ_SLAB( 44, "minecraft:stone_slab", 7, MaterialType.BLOCK ),
- BRICKS( 45, "minecraft:brick_block", 0, MaterialType.BLOCK ),
- TNT( 46, "minecraft:tnt", 0, MaterialType.BLOCK ),
- BOOKSHELF( 47, "minecraft:bookshelf", 0, MaterialType.BLOCK ),
-
- MOSSY_COBBLESTONE( 48, "minecraft:mossy_cobblestone", 0, MaterialType.BLOCK, "MOSSY_COBBLESTONE" ),
- MOSS_STONE( 48, "minecraft:mossy_cobblestone", 0, MaterialType.BLOCK, "MOSSY_COBBLESTONE", "MOSS_STONE" ),
-
- OBSIDIAN( 49, "minecraft:obsidian", 0, MaterialType.BLOCK ),
- TORCH( 50, "minecraft:torch", 0, MaterialType.BLOCK ),
- FIRE( 51, "minecraft:fire", 0, MaterialType.BLOCK ),
- MONSTER_SPAWNER( 52, "minecraft:mob_spawner", 0, MaterialType.BLOCK ),
- OAK_WOOD_STAIRS( 53, "minecraft:oak_stairs", 0, MaterialType.BLOCK ),
- CHEST( 54, "minecraft:chest", 0, MaterialType.BLOCK ),
- REDSTONE_WIRE( 55, "minecraft:redstone_wire", 0, MaterialType.BLOCK ),
- DIAMOND_ORE( 56, "minecraft:diamond_ore", 0, MaterialType.BLOCK ),
- DIAMOND_BLOCK( 57, "minecraft:diamond_block", 0, MaterialType.BLOCK ),
- CRAFTING_TABLE( 58, "minecraft:crafting_table", 0, MaterialType.BLOCK ),
- WHEAT_CROPS( 59, "minecraft:wheat", 0, MaterialType.BLOCK ),
- FARMLAND( 60, "minecraft:farmland", 0, MaterialType.BLOCK ),
- FURNACE( 61, "minecraft:furnace", 0, MaterialType.BLOCK ),
- BURNING_FURNACE( 62, "minecraft:lit_furnace", 0, MaterialType.BLOCK ),
- STANDING_SIGN_BLOCK( 63, "minecraft:standing_sign", 0, MaterialType.BLOCK, "OAK_SIGN" ),
- OAK_DOOR_BLOCK( 64, "minecraft:wooden_door", 0, MaterialType.BLOCK ),
- LADDER( 65, "minecraft:ladder", 0, MaterialType.BLOCK ),
- RAIL( 66, "minecraft:rail", 0, MaterialType.BLOCK ),
- COBBLESTONE_STAIRS( 67, "minecraft:stone_stairs", 0, MaterialType.BLOCK ),
- WALL_MOUNTED_SIGN_BLOCK( 68, "minecraft:wall_sign", 0 ),
- LEVER( 69, "minecraft:lever", 0, MaterialType.BLOCK ),
- STONE_PRESSURE_PLATE( 70, "minecraft:stone_pressure_plate", 0, MaterialType.BLOCK ),
- IRON_DOOR_BLOCK( 71, "minecraft:iron_door", 0, MaterialType.BLOCK ),
-
- WOODEN_PRESSURE_PLATE( 72, "minecraft:wooden_pressure_plate", 0, MaterialType.BLOCK,
- "OAK_PRESSURE_PLATE", "WOOD_PLATE" ),
- REDSTONE_ORE( 73, "minecraft:redstone_ore", 0, MaterialType.BLOCK ),
-
- GLOWING_REDSTONE_ORE( 74, "minecraft:lit_redstone_ore", 0, MaterialType.BLOCK ),
- REDSTONE_TORCH_OFF( 75, "minecraft:unlit_redstone_torch", 0, MaterialType.BLOCK ),
- REDSTONE_TORCH_ON( 76, "minecraft:redstone_torch", 0, MaterialType.BLOCK ),
- STONE_BUTTON( 77, "minecraft:stone_button", 0, MaterialType.BLOCK ),
-
- SNOW( 78, "minecraft:snow_layer", 0, MaterialType.BLOCK ),
- ICE( 79, "minecraft:ice", 0, MaterialType.BLOCK ),
- SNOW_BLOCK( 80, "minecraft:snow", 0, MaterialType.BLOCK ),
-
- CACTUS( 81, "minecraft:cactus", 0, MaterialType.BLOCK ),
-
- CLAY( 82, "minecraft:clay", 0, MaterialType.BLOCK, "HARD_CLAY" ),
- SUGAR_CANES( 83, "minecraft:reeds", 0, MaterialType.BLOCK, "SUGAR_CANE", "SUGAR_CANE_BLOCK" ),
- JUKEBOX( 84, "minecraft:jukebox", 0, MaterialType.BLOCK ),
- OAK_FENCE( 85, "minecraft:fence", 0, MaterialType.BLOCK ),
- PUMPKIN( 86, "minecraft:pumpkin", 0, MaterialType.BLOCK ),
- NETHERRACK( 87, "minecraft:netherrack", 0, MaterialType.BLOCK ),
-
- SOUL_SAND( 88, "minecraft:soul_sand", 0, MaterialType.BLOCK ),
- GLOWSTONE( 89, "minecraft:glowstone", 0, MaterialType.BLOCK ),
- NETHER_PORTAL( 90, "minecraft:portal", 0, MaterialType.BLOCK ),
-
- JACK_OLANTERN( 91, "minecraft:lit_pumpkin", 0, MaterialType.BLOCK, "jack_o_lantern" ),
-
- CAKE_BLOCK( 92, "minecraft:cake", 0, MaterialType.BLOCK ),
-
- REDSTONE_REPEATER_BLOCK_OFF( 93, "minecraft:unpowered_repeater", 0, MaterialType.BLOCK, "REPEATER" ),
- REDSTONE_REPEATER_BLOCK_ON( 94, "minecraft:powered_repeater", 0, MaterialType.BLOCK, "REPEATER" ),
-
- WHITE_STAINED_GLASS( 95, "minecraft:stained_glass", 0, MaterialType.BLOCK ),
- ORANGE_STAINED_GLASS( 95, "minecraft:stained_glass", 1, MaterialType.BLOCK ),
- MAGENTA_STAINED_GLASS( 95, "minecraft:stained_glass", 2, MaterialType.BLOCK ),
- LIGHT_BLUE_STAINED_GLASS( 95, "minecraft:stained_glass", 3, MaterialType.BLOCK ),
- YELLOW_STAINED_GLASS( 95, "minecraft:stained_glass", 4, MaterialType.BLOCK ),
- LIME_STAINED_GLASS( 95, "minecraft:stained_glass", 5, MaterialType.BLOCK ),
- PINK_STAINED_GLASS( 95, "minecraft:stained_glass", 6, MaterialType.BLOCK ),
- GRAY_STAINED_GLASS( 95, "minecraft:stained_glass", 7, MaterialType.BLOCK ),
- LIGHT_GRAY_STAINED_GLASS( 95, "minecraft:stained_glass", 8, MaterialType.BLOCK ),
- CYAN_STAINED_GLASS( 95, "minecraft:stained_glass", 9, MaterialType.BLOCK ),
- PURPLE_STAINED_GLASS( 95, "minecraft:stained_glass", 10, MaterialType.BLOCK ),
- BLUE_STAINED_GLASS( 95, "minecraft:stained_glass", 11, MaterialType.BLOCK ),
- BROWN_STAINED_GLASS( 95, "minecraft:stained_glass", 12, MaterialType.BLOCK ),
- GREEN_STAINED_GLASS( 95, "minecraft:stained_glass", 13, MaterialType.BLOCK ),
- RED_STAINED_GLASS( 95, "minecraft:stained_glass", 14, MaterialType.BLOCK ),
- BLACK_STAINED_GLASS( 95, "minecraft:stained_glass", 15, MaterialType.BLOCK ),
- WOODEN_TRAPDOOR( 96, "minecraft:trapdoor", 0, MaterialType.BLOCK, "oak_trapdoor" ),
-
- STONE_MONSTER_EGG( 97, "minecraft:monster_egg", 0, MaterialType.BLOCK, "INFESTED_STONE" ),
- COBBLESTONE_MONSTER_EGG( 97, "minecraft:monster_egg", 1, MaterialType.BLOCK, "INFESTED_COBBLESTONE" ),
- STONE_BRICK_MONSTER_EGG( 97, "minecraft:monster_egg", 2, MaterialType.BLOCK, "INFESTED_STONE_BRICKS" ),
- MOSSY_STONE_BRICK_MONSTER_EGG( 97, "minecraft:monster_egg", 3, MaterialType.BLOCK, "INFESTED_MOSSY_STONE_BRICKS" ),
- CRACKED_STONE_BRICK_MONSTER_EGG( 97, "minecraft:monster_egg", 4, MaterialType.BLOCK, "INFESTED_CRACKED_STONE_BRICKS" ),
- CHISELED_STONE_BRICK_MONSTER_EGG( 97, "minecraft:monster_egg", 5, MaterialType.BLOCK, "INFESTED_CHISELED_STONE_BRICKS" ),
-
- STONE_BRICKS( 98, "minecraft:stonebrick", 0, MaterialType.BLOCK, "STONE_BRICKS" ),
- MOSSY_STONE_BRICKS( 98, "minecraft:stonebrick", 1, MaterialType.BLOCK, "MOSSY_STONE_BRICKS" ),
- CRACKED_STONE_BRICKS( 98, "minecraft:stonebrick", 2, MaterialType.BLOCK, "CRACKED_STONE_BRICKS" ),
- CHISELED_STONE_BRICKS( 98, "minecraft:stonebrick", 3, MaterialType.BLOCK, "CHISELED_STONE_BRICKS" ),
-
- BROWN_MUSHROOM_BLOCK( 99, "minecraft:brown_mushroom_block", 0, MaterialType.BLOCK ),
- HUGE_MUSHROOM_1( 99, "minecraft:brown_mushroom_block", 14, MaterialType.BLOCK ),
- RED_MUSHROOM_BLOCK( 100, "minecraft:red_mushroom_block", 0, MaterialType.BLOCK ),
- HUGE_MUSHROOM_2( 100, "minecraft:red_mushroom_block", 14, MaterialType.BLOCK ),
-
- IRON_BARS( 101, "minecraft:iron_bars", 0, MaterialType.BLOCK ),
- GLASS_PANE( 102, "minecraft:glass_pane", 0, MaterialType.BLOCK ),
- MELON_BLOCK( 103, "minecraft:melon_block", 0, MaterialType.BLOCK ),
- PUMPKIN_STEM( 104, "minecraft:pumpkin_stem", 0, MaterialType.BLOCK ),
- MELON_STEM( 105, "minecraft:melon_stem", 0, MaterialType.BLOCK ),
- VINES( 106, "minecraft:vine", 0, MaterialType.BLOCK ),
- OAK_FENCE_GATE( 107, "minecraft:fence_gate", 0, MaterialType.BLOCK ),
- BRICK_STAIRS( 108, "minecraft:brick_stairs", 0, MaterialType.BLOCK ),
- STONE_BRICK_STAIRS( 109, "minecraft:stone_brick_stairs", 0, MaterialType.BLOCK ),
- MYCELIUM( 110, "minecraft:mycelium", 0, MaterialType.BLOCK ),
- LILY_PAD( 111, "minecraft:waterlily", 0, MaterialType.ITEM ),
-
- NETHER_BRICK( 112, "minecraft:nether_brick", 0, MaterialType.ITEM ),
- NETHER_BRICK_FENCE( 113, "minecraft:nether_brick_fence", 0, MaterialType.BLOCK ),
- NETHER_BRICK_STAIRS( 114, "minecraft:nether_brick_stairs", 0, MaterialType.BLOCK ),
- NETHER_WART( 115, "minecraft:nether_wart", 0, MaterialType.ITEM ),
- ENCHANTMENT_TABLE( 116, "minecraft:enchanting_table", 0, MaterialType.BLOCK ),
- BREWING_STAND( 117, "minecraft:brewing_stand", 0, MaterialType.BLOCK ),
- CAULDRON( 118, "minecraft:cauldron", 0, MaterialType.BLOCK),
- END_PORTAL( 119, "minecraft:end_portal", 0 ),
- END_PORTAL_FRAME( 120, "minecraft:end_portal_frame", 0, MaterialType.BLOCK ),
- END_STONE( 121, "minecraft:end_stone", 0, MaterialType.BLOCK ),
- DRAGON_EGG( 122, "minecraft:dragon_egg", 0, MaterialType.ITEM ),
-
- REDSTONE_LAMP_INACTIVE( 123, "minecraft:redstone_lamp", 0, MaterialType.BLOCK, "REDSTONE_LAMP_OFF" ),
- REDSTONE_LAMP_ACTIVE( 124, "minecraft:lit_redstone_lamp", 0, MaterialType.BLOCK, "REDSTONE_LAMP", "REDSTONE_LAMP_ON" ),
-
-
- OAK_WOOD_SLAB( 126, "minecraft:wooden_slab", 0, MaterialType.BLOCK ),
- SPRUCE_WOOD_SLAB( 126, "minecraft:wooden_slab", 1, MaterialType.BLOCK ),
- BIRCH_WOOD_SLAB( 126, "minecraft:wooden_slab", 2, MaterialType.BLOCK ),
- JUNGLE_WOOD_SLAB( 126, "minecraft:wooden_slab", 3, MaterialType.BLOCK ),
- ACACIA_WOOD_SLAB( 126, "minecraft:wooden_slab", 4, MaterialType.BLOCK ),
- DARK_OAK_WOOD_SLAB( 126, "minecraft:wooden_slab", 5, MaterialType.BLOCK ),
- COCOA( 127, "minecraft:cocoa", 0, MaterialType.BLOCK ),
- SANDSTONE_STAIRS( 128, "minecraft:sandstone_stairs", 0, MaterialType.BLOCK ),
- EMERALD_ORE( 129, "minecraft:emerald_ore", 0, MaterialType.BLOCK ),
- ENDER_CHEST( 130, "minecraft:ender_chest", 0, MaterialType.BLOCK ),
- TRIPWIRE_HOOK( 131, "minecraft:tripwire_hook", 0, MaterialType.BLOCK ),
- TRIPWIRE( 132, "minecraft:tripwire_hook", 0, MaterialType.BLOCK ),
- EMERALD_BLOCK( 133, "minecraft:emerald_block", 0, MaterialType.BLOCK ),
- SPRUCE_WOOD_STAIRS( 134, "minecraft:spruce_stairs", 0, MaterialType.BLOCK ),
- BIRCH_WOOD_STAIRS( 135, "minecraft:birch_stairs", 0, MaterialType.BLOCK ),
- JUNGLE_WOOD_STAIRS( 136, "minecraft:jungle_stairs", 0, MaterialType.BLOCK ),
- COMMAND_BLOCK( 137, "minecraft:command_block", 0 ),
- BEACON( 138, "minecraft:beacon", 0, MaterialType.BLOCK ),
- COBBLESTONE_WALL( 139, "minecraft:cobblestone_wall", 0, MaterialType.BLOCK ),
- MOSSY_COBBLESTONE_WALL( 139, "minecraft:cobblestone_wall", 1, MaterialType.BLOCK ),
- FLOWER_POT( 140, "minecraft:flower_pot", 0, MaterialType.BLOCK ),
- CARROTS( 141, "minecraft:carrots", 0, MaterialType.BLOCK ),
- POTATOES( 142, "minecraft:potatoes", 0, MaterialType.BLOCK ),
- WOODEN_BUTTON( 143, "minecraft:wooden_button", 0, MaterialType.BLOCK, "OAK_BUTTON", "wood_button" ),
- MOB_HEAD( 144, "minecraft:skull", 0, MaterialType.BLOCK ),
- ANVIL( 145, "minecraft:anvil", 0, MaterialType.BLOCK ),
- TRAPPED_CHEST( 146, "minecraft:trapped_chest", 0, MaterialType.BLOCK ),
- WEIGHTED_PRESSURE_PLATE_LIGHT( 147, "minecraft:light_weighted_pressure_plate", 0, MaterialType.BLOCK ),
- WEIGHTED_PRESSURE_PLATE_HEAVY( 148, "minecraft:heavy_weighted_pressure_plate", 0, MaterialType.BLOCK ),
-
- REDSTONE_COMPARATOR_INACTIVE( 149, "minecraft:unpowered_comparator", 0, MaterialType.BLOCK, "COMPARATOR" ),
- REDSTONE_COMPARATOR_ACTIVE( 150, "minecraft:powered_comparator", 0, MaterialType.BLOCK, "COMPARATOR" ),
-
- DAYLIGHT_SENSOR( 151, "minecraft:daylight_detector", 0, MaterialType.BLOCK ),
- REDSTONE_BLOCK( 152, "minecraft:redstone_block", 0, MaterialType.BLOCK ),
- NETHER_QUARTZ_ORE( 153, "minecraft:quartz_ore", 0, MaterialType.BLOCK ),
- HOPPER( 154, "minecraft:hopper", 0, MaterialType.BLOCK ),
- QUARTZ_BLOCK( 155, "minecraft:quartz_block", 0, MaterialType.BLOCK ),
- CHISELED_QUARTZ_BLOCK( 155, "minecraft:quartz_block", 1, MaterialType.BLOCK ),
-
- PILLAR_QUARTZ_BLOCK( 155, "minecraft:quartz_block", 2, MaterialType.BLOCK, "QUARTZ_PILLAR" ),
-
- QUARTZ_STAIRS( 156, "minecraft:quartz_stairs", 0, MaterialType.BLOCK ),
- ACTIVATOR_RAIL( 157, "minecraft:activator_rail", 0, MaterialType.BLOCK ),
- DROPPER( 158, "minecraft:dropper", 0, MaterialType.BLOCK ),
-
- WHITE_STAINED_CLAY( 159, "minecraft:stained_hardened_clay", 0, MaterialType.BLOCK, "WHITE_TERRACOTTA" ),
- ORANGE_STAINED_CLAY( 159, "minecraft:stained_hardened_clay", 1, MaterialType.BLOCK, "ORANGE_TERRACOTTA" ),
- MAGENTA_STAINED_CLAY( 159, "minecraft:stained_hardened_clay", 2, MaterialType.BLOCK, "MAGENTA_TERRACOTTA" ),
- LIGHT_BLUE_STAINED_CLAY( 159, "minecraft:stained_hardened_clay", 3, MaterialType.BLOCK, "LIGHT_BLUE_TERRACOTTA" ),
- YELLOW_STAINED_CLAY( 159, "minecraft:stained_hardened_clay", 4, MaterialType.BLOCK, "YELLOW_TERRACOTTA" ),
- LIME_STAINED_CLAY( 159, "minecraft:stained_hardened_clay", 5, MaterialType.BLOCK, "LIME_TERRACOTTA" ),
- PINK_STAINED_CLAY( 159, "minecraft:stained_hardened_clay", 6, MaterialType.BLOCK, "PINK_TERRACOTTA" ),
- GRAY_STAINED_CLAY( 159, "minecraft:stained_hardened_clay", 7, MaterialType.BLOCK, "GRAY_TERRACOTTA" ),
- LIGHT_GRAY_STAINED_CLAY( 159, "minecraft:stained_hardened_clay", 8, MaterialType.BLOCK, "LIGHT_GRAY_TERRACOTTA" ),
- CYAN_STAINED_CLAY( 159, "minecraft:stained_hardened_clay", 9, MaterialType.BLOCK, "CYAN_TERRACOTTA" ),
- PURPLE_STAINED_CLAY( 159, "minecraft:stained_hardened_clay", 10, MaterialType.BLOCK, "PURPLE_TERRACOTTA" ),
- BLUE_STAINED_CLAY( 159, "minecraft:stained_hardened_clay", 11, MaterialType.BLOCK, "BLUE_TERRACOTTA" ),
- BROWN_STAINED_CLAY( 159, "minecraft:stained_hardened_clay", 12, MaterialType.BLOCK, "BROWN_TERRACOTTA" ),
- GREEN_STAINED_CLAY( 159, "minecraft:stained_hardened_clay", 13, MaterialType.BLOCK, "GREEN_TERRACOTTA" ),
- RED_STAINED_CLAY( 159, "minecraft:stained_hardened_clay", 14, MaterialType.BLOCK, "RED_TERRACOTTA" ),
- BLACK_STAINED_CLAY( 159, "minecraft:stained_hardened_clay", 15, MaterialType.BLOCK, "BLACK_TERRACOTTA" ),
-
- WHITE_STAINED_GLASS_PANE( 160, "minecraft:stained_glass_pane", 0, MaterialType.BLOCK ),
- ORANGE_STAINED_GLASS_PANE( 160, "minecraft:stained_glass_pane", 1, MaterialType.BLOCK ),
- MAGENTA_STAINED_GLASS_PANE( 160, "minecraft:stained_glass_pane", 2, MaterialType.BLOCK ),
- LIGHT_BLUE_STAINED_GLASS_PANE( 160, "minecraft:stained_glass_pane", 3, MaterialType.BLOCK ),
- YELLOW_STAINED_GLASS_PANE( 160, "minecraft:stained_glass_pane", 4, MaterialType.BLOCK ),
- LIME_STAINED_GLASS_PANE( 160, "minecraft:stained_glass_pane", 5, MaterialType.BLOCK ),
- PINK_STAINED_GLASS_PANE( 160, "minecraft:stained_glass_pane", 6, MaterialType.BLOCK ),
- GRAY_STAINED_GLASS_PANE( 160, "minecraft:stained_glass_pane", 7, MaterialType.BLOCK ),
- LIGHT_GRAY_STAINED_GLASS_PANE( 160, "minecraft:stained_glass_pane", 8, MaterialType.BLOCK ),
- CYAN_STAINED_GLASS_PANE( 160, "minecraft:stained_glass_pane", 9, MaterialType.BLOCK ),
- PURPLE_STAINED_GLASS_PANE( 160, "minecraft:stained_glass_pane", 10, MaterialType.BLOCK ),
- BLUE_STAINED_GLASS_PANE( 160, "minecraft:stained_glass_pane", 11, MaterialType.BLOCK ),
- BROWN_STAINED_GLASS_PANE( 160, "minecraft:stained_glass_pane", 12, MaterialType.BLOCK ),
- GREEN_STAINED_GLASS_PANE( 160, "minecraft:stained_glass_pane", 13, MaterialType.BLOCK ),
- RED_STAINED_GLASS_PANE( 160, "minecraft:stained_glass_pane", 14, MaterialType.BLOCK ),
- BLACK_STAINED_GLASS_PANE( 160, "minecraft:stained_glass_pane", 15, MaterialType.BLOCK ),
-
- ACACIA_LEAVES( 161, "minecraft:leaves2", 0, MaterialType.BLOCK, "ACACIA_LEAVES" ),
- DARK_OAK_LEAVES( 161, "minecraft:leaves2", 1, MaterialType.BLOCK ),
- ACACIA_WOOD( 162, "minecraft:log2", 0, MaterialType.BLOCK ),
- DARK_OAK_WOOD( 162, "minecraft:log2", 1, MaterialType.BLOCK ),
- ACACIA_WOOD_STAIRS( 163, "minecraft:acacia_stairs", 0, MaterialType.BLOCK ),
- DARK_OAK_WOOD_STAIRS( 164, "minecraft:dark_oak_stairs", 0, MaterialType.BLOCK ),
- SLIME_BLOCK( 165, "minecraft:slime", 0, MaterialType.BLOCK ),
- BARRIER( 166, "minecraft:barrier", 0, MaterialType.BLOCK ),
- IRON_TRAPDOOR( 167, "minecraft:iron_trapdoor", 0, MaterialType.BLOCK ),
- PRISMARINE( 168, "minecraft:prismarine", 0, MaterialType.BLOCK ),
- PRISMARINE_BRICKS( 168, "minecraft:prismarine", 1, MaterialType.BLOCK ),
- DARK_PRISMARINE( 168, "minecraft:prismarine", 2, MaterialType.BLOCK ),
- SEA_LANTERN( 169, "minecraft:sea_lantern", 0, MaterialType.BLOCK ),
- HAY_BALE( 170, "minecraft:hay_block", 0, MaterialType.BLOCK ),
- WHITE_CARPET( 171, "minecraft:carpet", 0, MaterialType.BLOCK ),
- ORANGE_CARPET( 171, "minecraft:carpet", 1, MaterialType.BLOCK ),
- MAGENTA_CARPET( 171, "minecraft:carpet", 2, MaterialType.BLOCK ),
- LIGHT_BLUE_CARPET( 171, "minecraft:carpet", 3, MaterialType.BLOCK ),
- YELLOW_CARPET( 171, "minecraft:carpet", 4, MaterialType.BLOCK ),
- LIME_CARPET( 171, "minecraft:carpet", 5, MaterialType.BLOCK ),
- PINK_CARPET( 171, "minecraft:carpet", 6, MaterialType.BLOCK ),
- GRAY_CARPET( 171, "minecraft:carpet", 7, MaterialType.BLOCK ),
- LIGHT_GRAY_CARPET( 171, "minecraft:carpet", 8, MaterialType.BLOCK ),
- CYAN_CARPET( 171, "minecraft:carpet", 9, MaterialType.BLOCK ),
- PURPLE_CARPET( 171, "minecraft:carpet", 10, MaterialType.BLOCK ),
- BLUE_CARPET( 171, "minecraft:carpet", 11, MaterialType.BLOCK ),
- BROWN_CARPET( 171, "minecraft:carpet", 12, MaterialType.BLOCK ),
- GREEN_CARPET( 171, "minecraft:carpet", 13, MaterialType.BLOCK ),
- RED_CARPET( 171, "minecraft:carpet", 14, MaterialType.BLOCK ),
- BLACK_CARPET( 171, "minecraft:carpet", 15, MaterialType.BLOCK ),
- HARDENED_CLAY( 172, "minecraft:hardened_clay", 0, MaterialType.BLOCK, "TERRACOTTA" ),
-
- COAL_BLOCK( 173, "minecraft:coal_block", 0, MaterialType.BLOCK, "BLOCK_OF_COAL" ),
- BLOCK_OF_COAL( 173, "minecraft:coal_block", 0, MaterialType.BLOCK ), // obsolete...
-
- PACKED_ICE( 174, "minecraft:packed_ice", 0, MaterialType.BLOCK ),
- SUNFLOWER( 175, "minecraft:double_plant", 0, MaterialType.BLOCK ),
- LILAC( 175, "minecraft:double_plant", 1, MaterialType.BLOCK ),
- DOUBLE_TALLGRASS( 175, "minecraft:double_plant", 2, MaterialType.BLOCK ),
- LARGE_FERN( 175, "minecraft:double_plant", 3, MaterialType.BLOCK ),
- ROSE_BUSH( 175, "minecraft:double_plant", 4, MaterialType.BLOCK ),
- PEONY( 175, "minecraft:double_plant", 5, MaterialType.BLOCK ),
- FREE_STANDING_BANNER( 176, "minecraft:standing_banner", 0 ),
- WALL_MOUNTED_BANNER( 177, "minecraft:wall_banner", 0 ),
- INVERTED_DAYLIGHT_SENSOR( 178, "minecraft:daylight_detector_inverted", 0, MaterialType.BLOCK ),
- RED_SANDSTONE( 179, "minecraft:red_sandstone", 0, MaterialType.BLOCK ),
- CHISELED_RED_SANDSTONE( 179, "minecraft:red_sandstone", 1, MaterialType.BLOCK ),
- SMOOTH_RED_SANDSTONE( 179, "minecraft:red_sandstone", 2, MaterialType.BLOCK ),
- RED_SANDSTONE_STAIRS( 180, "minecraft:red_sandstone_stairs", 0, MaterialType.BLOCK ),
-
- RED_SANDSTONE_SLAB( 182, "minecraft:stone_slab2", 0, MaterialType.BLOCK ),
-
- SPRUCE_FENCE_GATE( 183, "minecraft:spruce_fence_gate", 0, MaterialType.BLOCK ),
- BIRCH_FENCE_GATE( 184, "minecraft:birch_fence_gate", 0, MaterialType.BLOCK ),
- JUNGLE_FENCE_GATE( 185, "minecraft:jungle_fence_gate", 0, MaterialType.BLOCK ),
- DARK_OAK_FENCE_GATE( 186, "minecraft:dark_oak_fence_gate", 0, MaterialType.BLOCK ),
- ACACIA_FENCE_GATE( 187, "minecraft:acacia_fence_gate", 0, MaterialType.BLOCK ),
- SPRUCE_FENCE( 188, "minecraft:spruce_fence", 0, MaterialType.BLOCK ),
- BIRCH_FENCE( 189, "minecraft:birch_fence", 0, MaterialType.BLOCK ),
- JUNGLE_FENCE( 190, "minecraft:jungle_fence", 0, MaterialType.BLOCK ),
- DARK_OAK_FENCE( 191, "minecraft:dark_oak_fence", 0, MaterialType.BLOCK ),
- ACACIA_FENCE( 192, "minecraft:acacia_fence", 0, MaterialType.BLOCK ),
- SPRUCE_DOOR_BLOCK( 193, "minecraft:spruce_door", 0, MaterialType.BLOCK ),
- BIRCH_DOOR_BLOCK( 194, "minecraft:birch_door", 0, MaterialType.BLOCK ),
- JUNGLE_DOOR_BLOCK( 195, "minecraft:jungle_door", 0, MaterialType.BLOCK ),
- ACACIA_DOOR_BLOCK( 196, "minecraft:acacia_door", 0, MaterialType.BLOCK ),
- DARK_OAK_DOOR_BLOCK( 197, "minecraft:dark_oak_door", 0, MaterialType.BLOCK ),
- END_ROD( 198, "minecraft:end_rod", 0, MaterialType.BLOCK ),
- CHORUS_PLANT( 199, "minecraft:chorus_plant", 0, MaterialType.BLOCK ),
- CHORUS_FLOWER( 200, "minecraft:chorus_flower", 0, MaterialType.BLOCK ),
- PURPUR_BLOCK( 201, "minecraft:purpur_block", 0, MaterialType.BLOCK ),
- PURPUR_PILLAR( 202, "minecraft:purpur_pillar", 0, MaterialType.BLOCK ),
- PURPUR_STAIRS( 203, "minecraft:purpur_stairs", 0, MaterialType.BLOCK ),
-
- PURPUR_SLAB( 205, "minecraft:purpur_slab", 0, MaterialType.BLOCK ),
- END_STONE_BRICKS( 206, "minecraft:end_bricks", 0, MaterialType.BLOCK ),
- BEETROOT_BLOCK( 207, "minecraft:beetroots", 0, MaterialType.BLOCK ),
- GRASS_PATH( 208, "minecraft:grass_path", 0, MaterialType.BLOCK ),
- END_GATEWAY( 209, "minecraft:end_gateway", 0, MaterialType.BLOCK ),
- REPEATING_COMMAND_BLOCK( 210, "minecraft:repeating_command_block", 0 ),
- CHAIN_COMMAND_BLOCK( 211, "minecraft:chain_command_block", 0 ),
- FROSTED_ICE( 212, "minecraft:frosted_ice", 0, MaterialType.BLOCK ),
- STRUCTURE_BLOCK( 255, "minecraft:structure_block", 0, MaterialType.BLOCK ),
- IRON_SHOVEL( 256, "minecraft:iron_shovel", 0 ),
- IRON_PICKAXE( 257, "minecraft:iron_pickaxe", 0 ),
- IRON_AXE( 258, "minecraft:iron_axe", 0 ),
- FLINT_AND_STEEL( 259, "minecraft:flint_and_steel", 0 ),
- APPLE( 260, "minecraft:apple", 0 ),
- BOW( 261, "minecraft:bow", 0 ),
- ARROW( 262, "minecraft:arrow", 0 ),
- COAL( 263, "minecraft:coal", 0 ),
- CHARCOAL( 263, "minecraft:coal", 1 ),
- DIAMOND( 264, "minecraft:diamond", 0 ),
- IRON_INGOT( 265, "minecraft:iron_ingot", 0 ),
- GOLD_INGOT( 266, "minecraft:gold_ingot", 0 ),
- IRON_SWORD( 267, "minecraft:iron_sword", 0 ),
- WOODEN_SWORD( 268, "minecraft:wooden_sword", 0 ),
- WOODEN_SHOVEL( 269, "minecraft:wooden_shovel", 0 ),
- WOODEN_PICKAXE( 270, "minecraft:wooden_pickaxe", 0 ),
- WOODEN_AXE( 271, "minecraft:wooden_axe", 0 ),
- STONE_SWORD( 272, "minecraft:stone_sword", 0 ),
- STONE_SHOVEL( 273, "minecraft:stone_shovel", 0 ),
- STONE_PICKAXE( 274, "minecraft:stone_pickaxe", 0 ),
- STONE_AXE( 275, "minecraft:stone_axe", 0 ),
- DIAMOND_SWORD( 276, "minecraft:diamond_sword", 0 ),
- DIAMOND_SHOVEL( 277, "minecraft:diamond_shovel", 0 ),
- DIAMOND_PICKAXE( 278, "minecraft:diamond_pickaxe", 0 ),
- DIAMOND_AXE( 279, "minecraft:diamond_axe", 0 ),
- STICK( 280, "minecraft:stick", 0 ),
- BOWL( 281, "minecraft:bowl", 0 ),
- MUSHROOM_STEW( 282, "minecraft:mushroom_stew", 0 ),
- GOLDEN_SWORD( 283, "minecraft:golden_sword", 0 ),
- GOLDEN_SHOVEL( 284, "minecraft:golden_shovel", 0 ),
- GOLDEN_PICKAXE( 285, "minecraft:golden_pickaxe", 0 ),
- GOLDEN_AXE( 286, "minecraft:golden_axe", 0 ),
- STRING( 287, "minecraft:string", 0 ),
- FEATHER( 288, "minecraft:feather", 0 ),
- GUNPOWDER( 289, "minecraft:gunpowder", 0 ),
- WOODEN_HOE( 290, "minecraft:wooden_hoe", 0 ),
- STONE_HOE( 291, "minecraft:stone_hoe", 0 ),
- IRON_HOE( 292, "minecraft:iron_hoe", 0 ),
- DIAMOND_HOE( 293, "minecraft:diamond_hoe", 0 ),
- GOLDEN_HOE( 294, "minecraft:golden_hoe", 0 ),
- WHEAT_SEEDS( 295, "minecraft:wheat_seeds", 0 ),
- WHEAT( 296, "minecraft:wheat", 0 ),
- BREAD( 297, "minecraft:bread", 0 ),
- LEATHER_HELMET( 298, "minecraft:leather_helmet", 0 ),
- LEATHER_TUNIC( 299, "minecraft:leather_chestplate", 0 ),
- LEATHER_PANTS( 300, "minecraft:leather_leggings", 0 ),
- LEATHER_BOOTS( 301, "minecraft:leather_boots", 0 ),
- CHAINMAIL_HELMET( 302, "minecraft:chainmail_helmet", 0 ),
- CHAINMAIL_CHESTPLATE( 303, "minecraft:chainmail_chestplate", 0 ),
- CHAINMAIL_LEGGINGS( 304, "minecraft:chainmail_leggings", 0 ),
- CHAINMAIL_BOOTS( 305, "minecraft:chainmail_boots", 0 ),
- IRON_HELMET( 306, "minecraft:iron_helmet", 0 ),
- IRON_CHESTPLATE( 307, "minecraft:iron_chestplate", 0 ),
- IRON_LEGGINGS( 308, "minecraft:iron_leggings", 0 ),
- IRON_BOOTS( 309, "minecraft:iron_boots", 0 ),
- DIAMOND_HELMET( 310, "minecraft:diamond_helmet", 0 ),
- DIAMOND_CHESTPLATE( 311, "minecraft:diamond_chestplate", 0 ),
- DIAMOND_LEGGINGS( 312, "minecraft:diamond_leggings", 0 ),
- DIAMOND_BOOTS( 313, "minecraft:diamond_boots", 0 ),
- GOLDEN_HELMET( 314, "minecraft:golden_helmet", 0 ),
- GOLDEN_CHESTPLATE( 315, "minecraft:golden_chestplate", 0 ),
- GOLDEN_LEGGINGS( 316, "minecraft:golden_leggings", 0 ),
- GOLDEN_BOOTS( 317, "minecraft:golden_boots", 0 ),
- FLINT( 318, "minecraft:flint", 0 ),
- RAW_PORKCHOP( 319, "minecraft:porkchop", 0 ),
- COOKED_PORKCHOP( 320, "minecraft:cooked_porkchop", 0 ),
- PAINTING( 321, "minecraft:painting", 0 ),
- GOLDEN_APPLE( 322, "minecraft:golden_apple", 0 ),
- ENCHANTED_GOLDEN_APPLE( 322, "minecraft:golden_apple", 1 ),
- SIGN( 323, "minecraft:sign", 0, MaterialType.BLOCK ),
- OAK_DOOR( 324, "minecraft:wooden_door", 0, MaterialType.BLOCK ),
- BUCKET( 325, "minecraft:bucket", 0 ),
- WATER_BUCKET( 326, "minecraft:water_bucket", 0 ),
- LAVA_BUCKET( 327, "minecraft:lava_bucket", 0 ),
- MINECART( 328, "minecraft:minecart", 0 ),
- SADDLE( 329, "minecraft:saddle", 0 ),
- IRON_DOOR( 330, "minecraft:iron_door", 0, MaterialType.BLOCK ),
- REDSTONE( 331, "minecraft:redstone", 0, MaterialType.ITEM ),
- SNOWBALL( 332, "minecraft:snowball", 0 ),
- OAK_BOAT( 333, "minecraft:boat", 0 ),
- LEATHER( 334, "minecraft:leather", 0 ),
- MILK_BUCKET( 335, "minecraft:milk_bucket", 0 ),
- BRICK( 336, "minecraft:brick", 0, MaterialType.BLOCK ),
- CLAY_BALL( 337, "minecraft:clay_ball", 0 ),
- SUGAR_CANES_ITEM( 338, "minecraft:reeds", 0, MaterialType.BLOCK, "SUGAR_CANE" ),
- PAPER( 339, "minecraft:paper", 0 ),
- BOOK( 340, "minecraft:book", 0 ),
- SLIMEBALL( 341, "minecraft:slime_ball", 0 ),
- MINECART_WITH_CHEST( 342, "minecraft:chest_minecart", 0 ),
- MINECART_WITH_FURNACE( 343, "minecraft:furnace_minecart", 0 ),
- EGG( 344, "minecraft:egg", 0 ),
- COMPASS( 345, "minecraft:compass", 0 ),
- FISHING_ROD( 346, "minecraft:fishing_rod", 0 ),
- CLOCK( 347, "minecraft:clock", 0 ),
- GLOWSTONE_DUST( 348, "minecraft:glowstone_dust", 0 ),
- RAW_FISH( 349, "minecraft:fish", 0 ),
- RAW_SALMON( 349, "minecraft:fish", 1 ),
- CLOWNFISH( 349, "minecraft:fish", 2 ),
- PUFFERFISH( 349, "minecraft:fish", 3 ),
- COOKED_FISH( 350, "minecraft:cooked_fish", 0 ),
- COOKED_SALMON( 350, "minecraft:cooked_fish", 1 ),
-
- INK_SACK( 351, "minecraft:dye", 0 ),
- ROSE_RED( 351, "minecraft:dye", 1 ),
- CACTUS_GREEN( 351, "minecraft:dye", 2 ),
- COCO_BEANS( 351, "minecraft:dye", 3 ),
-
- // NOTE: May actually be minecraft:ink_sack which is what XMaterial uses?
- LAPIS_LAZULI( 351, "minecraft:dye", 4 ),
-
- PURPLE_DYE( 351, "minecraft:dye", 5 ),
- CYAN_DYE( 351, "minecraft:dye", 6 ),
- LIGHT_GRAY_DYE( 351, "minecraft:dye", 7 ),
- GRAY_DYE( 351, "minecraft:dye", 8 ),
- PINK_DYE( 351, "minecraft:dye", 9 ),
- LIME_DYE( 351, "minecraft:dye", 10 ),
- DANDELION_YELLOW( 351, "minecraft:dye", 11 ),
- LIGHT_BLUE_DYE( 351, "minecraft:dye", 12 ),
- MAGENTA_DYE( 351, "minecraft:dye", 13 ),
- ORANGE_DYE( 351, "minecraft:dye", 14 ),
- BONE_MEAL( 351, "minecraft:dye", 15 ),
-
-
- BONE( 352, "minecraft:bone", 0 ),
- SUGAR( 353, "minecraft:sugar", 0 ),
- CAKE( 354, "minecraft:cake", 0 ),
- BED_ITEM( 355, "minecraft:bed", 0 ),
- REDSTONE_REPEATER( 356, "minecraft:repeater", 0, MaterialType.BLOCK ),
- COOKIE( 357, "minecraft:cookie", 0 ),
- MAP( 358, "minecraft:filled_map", 0 ),
- SHEARS( 359, "minecraft:shears", 0 ),
- MELON( 360, "minecraft:melon", 0, MaterialType.BLOCK ),
- PUMPKIN_SEEDS( 361, "minecraft:pumpkin_seeds", 0 ),
- MELON_SEEDS( 362, "minecraft:melon_seeds", 0 ),
- RAW_BEEF( 363, "minecraft:beef", 0 ),
- STEAK( 364, "minecraft:cooked_beef", 0 ),
- RAW_CHICKEN( 365, "minecraft:chicken", 0 ),
- COOKED_CHICKEN( 366, "minecraft:cooked_chicken", 0 ),
- ROTTEN_FLESH( 367, "minecraft:rotten_flesh", 0 ),
- ENDER_PEARL( 368, "minecraft:ender_pearl", 0 ),
- BLAZE_ROD( 369, "minecraft:blaze_rod", 0 ),
- GHAST_TEAR( 370, "minecraft:ghast_tear", 0 ),
- GOLD_NUGGET( 371, "minecraft:gold_nugget", 0 ),
- NETHER_WART_ITEM( 372, "minecraft:nether_wart", 0 ),
- POTION( 373, "minecraft:potion", 0 ),
- GLASS_BOTTLE( 374, "minecraft:glass_bottle", 0 ),
- SPIDER_EYE( 375, "minecraft:spider_eye", 0 ),
- FERMENTED_SPIDER_EYE( 376, "minecraft:fermented_spider_eye", 0 ),
- BLAZE_POWDER( 377, "minecraft:blaze_powder", 0 ),
- MAGMA_CREAM( 378, "minecraft:magma_cream", 0 ),
- BREWING_STAND_ITEM( 379, "minecraft:brewing_stand", 0, MaterialType.BLOCK ),
- CAULDRON_ITEM( 380, "minecraft:cauldron", 0, MaterialType.BLOCK ),
- EYE_OF_ENDER( 381, "minecraft:ender_eye", 0 ),
- GLISTERING_MELON( 382, "minecraft:speckled_melon", 0 ),
- SPAWN_CREEPER( 383, "minecraft:spawn_egg", 50 ),
- SPAWN_SKELETON( 383, "minecraft:spawn_egg", 51 ),
- SPAWN_SPIDER( 383, "minecraft:spawn_egg", 52 ),
- SPAWN_ZOMBIE( 383, "minecraft:spawn_egg", 54 ),
- SPAWN_SLIME( 383, "minecraft:spawn_egg", 55 ),
- SPAWN_GHAST( 383, "minecraft:spawn_egg", 56 ),
- SPAWN_PIGMAN( 383, "minecraft:spawn_egg", 57 ),
- SPAWN_ENDERMAN( 383, "minecraft:spawn_egg", 58 ),
- SPAWN_CAVE_SPIDER( 383, "minecraft:spawn_egg", 59 ),
- SPAWN_SILVERFISH( 383, "minecraft:spawn_egg", 60 ),
- SPAWN_BLAZE( 383, "minecraft:spawn_egg", 61 ),
- SPAWN_MAGMA_CUBE( 383, "minecraft:spawn_egg", 62 ),
- SPAWN_BAT( 383, "minecraft:spawn_egg", 65 ),
- SPAWN_WITCH( 383, "minecraft:spawn_egg", 66 ),
- SPAWN_ENDERMITE( 383, "minecraft:spawn_egg", 67 ),
- SPAWN_GUARDIAN( 383, "minecraft:spawn_egg", 68 ),
- SPAWN_SHULKER( 383, "minecraft:spawn_egg", 69 ),
- SPAWN_PIG( 383, "minecraft:spawn_egg", 90 ),
- SPAWN_SHEEP( 383, "minecraft:spawn_egg", 91 ),
- SPAWN_COW( 383, "minecraft:spawn_egg", 92 ),
- SPAWN_CHICKEN( 383, "minecraft:spawn_egg", 93 ),
- SPAWN_SQUID( 383, "minecraft:spawn_egg", 94 ),
- SPAWN_WOLF( 383, "minecraft:spawn_egg", 95 ),
- SPAWN_MOOSHROOM( 383, "minecraft:spawn_egg", 96 ),
- SPAWN_OCELOT( 383, "minecraft:spawn_egg", 98 ),
- SPAWN_HORSE( 383, "minecraft:spawn_egg", 100 ),
- SPAWN_RABBIT( 383, "minecraft:spawn_egg", 101 ),
- SPAWN_VILLAGER( 383, "minecraft:spawn_egg", 120 ),
- BOTTLE_O_ENCHANTING( 384, "minecraft:experience_bottle", 0 ),
- FIRE_CHARGE( 385, "minecraft:fire_charge", 0 ),
- BOOK_AND_QUILL( 386, "minecraft:writable_book", 0 ),
- WRITTEN_BOOK( 387, "minecraft:written_book", 0 ),
- EMERALD( 388, "minecraft:emerald", 0 ),
- ITEM_FRAME( 389, "minecraft:item_frame", 0, MaterialType.BLOCK ),
- FLOWER_POT_ITEM( 390, "minecraft:flower_pot", 0, MaterialType.BLOCK ),
- CARROT( 391, "minecraft:carrot", 0, MaterialType.BLOCK ),
- POTATO( 392, "minecraft:potato", 0, MaterialType.BLOCK ),
- BAKED_POTATO( 393, "minecraft:baked_potato", 0 ),
- POISONOUS_POTATO( 394, "minecraft:poisonous_potato", 0 ),
- EMPTY_MAP( 395, "minecraft:map", 0 ),
- GOLDEN_CARROT( 396, "minecraft:golden_carrot", 0 ),
- MOB_HEAD_SKELETON( 397, "minecraft:skull", 0 ),
- MOB_HEAD_WITHER_SKELETON( 397, "minecraft:skull", 1 ),
- MOB_HEAD_ZOMBIE( 397, "minecraft:skull", 2 ),
- MOB_HEAD_HUMAN( 397, "minecraft:skull", 3 ),
- MOB_HEAD_CREEPER( 397, "minecraft:skull", 4 ),
- MOB_HEAD_DRAGON( 397, "minecraft:skull", 5 ),
- CARROT_ON_A_STICK( 398, "minecraft:carrot_on_a_stick", 0 ),
- NETHER_STAR( 399, "minecraft:nether_star", 0 ),
- PUMPKIN_PIE( 400, "minecraft:pumpkin_pie", 0 ),
- FIREWORK_ROCKET( 401, "minecraft:fireworks", 0 ),
- FIREWORK_STAR( 402, "minecraft:firework_charge", 0 ),
- ENCHANTED_BOOK( 403, "minecraft:enchanted_book", 0 ),
- REDSTONE_COMPARATOR( 404, "minecraft:comparator", 0, MaterialType.BLOCK ),
- NETHER_BRICK_ITEM( 405, "minecraft:netherbrick", 0, MaterialType.ITEM ),
- NETHER_QUARTZ( 406, "minecraft:quartz", 0 ),
- MINECART_WITH_TNT( 407, "minecraft:tnt_minecart", 0 ),
- MINECART_WITH_HOPPER( 408, "minecraft:hopper_minecart", 0 ),
- PRISMARINE_SHARD( 409, "minecraft:prismarine_shard", 0 ),
- PRISMARINE_CRYSTALS( 410, "minecraft:prismarine_crystals", 0 ),
- RAW_RABBIT( 411, "minecraft:rabbit", 0 ),
- COOKED_RABBIT( 412, "minecraft:cooked_rabbit", 0 ),
- RABBIT_STEW( 413, "minecraft:rabbit_stew", 0 ),
- RABBITS_FOOT( 414, "minecraft:rabbit_foot", 0 ),
- RABBIT_HIDE( 415, "minecraft:rabbit_hide", 0 ),
- ARMOR_STAND( 416, "minecraft:armor_stand", 0, MaterialType.BLOCK ),
- IRON_HORSE_ARMOR( 417, "minecraft:iron_horse_armor", 0 ),
- GOLDEN_HORSE_ARMOR( 418, "minecraft:golden_horse_armor", 0 ),
- DIAMOND_HORSE_ARMOR( 419, "minecraft:diamond_horse_armor", 0 ),
- LEAD( 420, "minecraft:lead", 0 ),
- NAME_TAG( 421, "minecraft:name_tag", 0 ),
- MINECART_WITH_COMMAND_BLOCK( 422, "minecraft:command_block_minecart", 0 ),
- RAW_MUTTON( 423, "minecraft:mutton", 0 ),
- COOKED_MUTTON( 424, "minecraft:cooked_mutton", 0 ),
- BANNER( 425, "minecraft:banner", 0, MaterialType.BLOCK ),
- SPRUCE_DOOR( 427, "minecraft:spruce_door", 0, MaterialType.BLOCK ),
- BIRCH_DOOR( 428, "minecraft:birch_door", 0, MaterialType.BLOCK ),
- JUNGLE_DOOR( 429, "minecraft:jungle_door", 0, MaterialType.BLOCK ),
- ACACIA_DOOR( 430, "minecraft:acacia_door", 0, MaterialType.BLOCK ),
- DARK_OAK_DOOR( 431, "minecraft:dark_oak_door", 0, MaterialType.BLOCK ),
- CHORUS_FRUIT( 432, "minecraft:chorus_fruit", 0, MaterialType.BLOCK ),
- POPPED_CHORUS_FRUIT( 433, "minecraft:popped_chorus_fruit", 0 ),
- BEETROOT( 434, "minecraft:beetroot", 0, MaterialType.BLOCK ),
- BEETROOT_SEEDS( 435, "minecraft:beetroot_seeds", 0 ),
- BEETROOT_SOUP( 436, "minecraft:beetroot_soup", 0 ),
- DRAGONS_BREATH( 437, "minecraft:dragon_breath", 0, MaterialType.BLOCK ),
- SPLASH_POTION( 438, "minecraft:splash_potion", 0 ),
- SPECTRAL_ARROW( 439, "minecraft:spectral_arrow", 0 ),
- TIPPED_ARROW( 440, "minecraft:tipped_arrow", 0 ),
- LINGERING_POTION( 441, "minecraft:lingering_potion", 0 ),
- SHIELD( 442, "minecraft:shield", 0 ),
- ELYTRA( 443, "minecraft:elytra", 0 ),
- SPRUCE_BOAT( 444, "minecraft:spruce_boat", 0 ),
- BIRCH_BOAT( 445, "minecraft:birch_boat", 0 ),
- JUNGLE_BOAT( 446, "minecraft:jungle_boat", 0 ),
- ACACIA_BOAT( 447, "minecraft:acacia_boat", 0 ),
- DARK_OAK_BOAT( 448, "minecraft:dark_oak_boat", 0 ),
- DISC_13( 2256, "minecraft:record_13", 0 ),
- CAT_DISC( 2257, "minecraft:record_cat", 0 ),
- BLOCKS_DISC( 2258, "minecraft:record_blocks", 0 ),
- CHIRP_DISC( 2259, "minecraft:record_chirp", 0 ),
- FAR_DISC( 2260, "minecraft:record_far", 0 ),
- MALL_DISC( 2261, "minecraft:record_mall", 0 ),
- MELLOHI_DISC( 2262, "minecraft:record_mellohi", 0 ),
- STAL_DISC( 2263, "minecraft:record_stal", 0 ),
- STRAD_DISC( 2264, "minecraft:record_strad", 0 ),
- WARD_DISC( 2265, "minecraft:record_ward", 0 ),
- DISC_11( 2266, "minecraft:record_11", 0 ),
- WAIT_DISC( 2267, "minecraft:record_wait", 0 ),
-
-
- // Minecraft v1.10.x blocks:
-
- STRUCTURE_VOID( "minecraft:structure_void", MaterialType.BLOCK, MaterialVersion.v1_10 ),
- MAGMA_BLOCK( "minecraft:magma_block", MaterialType.BLOCK, MaterialVersion.v1_10 ),
- BONE_BLOCK( "minecraft:bone_block", MaterialType.BLOCK, MaterialVersion.v1_10 ),
-
-
- // Minecraft v1.11.x blocks:
-
- SHULKER_BOX( "minecraft:shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
-
- WHITE_SHULKER_BOX( "minecraft:white_shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
- ORANGE_SHULKER_BOX( "minecraft:orange_shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
- MAGENTA_SHULKER_BOX( "minecraft:magenta_shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
- LIGHT_BLUE_SHULKER_BOX( "minecraft:light_blue_shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
- YELLOW_SHULKER_BOX( "minecraft:yellow_shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
-
- LIME_SHULKER_BOX( "minecraft:lime_shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
- PINK_SHULKER_BOX( "minecraft:pink_shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
- GRAY_SHULKER_BOX( "minecraft:gray_shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
- LIGHT_GRAY_SHULKER_BOX( "minecraft:light_gray_shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
- CYAN_SHULKER_BOX( "minecraft:cyan_shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
-
- PURPLE_SHULKER_BOX( "minecraft:purple_shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
- BLUE_SHULKER_BOX( "minecraft:blue_shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
- BROWN_SHULKER_BOX( "minecraft:brown_shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
- GREEN_SHULKER_BOX( "minecraft:green_shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
- RED_SHULKER_BOX( "minecraft:red_shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
- BLACK_SHULKER_BOX( "minecraft:black_shulker_box", MaterialType.BLOCK, MaterialVersion.v1_11 ),
-
-
-
- // Minecraft v1.12.x blocks:
-
- WHITE_GLAZED_TERRACOTTA( "minecraft:white_glazed_terracotta", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- ORANGE_GLAZED_TERRACOTTA( "minecraft:orange_glazed_terracotta", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- MAGENTA_GLAZED_TERRACOTTA( "minecraft:magenta_glazed_terracotta", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- LIGHT_BLUE_GLAZED_TERRACOTTA( "minecraft:light_blue_glazed_terracotta", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- YELLOW_GLAZED_TERRACOTTA( "minecraft:yellow_glazed_terracotta", MaterialType.BLOCK, MaterialVersion.v1_12 ),
-
- LIME_GLAZED_TERRACOTTA( "minecraft:lime_glazed_terracotta", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- PINK_GLAZED_TERRACOTTA( "minecraft:pink_glazed_terracotta", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- GRAY_GLAZED_TERRACOTTA( "minecraft:gray_glazed_terracotta", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- LIGHT_GRAY_GLAZED_TERRACOTTA( "minecraft:light_gray_glazed_terracotta", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- CYAN_GLAZED_TERRACOTTA( "minecraft:cyan_glazed_terracotta", MaterialType.BLOCK, MaterialVersion.v1_12 ),
+ // NOTE: This obsolete source has been purged. See the history in git.
- PURPLE_GLAZED_TERRACOTTA( "minecraft:purple_glazed_terracotta", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- BLUE_GLAZED_TERRACOTTA( "minecraft:blue_glazed_terracotta", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- BROWN_GLAZED_TERRACOTTA( "minecraft:brown_glazed_terracotta", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- GREEN_GLAZED_TERRACOTTA( "minecraft:green_glazed_terracotta", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- RED_GLAZED_TERRACOTTA( "minecraft:red_glazed_terracotta", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- BLACK_GLAZED_TERRACOTTA( "minecraft:black_glazed_terracotta", MaterialType.BLOCK, MaterialVersion.v1_12 ),
-
-
- WHITE_CONCRETE( "minecraft:white_concrete", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- ORANGE_CONCRETE( "minecraft:orange_concrete", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- MAGENTA_CONCRETE( "minecraft:magenta_concrete", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- LIGHT_BLUE_CONCRETE( "minecraft:light_blue_concrete", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- YELLOW_CONCRETE( "minecraft:yellow_concrete", MaterialType.BLOCK, MaterialVersion.v1_12 ),
-
- LIME_CONCRETE( "minecraft:lime_concrete", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- PINK_CONCRETE( "minecraft:pink_concrete", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- GRAY_CONCRETE( "minecraft:gray_concrete", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- LIGHT_GRAY_CONCRETE( "minecraft:light_gray_concrete", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- CYAN_CONCRETE( "minecraft:cyan_concrete", MaterialType.BLOCK, MaterialVersion.v1_12 ),
-
- PURPLE_CONCRETE( "minecraft:purple_concrete", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- BLUE_CONCRETE( "minecraft:blue_concrete", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- BROWN_CONCRETE( "minecraft:brown_concrete", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- GREEN_CONCRETE( "minecraft:green_concrete", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- RED_CONCRETE( "minecraft:red_concrete", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- BLACK_CONCRETE( "minecraft:black_concrete", MaterialType.BLOCK, MaterialVersion.v1_12 ),
-
-
- WHITE_CONCRETE_POWDER( "minecraft:white_concrete_powder", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- ORANGE_CONCRETE_POWDER( "minecraft:orange_concrete_powder", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- MAGENTA_CONCRETE_POWDER( "minecraft:magenta_concrete_powder", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- LIGHT_BLUE_CONCRETE_POWDER( "minecraft:light_blue_concrete_powder", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- YELLOW_CONCRETE_POWDER( "minecraft:yellow_concrete_powder", MaterialType.BLOCK, MaterialVersion.v1_12 ),
-
- LIME_CONCRETE_POWDER( "minecraft:lime_concrete_powder", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- PINK_CONCRETE_POWDER( "minecraft:pink_concrete_powder", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- GRAY_CONCRETE_POWDER( "minecraft:gray_concrete_powder", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- LIGHT_GRAY_CONCRETE_POWDER( "minecraft:light_gray_concrete_powder", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- CYAN_CONCRETE_POWDER( "minecraft:cyan_concrete_powder", MaterialType.BLOCK, MaterialVersion.v1_12 ),
-
- PURPLE_CONCRETE_POWDER( "minecraft:purple_concrete_powder", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- BLUE_CONCRETE_POWDER( "minecraft:blue_concrete_powder", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- BROWN_CONCRETE_POWDER( "minecraft:brown_concrete_powder", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- GREEN_CONCRETE_POWDER( "minecraft:green_concrete_powder", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- RED_CONCRETE_POWDER( "minecraft:red_concrete_powder", MaterialType.BLOCK, MaterialVersion.v1_12 ),
- BLACK_CONCRETE_POWDER( "minecraft:black_concrete_powder", MaterialType.BLOCK, MaterialVersion.v1_12 ),
-
-
-
-
- // Minecraft v1.13.x blocks:
-
- CAVE_AIR( "minecraft:cave_air", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- VOID_AIR( "minecraft:void_air", MaterialType.BLOCK, MaterialVersion.v1_13 ),
-
- BLUE_ICE( "minecraft:blue_ice", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- BUBBLE_COLUMN( "minecraft:bubble_column", MaterialType.BLOCK, MaterialVersion.v1_13 ),
-
- TUBE_CORAL( "minecraft:tube_coral", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- BRAIN_CORAL( "minecraft:brain_coral", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- BUBBLE_CORAL( "minecraft:bubble_coral", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- FIRE_CORAL( "minecraft:fire_coral", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- HORN_CORAL( "minecraft:horn_coral", MaterialType.BLOCK, MaterialVersion.v1_13 ),
-
- DEAD_TUBE_CORAL( "minecraft:dead_tube_coral", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DEAD_BRAIN_CORAL( "minecraft:dead_brain_coral", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DEAD_BUBBLE_CORAL( "minecraft:dead_bubble_coral", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DEAD_FIRE_CORAL( "minecraft:dead_fire_coral", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DEAD_HORN_CORAL( "minecraft:dead_horn_coral", MaterialType.BLOCK, MaterialVersion.v1_13 ),
-
-
- TUBE_CORAL_BLOCK( "minecraft:tube_coral_block", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- BRAIN_CORAL_BLOCK( "minecraft:brain_coral_block", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- BUBBLE_CORAL_BLOCK( "minecraft:bubble_coral_block", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- FIRE_CORAL_BLOCK( "minecraft:fire_coral_block", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- HORN_CORAL_BLOCK( "minecraft:horn_coral_block", MaterialType.BLOCK, MaterialVersion.v1_13 ),
-
- DEAD_TUBE_CORAL_BLOCK( "minecraft:dead_tube_coral_block", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DEAD_BRAIN_CORAL_BLOCK( "minecraft:dead_brain_coral_block", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DEAD_BUBBLE_CORAL_BLOCK( "minecraft:dead_bubble_coral_block", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DEAD_FIRE_CORAL_BLOCK( "minecraft:dead_fire_coral_block", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DEAD_HORN_CORAL_BLOCK( "minecraft:dead_horn_coral_block", MaterialType.BLOCK, MaterialVersion.v1_13 ),
-
-
- TUBE_CORAL_FAN( "minecraft:tube_coral_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- BRAIN_CORAL_FAN( "minecraft:brain_coral_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- BUBBLE_CORAL_FAN( "minecraft:bubble_coral_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- FIRE_CORAL_FAN( "minecraft:fire_coral_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- HORN_CORAL_FAN( "minecraft:horn_coral_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
-
- DEAD_TUBE_CORAL_FAN( "minecraft:dead_tube_coral_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DEAD_BRAIN_CORAL_FAN( "minecraft:dead_brain_coral_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DEAD_BUBBLE_CORAL_FAN( "minecraft:dead_bubble_coral_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DEAD_FIRE_CORAL_FAN( "minecraft:dead_fire_coral_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DEAD_HORN_CORAL_FAN( "minecraft:dead_horn_coral_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
-
-
- TUBE_CORAL_WALL_FAN( "minecraft:tube_coral_wall_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- BRAIN_CORAL_WALL_FAN( "minecraft:brain_coral_wall_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- BUBBLE_CORAL_WALL_FAN( "minecraft:bubble_coral_wall_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- FIRE_CORAL_WALL_FAN( "minecraft:fire_coral_wall_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- HORN_CORAL_WALL_FAN( "minecraft:horn_coral_wall_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
-
- DEAD_TUBE_CORAL_WALL_FAN( "minecraft:dead_tube_coral_wall_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DEAD_BRAIN_CORAL_WALL_FAN( "minecraft:dead_brain_coral_wall_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DEAD_BUBBLE_CORAL_WALL_FAN( "minecraft:dead_bubble_coral_wall_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DEAD_FIRE_CORAL_WALL_FAN( "minecraft:dead_fire_coral_wall_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DEAD_HORN_CORAL_WALL_FAN( "minecraft:dead_horn_coral_wall_fan", MaterialType.BLOCK, MaterialVersion.v1_13 ),
-
-
-
-
- ACACIA_LOG( "minecraft:acacia_log", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- BIRCH_LOG( "minecraft:birch_log", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- DARK_OAK_LOG( "minecraft:dark_oak_log", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- JUNGLE_LOG( "minecraft:jungle_log", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- OAK_LOG( "minecraft:oak_log", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- SPRUCE_LOG( "minecraft:spruce_log", MaterialType.BLOCK, MaterialVersion.v1_13 ),
-
-
- STRIPPED_ACACIA_LOG( "minecraft:stripped_acacia_log", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- STRIPPED_BIRCH_LOG( "minecraft:stripped_birch_log", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- STRIPPED_DARK_OAK_LOG( "minecraft:stripped_dark_oak_log", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- STRIPPED_JUNGLE_LOG( "minecraft:stripped_jungle_log", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- STRIPPED_OAK_LOG( "minecraft:stripped_oak_log", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- STRIPPED_SPRUCE_LOG( "minecraft:stripped_spruce_log", MaterialType.BLOCK, MaterialVersion.v1_13 ),
-
- STRIPPED_ACACIA_WOOD( "minecraft:stripped_acacia_wood", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- STRIPPED_BIRCH_WOOD( "minecraft:stripped_birch_wood", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- STRIPPED_DARK_OAK_WOOD( "minecraft:stripped_dark_oak_wood", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- STRIPPED_JUNGLE_WOOD( "minecraft:stripped_jungle_wood", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- STRIPPED_OAK_WOOD( "minecraft:stripped_oak_wood", MaterialType.BLOCK, MaterialVersion.v1_13 ),
- STRIPPED_SPRUCE_WOOD( "minecraft:stripped_spruce_wood", MaterialType.BLOCK, MaterialVersion.v1_13 ),
-
-
-
- // Minecraft v1.14.x blocks:
- BAMBOO( "minecraft:bamboo", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- BAMBOO_SAPLING( "minecraft:bamboo_sapling", MaterialType.BLOCK, MaterialVersion.v1_14 ),
-
- BARREL( "minecraft:barrel", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- BELL( "minecraft:bell", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- BLAST_FURNACE( "minecraft:blast_furnace", MaterialType.BLOCK, MaterialVersion.v1_14 ),
-
- CAMPFIRE( "minecraft:campfire", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- CARTOGRAPHY_TABLE( "minecraft:cartography_table", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- COMPOSTER( "minecraft:composter", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- FLETCHING_TABLE( "minecraft:fletching_table", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- //FLOWERS( "minecraft:bee_nest", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- GRINDSTONE( "minecraft:grindstone", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- JIGSAW( "minecraft:jigsaw", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- LANTERN( "minecraft:lantern", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- LECTERN( "minecraft:lectern", MaterialType.BLOCK, MaterialVersion.v1_14 ),
-
- LOOM( "minecraft:loom", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- // Already exists: NOTE_BLOCK( "minecraft:note_block", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- SCAFFOLDING( "minecraft:scaffolding", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- //SIGNS( "minecraft:bee_nest", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- //SLABS( "minecraft:bee_nest", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- SMITHING_TABLE( "minecraft:smithing_table", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- SMOKER( "minecraft:smoker", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- //STAIRS( "minecraft:bee_nest", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- STONECUTTER( "minecraft:stonecutter", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- SWEET_BERRY_BUSH( "minecraft:sweet_berry_bush", MaterialType.BLOCK, MaterialVersion.v1_14 ),
- //WALLS( "minecraft:bee_nest", MaterialType.BLOCK, MaterialVersion.v1_14 ),
-
-
-
-
- // Minecraft v1.15.x blocks:
- BEE_NEST( "minecraft:bee_nest", MaterialType.BLOCK, MaterialVersion.v1_15 ),
- BEEHIVE( "minecraft:beehive", MaterialType.BLOCK, MaterialVersion.v1_15 ),
- HONEY_BLOCK( "minecraft:honey_block", MaterialType.BLOCK, MaterialVersion.v1_15 ),
- HONEYCOMB_BLOCK( "minecraft:honeycomb_block", MaterialType.BLOCK, MaterialVersion.v1_15 ),
-
-
-
- // Minecraft v1.16.x blocks:
- ANCIENT_DEBRIS( "minecraft:ancient_debris", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- CRYING_OBSIDIAN( "minecraft:crying_obsidian", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- NETHER_GOLD_ORE( "minecraft:nether_gold_ore", MaterialType.BLOCK, MaterialVersion.v1_16 ),
-
-
- BASALT( "minecraft:basal", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- POLISHED_BASALT( "minecraft:polished_basalt", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- NETHERITE_BLOCK( "minecraft:netherite_block", MaterialType.BLOCK, MaterialVersion.v1_16 ),
-
-
- BLACKSTONE( "minecraft:base_stone_blackstone", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- POLISHED_BLACKSTONE( "minecraft:polished_blackstone", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- CHISELED_POLISHED_BLACKSTONE( "minecraft:chiseled_polished_blackstone", MaterialType.BLOCK, MaterialVersion.v1_16 ),
-
-
- NETHER_BRICKS( "minecraft:nether_bricks", MaterialType.BLOCK, MaterialVersion.v1_8 ),
- RED_NETHER_BRICKS( "minecraft:red_nether_bricks", MaterialType.BLOCK, MaterialVersion.v1_10, "RED_NETHER_BRICK" ),
- CRACKED_NETHER_BRICKS( "minecraft:cracked_nether_bricks", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- CHISELED_NETHER_BRICKS( "minecraft:chiseled_nether_bricks", MaterialType.BLOCK, MaterialVersion.v1_16 ),
-
-
- CRIMSON_PLANKS( "minecraft:crimson_planks", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- WARPED_PLANKS( "minecraft:warped_planks", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- STRIPPED_CRIMSON_HYPHAE( "minecraft:stripped_crimson_hyphae", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- STRIPPED_WARPED_HYPHAE( "minecraft:stripped_warped_hyphae", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- NETHER_WART_BLOCK( "minecraft:nether_wart_block", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- WARPED_WART_BLOCK( "minecraft:warped_wart_block", MaterialType.BLOCK, MaterialVersion.v1_16 ),
-
-
- LODESTONE( "minecraft:lodestone", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- QUARTZ_BRICKS( "minecraft:quartz_bricks", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- RESPAWN_ANCHOR( "minecraft:respawn_anchor", MaterialType.BLOCK, MaterialVersion.v1_16 ),
-
-
- SHROOMLIGHT( "minecraft:shroomlight", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- SOUL_CAMPFIRE( "minecraft:soul_campfire", MaterialType.BLOCK, MaterialVersion.v1_16 ),
-
-
- SOUL_LANTERN( "minecraft:soul_lantern", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- SOUL_TORCH( "minecraft:soul_torch", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- SOUL_SOIL( "minecraft:soul_soil", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- TARGET( "minecraft:target", MaterialType.BLOCK, MaterialVersion.v1_16 ),
-
-
- TWISTING_VINES( "minecraft:twisting_vines", MaterialType.BLOCK, MaterialVersion.v1_16 ),
- WEEPING_VINES( "minecraft:weeping_vines", MaterialType.BLOCK, MaterialVersion.v1_16 ),
-
-
-
-
-
- ;
- // @formatter:on
-
- private final int legacyId;
- private final String id;
- private final short data;
- private final MaterialType materialType;
- private final MaterialVersion materialVersion;
-
- private final List altNames;
-
- ObsoleteBlockType(int legacyId, String id, int data, MaterialType materialType) {
- this.legacyId = legacyId;
- this.id = (id != null ? id : "minecraft:" + this.name().toLowerCase());
- this.data = (short) data;
- this.materialType = materialType;
- this.materialVersion = MaterialVersion.v1_8;
-
- this.altNames = new ArrayList<>();
- }
-
-
- ObsoleteBlockType(int legacyId, String id, int data, MaterialType materialType, String... altNames) {
- this( legacyId, id, data, materialType );
-
- for ( String altName : altNames ) {
- this.altNames.add( altName );
- }
- }
-
-
-
- ObsoleteBlockType(String id, MaterialType materialType, MaterialVersion materialVersion, String... altNames ) {
- this( id, materialType, materialVersion );
-
- for ( String altName : altNames ) {
- this.altNames.add( altName );
- }
- }
-
- ObsoleteBlockType(String id, MaterialType materialType, MaterialVersion materialVersion ) {
- this.legacyId = -1;
- this.id = (id != null ? id : "minecraft:" + this.name().toLowerCase());
- this.data = 0;
- this.materialType = materialType;
- this.materialVersion = materialVersion;
-
- this.altNames = new ArrayList<>();
- }
-
- ObsoleteBlockType(MaterialType materialType) {
- this(0, null, 0, materialType);
- }
-
- ObsoleteBlockType(int legacyId, String id) {
- this(legacyId, id, 0, MaterialType.NOT_SET);
- }
-
- ObsoleteBlockType(int legacyId, String id, int data) {
- this(legacyId, id, data, MaterialType.NOT_SET);
- }
-
- /**
- * This function is for legacy versions of spigot that
- * uses the data value. This function will returns a
- * string value of a material name that
- * XMaterial will be able to use to look up the correct
- * bukkit material type.
- *
- *
- * The way it needs to be constructed, is by taking the id,
- * dropping the "minecraft:" prefix, then if data is non-zero,
- * add a colon and the value of data.
- *
- *
- *
- * @return
- */
- public String getXMaterialNameLegacy() {
- String xMatName = getId().replace( "minecraft:", "" ) +
- ( getData() > 0 ? ":" + getData() : "" );
- return xMatName;
- }
-
- /**
- * This function will return the lower case name of the BlockType.
- * This should match
- * @return
- */
- public String getXMaterialName() {
- return name().toLowerCase();
- }
-
- public List getXMaterialAltNames() {
- return getAltNames();
- }
-
- public static ObsoleteBlockType getBlock(int legacyId) {
- return getBlock(legacyId, (short) 0);
- }
-
- public static ObsoleteBlockType getBlock(int legacyId, short data) {
- for (ObsoleteBlockType block : values()) {
- if (block.getLegacyId() == legacyId) {
- if (block.getData() == data) {
- return block;
- }
- }
- }
- return null;
- }
-
- /**
- * This is just an alias for getBlock() which checks for matches in
- * many robust ways with numerous fall backs to ensure the best matching.
- * @param key
- * @return
- */
- public static ObsoleteBlockType fromString( String key ) {
- return getBlock( key );
- }
- /**
- * Must search first on block name since the block id has potential for duplicates which
- * will corrupt the block list for the mine. If at all possible, only search by the block name.
- *
- *
- * @param key Block name, id, or number.
- * @return
- */
- public static ObsoleteBlockType getBlock(String key) {
- ObsoleteBlockType blockType = getBlockByName( key );
- if ( blockType == null ) {
- blockType = getBlockById( key );
- }
- if ( blockType == null ) {
- blockType = getBlockByXMaterialName(key);
- }
-
- return blockType;
- }
-
- private static ObsoleteBlockType getBlockById(String id) {
- for (ObsoleteBlockType block : values()) {
- if (block.getId().equalsIgnoreCase(id) || block.name().equalsIgnoreCase(id) ||
- block.getId().equalsIgnoreCase( "minecraft:" + id )) {
- return block;
- }
- }
- boolean isInt = false;
- try {
- Integer.parseInt(id.replaceAll(":", ""));
- isInt = true;
- } catch (Exception e) {
- isInt = false;
- }
- if (isInt) {
- if (!id.contains(":")) {
- return getBlockWithData(Integer.parseInt(id), (short) 0);
- }
- return getBlockWithData(Integer.parseInt(id.split(":")[0]),
- Short.parseShort(id.split(":")[1]));
- }
-// Prison prison = Prison.get();
-// if ( prison != null && prison.getItemManager() != null ) {
-// Set>> entrySet = prison.getItemManager().getItems().entrySet();
-// for (Map.Entry> entry : entrySet) {
-// if (entry.getValue().contains(id.toLowerCase())) {
-// return entry.getKey();
-// }
-// }
-//
-// return getBlockByName(id);
-// }
- return null;
- }
-
- private static ObsoleteBlockType getBlockByName(String name) {
- for (ObsoleteBlockType block : values()) {
- if (block.name().equalsIgnoreCase(name)) {
- return block;
- }
- }
- return null;
- }
-
- private static ObsoleteBlockType getBlockByXMaterialName(String name) {
- for (ObsoleteBlockType block : values()) {
- if (block.getXMaterialAltNames().size() > 0 ) {
- for ( String altName : block.getXMaterialAltNames() ) {
-
- if ( altName.equalsIgnoreCase(name)) {
- return block;
- }
- }
- }
-
- }
- return null;
- }
-
- public static ObsoleteBlockType getBlockWithData(int id, short data) {
- for (ObsoleteBlockType block : values()) {
- if (block.getLegacyId() == id && block.getData() == data) {
- return block;
- }
- }
- return null;
- }
-
- public static boolean isDoor(ObsoleteBlockType block) {
- return block == ACACIA_DOOR_BLOCK || block == BIRCH_DOOR_BLOCK
- || block == DARK_OAK_DOOR_BLOCK || block == IRON_DOOR_BLOCK
- || block == JUNGLE_DOOR_BLOCK || block == OAK_DOOR_BLOCK || block == SPRUCE_DOOR_BLOCK;
- }
-
- public int getLegacyId() {
- return legacyId;
- }
-
- public String getId() {
- return id;
- }
-
- public short getData() {
- return data;
- }
-
- public boolean isBlock() {
- return materialType == MaterialType.BLOCK;
- }
-
- public boolean isItem() {
- return materialType == MaterialType.ITEM;
- }
-
- public MaterialType getMaterialType() {
- return materialType;
- }
-
- public MaterialVersion getMaterialVersion() {
- return materialVersion;
- }
-
- public List getAltNames() {
- return altNames;
- }
-
- @Override public String toString() {
- return id + ":" + data;
- }
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/util/PrisonJarReporter.java b/prison-core/src/main/java/tech/mcprison/prison/util/PrisonJarReporter.java
index b9cb8f58d..4086a1f76 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/util/PrisonJarReporter.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/PrisonJarReporter.java
@@ -59,6 +59,15 @@ public enum JavaVersion {
JavaSE_19("3f"),
JavaSE_20("40"),
JavaSE_21("41"),
+ JavaSE_22("42"),
+ JavaSE_23("43"),
+ JavaSE_24("44"),
+ JavaSE_25("45"),
+
+ JavaSE_26("46"), // Confirm with wiki above when it's defined.
+ JavaSE_27("47"), // Confirm with wiki above when it's defined.
+ JavaSE_28("48"), // Confirm with wiki above when it's defined.
+ JavaSE_29("49"), // Confirm with wiki above when it's defined.
JavaSE_UnknownVersion("UnknownJavaVersion")
;
@@ -95,6 +104,37 @@ public PrisonJarReporter() {
this.jarsByPluginName = new TreeMap<>();
}
+ public List getBukkitVersion() {
+ List versionMajMin = new ArrayList<>();
+
+ String version = getBukkitVersionRaw();
+
+ String versionStr = version.substring(
+ version.indexOf( "(MC:" ) + 4, version.lastIndexOf( ")" ) );
+ String[] vMN = versionStr.split( "\\." );
+
+ for ( int x = 0; x < vMN.length; x++ ) {
+ String ver = vMN[x];
+
+ try {
+ versionMajMin.add(
+ Integer.parseInt( ver.trim() ) );
+ }
+ catch ( NumberFormatException e ) {
+ // ignore... just break out:
+ break;
+ }
+ }
+
+ return versionMajMin;
+ }
+
+ public String getBukkitVersionRaw() {
+
+ return Prison.get().getMinecraftVersion();
+// return Bukkit.getVersion();
+ }
+
public class JarFileData {
private String pluginName;
@@ -217,16 +257,6 @@ public void scanForJars() {
// These are not our plugins, so if there is a problem, then it really does not matter
}
-// catch ( ZipException e )
-// {
-// e.printStackTrace();
-// }
-// catch ( IOException e )
-// {
-// e.printStackTrace();
-// }
-
-
}
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/util/PrisonStatsUtil.java b/prison-core/src/main/java/tech/mcprison/prison/util/PrisonStatsUtil.java
index 1b00164f5..be5846f61 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/util/PrisonStatsUtil.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/PrisonStatsUtil.java
@@ -132,6 +132,11 @@ public ChatDisplay displayVersion(String options) {
boolean showLaddersAndRanks = true;
Prison.get().getPlatform().prisonVersionFeatures(display, isBasic, showLaddersAndRanks);
+
+ // check directory structures:
+ checkDirectoryStructures( display );
+
+
return display;
}
@@ -141,6 +146,88 @@ public StringBuilder getSupportSubmitVersionData() {
return text;
}
+
+ public void checkDirectoryStructures(ChatDisplay display) {
+
+
+ display.addText(".");
+ display.addText("&7Prison File System Check:");
+
+ display.addText( checkDirectory( "/" ) );
+ display.addText( checkDirectory( "backpacks" ) );
+ display.addText( checkDirectory( "backups" ) );
+ display.addText( checkDirectory( "data_storage" ) );
+ display.addText( checkDirectory( "data_storage/mines" ) );
+ display.addText( checkDirectory( "data_storage/playerCache" ) );
+ display.addText( checkDirectory( "data_storage/ranksDb" ) );
+ display.addText( checkDirectory( "data_storage/ranksDb/ladders" ) );
+ display.addText( checkDirectory( "data_storage/ranksDb/players" ) );
+ display.addText( checkDirectory( "data_storage/ranksDb/ranks" ) );
+ display.addText( checkDirectory( "module_conf" ) );
+
+ }
+
+ private String checkDirectory( String dirPath ) {
+
+ String pathMask = Prison.get().getDataFolder().getParentFile().getAbsolutePath();
+
+ File path = new File( Prison.get().getDataFolder(), dirPath );
+ boolean pathCreated = path.mkdirs();
+
+ int countDirs = 0;
+ int countFiles = 0;
+ double fileSize = 0;
+ String fileSizeUnit = "";
+
+ File[] files = path.listFiles();
+ for (File f : files) {
+
+ if ( f.isDirectory() ) {
+ countDirs++;
+ }
+ else if ( f.isFile() ) {
+ countFiles++;
+ fileSize += f.length();
+ }
+ }
+
+ if ( fileSize > 0 ) {
+ fileSizeUnit = "bytes";
+
+ if ( fileSize >= 1024 ) {
+ fileSize /= 1024.0;
+ fileSizeUnit = "KB";
+
+ if ( fileSize >= 1024 ) {
+ fileSize /= 1024.0;
+ fileSizeUnit = "MB";
+
+ if ( fileSize >= 1024 ) {
+ fileSize /= 1024.0;
+ fileSizeUnit = "GB";
+
+ }
+ }
+ }
+ }
+
+
+
+ DecimalFormat iFmt = Prison.getDecimalFormatStaticInt();
+ DecimalFormat dFmt = Prison.getDecimalFormatStaticDouble();
+ String msg = String.format(
+ " &bplugins%-40s &2dirs: %s%3s &2files: %s%3s &2totalFileSize: %s%7s &3%s %s",
+ path.getAbsolutePath().replace(pathMask, ""),
+ (countDirs == 0 ? "&3" : "&b"), iFmt.format( countDirs ),
+ (countFiles == 0 ? "&3" : "&b"), iFmt.format( countFiles ),
+ (fileSize == 0 ? "&3" : "&b"), dFmt.format( fileSize ),
+ fileSizeUnit,
+ ( pathCreated ? " &6DirCreated!" : "" )
+ );
+
+ return msg;
+ }
+
public StringBuilder getColorTest() {
StringBuilder sb = new StringBuilder();
@@ -254,13 +341,6 @@ public StringBuilder getSupportSubmitRanksData() {
text.append(Prison.get().getPlatform().getRanksListString());
printFooter(text);
-// List files = listFiles("data_storage/ranksDb/ladders/", ".json");
-// files.addAll(listFiles("data_storage/ranksDb/ranks/", ".json"));
-// for (File file : files) {
-//
-// addFileToText(file, text);
-// }
-
return text;
}
@@ -281,8 +361,6 @@ public StringBuilder getSupportSubmitRanksFileData() {
}
public StringBuilder getSupportSubmitMinesData() {
-// List files = listFiles("data_storage/mines/mines/", ".json");
-// Collections.sort(files);
StringBuilder text = new StringBuilder();
@@ -296,13 +374,6 @@ public StringBuilder getSupportSubmitMinesData() {
// Display a list of all mines, then display the /mines info all for
// each:
text.append(Prison.get().getPlatform().getMinesListString());
-// printFooter(text);
-
-// // get all the file details for each mine:
-// for (File file : files) {
-//
-// addFileToText(file, text);
-// }
return text;
}
@@ -332,48 +403,42 @@ public StringBuilder getSupportSubmitListenersData( String listenerType ) {
listenerType = "all";
}
- if ( "blockBreak".equalsIgnoreCase( listenerType ) || "all".equalsIgnoreCase( listenerType ) ) {
-
- sb.append( "||Listeners blockBreak||" );
- sb.append( Prison.get().getPlatform().dumpEventListenersBlockBreakEvents() );
- }
-
- if ( "blockPlace".equalsIgnoreCase( listenerType ) || "all".equalsIgnoreCase( listenerType ) ) {
-
- sb.append( "||Listeners blockPlace||" );
- sb.append( Prison.get().getPlatform().dumpEventListenersBlockPlaceEvents() );
- }
-
- if ( "chat".equalsIgnoreCase( listenerType ) || "all".equalsIgnoreCase( listenerType ) ) {
-
- sb.append( "||Listeners chat||" );
- sb.append( Prison.get().getPlatform().dumpEventListenersPlayerChatEvents() );
- }
-
-// if ( "traceBlockBreak".equalsIgnoreCase( listenerType ) ) {
-//
-// Prison.get().getPlatform().traceEventListenersBlockBreakEvents( sender );
-//
-// }
-
- if ( "playerInteract".equalsIgnoreCase( listenerType ) || "all".equalsIgnoreCase( listenerType ) ) {
-
- sb.append( "||Listeners playerInteract||" );
- sb.append( Prison.get().getPlatform().dumpEventListenersPlayerInteractEvents() );
- }
-
- if ( "playerDropItem".equalsIgnoreCase( listenerType ) || "all".equalsIgnoreCase( listenerType ) ) {
-
- sb.append( "||Listeners playerDropItem||" );
- sb.append( Prison.get().getPlatform().dumpEventListenersPlayerDropItemEvents() );
- }
-
- if ( "playerPickupItem".equalsIgnoreCase( listenerType ) || "all".equalsIgnoreCase( listenerType ) ) {
-
- sb.append( "||Listeners playerPickupItem||" );
- sb.append( Prison.get().getPlatform().dumpEventListenersPlayerPickupItemEvents() );
- }
-
+ if ( "blockBreak".equalsIgnoreCase( listenerType ) || "all".equalsIgnoreCase( listenerType ) ) {
+
+ sb.append( "||Listeners blockBreak||" );
+ sb.append( Prison.get().getPlatform().dumpEventListenersBlockBreakEvents() );
+ }
+
+ if ( "blockPlace".equalsIgnoreCase( listenerType ) || "all".equalsIgnoreCase( listenerType ) ) {
+
+ sb.append( "||Listeners blockPlace||" );
+ sb.append( Prison.get().getPlatform().dumpEventListenersBlockPlaceEvents() );
+ }
+
+ if ( "chat".equalsIgnoreCase( listenerType ) || "all".equalsIgnoreCase( listenerType ) ) {
+
+ sb.append( "||Listeners chat||" );
+ sb.append( Prison.get().getPlatform().dumpEventListenersPlayerChatEvents() );
+ }
+
+ if ( "playerInteract".equalsIgnoreCase( listenerType ) || "all".equalsIgnoreCase( listenerType ) ) {
+
+ sb.append( "||Listeners playerInteract||" );
+ sb.append( Prison.get().getPlatform().dumpEventListenersPlayerInteractEvents() );
+ }
+
+ if ( "playerDropItem".equalsIgnoreCase( listenerType ) || "all".equalsIgnoreCase( listenerType ) ) {
+
+ sb.append( "||Listeners playerDropItem||" );
+ sb.append( Prison.get().getPlatform().dumpEventListenersPlayerDropItemEvents() );
+ }
+
+ if ( "playerPickupItem".equalsIgnoreCase( listenerType ) || "all".equalsIgnoreCase( listenerType ) ) {
+
+ sb.append( "||Listeners playerPickupItem||" );
+ sb.append( Prison.get().getPlatform().dumpEventListenersPlayerPickupItemEvents() );
+ }
+
return sb;
}
@@ -387,9 +452,9 @@ public StringBuilder getCommandStatsDetailData() {
List cmds = getCommandStats();
cmds.add( 1, "||CommandStats List||" );
- for (String cmd : cmds) {
-
- sb.append( cmd ).append( "\n" );
+ for (String cmd : cmds) {
+
+ sb.append( cmd ).append( "\n" );
}
return sb;
@@ -410,41 +475,41 @@ private List getCommandStats() {
DecimalFormat iFmt = Prison.get().getDecimalFormatInt();
DecimalFormat dFmt = Prison.get().getDecimalFormatDouble();
- TreeSet allCmds = Prison.get().getCommandHandler().getAllRegisteredCommands();
-
- results.add( "Prison Command Stats:" );
- results.add(
- Output.stringFormat( " &a&n%-40s&r &a&n%7s&r &a&n%-11s&r",
- " Commands ", " Usage ", " Avg ms ") );
-
- int count = 0;
- int totals = 0;
- double totalDuration = 0d;
- for (RegisteredCommand cmd : allCmds) {
-
- if ( cmd.getUsageCount() > 0 ) {
-
- double duration = cmd.getUsageRunTimeNanos() / (double) cmd.getUsageCount() / 1000000.0d;
-
- results.add( Output.stringFormat( " &2%-40s &2%7s &2%11s",
- cmd.getCompleteLabel(),
- iFmt.format( cmd.getUsageCount() ),
- dFmt.format( duration )
- ) );
- count++;
- totals += cmd.getUsageCount();
- totalDuration += cmd.getUsageRunTimeNanos();
- }
+ TreeSet allCmds = Prison.get().getCommandHandler().getAllRegisteredCommands();
+
+ results.add( "Prison Command Stats:" );
+ results.add(
+ Output.stringFormat( " &a&n%-40s&r &a&n%7s&r &a&n%-11s&r",
+ " Commands ", " Usage ", " Avg ms ") );
+
+ int count = 0;
+ int totals = 0;
+ double totalDuration = 0d;
+ for (RegisteredCommand cmd : allCmds) {
+
+ if ( cmd.getUsageCount() > 0 ) {
+
+ double duration = cmd.getUsageRunTimeNanos() / (double) cmd.getUsageCount() / 1000000.0d;
+
+ results.add( Output.stringFormat( " &2%-40s &2%7s &2%11s",
+ cmd.getCompleteLabel(),
+ iFmt.format( cmd.getUsageCount() ),
+ dFmt.format( duration )
+ ) );
+ count++;
+ totals += cmd.getUsageCount();
+ totalDuration += cmd.getUsageRunTimeNanos();
+ }
}
-
- results.add( Output.stringFormat(" &3Total Registered Prison Commands: &7%9s", iFmt.format( allCmds.size() )) );
- results.add( Output.stringFormat(" &3Total Prison Commands Listed: &7%9s", iFmt.format( count )) );
- results.add( Output.stringFormat(" &3Total Prison Command Usage: &7%9s", iFmt.format( totals )) );
-
- double avgDuration = totalDuration / (double) count / 1000000.0d;
- results.add( Output.stringFormat(" &3Average Command Duration ms: &7%9s", dFmt.format( avgDuration )) );
-
- results.add( " &d&oNOTE: Async Commands like '/mines reset' will not show actual runtime values. " );
+
+ results.add( Output.stringFormat(" &3Total Registered Prison Commands: &7%9s", iFmt.format( allCmds.size() )) );
+ results.add( Output.stringFormat(" &3Total Prison Commands Listed: &7%9s", iFmt.format( count )) );
+ results.add( Output.stringFormat(" &3Total Prison Command Usage: &7%9s", iFmt.format( totals )) );
+
+ double avgDuration = totalDuration / (double) count / 1000000.0d;
+ results.add( Output.stringFormat(" &3Average Command Duration ms: &7%9s", dFmt.format( avgDuration )) );
+
+ results.add( " &d&oNOTE: Async Commands like '/mines reset' will not show actual runtime values. " );
return results;
@@ -454,13 +519,13 @@ private List getCommandStats() {
public StringBuilder getPrisonBackupLogsData() {
StringBuilder sb = new StringBuilder();
- // Include Prison backup logs:
+ // Include Prison backup logs:
sb.append( "\n\n" );
sb.append( "Prison Backup Logs:" ).append( "\n" );
- List backupLogs = getPrisonBackupLogs();
-
- for (String log : backupLogs) {
- sb.append( Output.decodePercentEncoding(log) ).append( "\n" );
+ List backupLogs = getPrisonBackupLogs();
+
+ for (String log : backupLogs) {
+ sb.append( Output.decodePercentEncoding(log) ).append( "\n" );
}
return sb;
@@ -468,9 +533,9 @@ public StringBuilder getPrisonBackupLogsData() {
public List getPrisonBackupLogs() {
- PrisonBackups prisonBackup = new PrisonBackups();
- List backupLogs = prisonBackup.backupReport02BackupLog();
- return backupLogs;
+ PrisonBackups prisonBackup = new PrisonBackups();
+ List backupLogs = prisonBackup.backupReport02BackupLog();
+ return backupLogs;
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/util/PrisonTPS.java b/prison-core/src/main/java/tech/mcprison/prison/util/PrisonTPSSingleton.java
similarity index 90%
rename from prison-core/src/main/java/tech/mcprison/prison/util/PrisonTPS.java
rename to prison-core/src/main/java/tech/mcprison/prison/util/PrisonTPSSingleton.java
index aab73a7a5..58d6eab47 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/util/PrisonTPS.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/PrisonTPSSingleton.java
@@ -158,9 +158,11 @@
*
*
*/
-public class PrisonTPS
+public class PrisonTPSSingleton
implements PrisonRunnable {
+ private static PrisonTPSSingleton instance;
+
/**
* Note: Normally the task would have to run each tick, but by specifying the
* SUBMIT_TICKS_INTERVAL it can skip a number of ticks to reduce the
@@ -206,6 +208,23 @@ public class PrisonTPS
public static final Object tpsLock = new Object();
+ private PrisonTPSSingleton() {
+ super();
+ }
+
+
+ public static PrisonTPSSingleton getInstance() {
+ if ( instance == null ) {
+ synchronized ( PrisonTPSSingleton.class ) {
+ if ( instance == null ) {
+ instance = new PrisonTPSSingleton();
+ }
+ }
+ }
+ return instance;
+ }
+
+
// When submitted, taskId identifies the job. A value of -1 indicates the job
// failed to be submitted, or is not valid.
private int taskId = -1;
@@ -320,72 +339,63 @@ public void setHighResolution( boolean highResolution ) {
* @return
*/
public double getAverageTPS() {
- double avg = 0d;
-
- int cnt = 0;
-
- // Start collecting readings from the tail-end of the tpsHistory collection
- // since that is the most recent reading:
- synchronized ( tpsLock ) {
-
- for ( int i = tpsHistory.size(); i > 0; i-- ) {
- double reading = tpsHistory.get( i - 1 );
-
- // Ignore readings above TPS_THRESHOLD_TO_RECORD
- if ( reading <= TPS_THRESHOLD_TO_RECORD ) {
- avg += reading;
-
- // Once we get our target count, then break out of the for loop:
- if ( cnt++ < TPS_AVERAGE_READINGS_TO_INCLUDE ) {
- break;
- }
- }
- }
- }
-
- // Do not divide avg by count if zero or one:
- if ( cnt > 1 ) {
- avg /= cnt;
- }
- return avg;
-
- // The following was averaging all counts in the history, including very high values.
- // This is no longer favorable.
-// for (final Double f : tpsHistory) {
-// if (f != null) {
-// avg += f;
-// }
-// }
-// return tpsHistory.size() == 0 ? 0 : avg / tpsHistory.size();
+ double avg = 0d;
+
+ int cnt = 0;
+
+ // Start collecting readings from the tail-end of the tpsHistory collection
+ // since that is the most recent reading:
+ synchronized ( tpsLock ) {
+
+ for ( int i = tpsHistory.size(); i > 0; i-- ) {
+ double reading = tpsHistory.get( i - 1 );
+
+ // Ignore readings above TPS_THRESHOLD_TO_RECORD
+ if ( reading <= TPS_THRESHOLD_TO_RECORD ) {
+ avg += reading;
+
+ // Once we get our target count, then break out of the for loop:
+ if ( cnt++ < TPS_AVERAGE_READINGS_TO_INCLUDE ) {
+ break;
+ }
+ }
+ }
+ }
+
+ // Do not divide avg by count if zero or one:
+ if ( cnt > 1 ) {
+ avg /= cnt;
+ }
+ return avg;
}
public String getAverageTPSFormatted() {
- return tpsFmt.format( getAverageTPS() );
+ return tpsFmt.format( getAverageTPS() );
}
public String getTPSMinFormatted() {
- return tpsFmt.format( getTpsMin() );
+ return tpsFmt.format( getTpsMin() );
}
public String getTPSMaxFormatted() {
- return tpsFmt.format( getTpsMax() );
+ return tpsFmt.format( getTpsMax() );
}
public String getLastFewTPS() {
- StringBuilder sb = new StringBuilder();
-
- int cnt = 0;
-
- synchronized ( tpsLock ) {
-
- for ( int i = tpsHistory.size(); i > 0 && cnt++ < 15; i-- ) {
- sb.append( tpsFmt.format( tpsHistory.get( i - 1 ) ) ).append( " " );
- }
- }
-
- return sb.toString();
+ StringBuilder sb = new StringBuilder();
+
+ int cnt = 0;
+
+ synchronized ( tpsLock ) {
+
+ for ( int i = tpsHistory.size(); i > 0 && cnt++ < 15; i-- ) {
+ sb.append( tpsFmt.format( tpsHistory.get( i - 1 ) ) ).append( " " );
+ }
+ }
+
+ return sb.toString();
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/util/Text.java b/prison-core/src/main/java/tech/mcprison/prison/util/Text.java
index c9af8c48f..8ca681dfb 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/util/Text.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/Text.java
@@ -113,13 +113,13 @@ public class Text
private static DecimalFormat iFmt = Prison.getDecimalFormatStaticInt();
static {
- if ( Prison.get() != null ) {
-
- }
+ if ( Prison.get() != null ) {
+
+ }
}
protected Text() {
- super();
+ super();
}
@@ -352,20 +352,24 @@ public static String implodeCommaAnd(final Collection> objects) {
* @return The translated string.
*/
public static String translateColorCodes(String text, char prefix) {
- return translateColorCodes( text, prefix, COLOR_CHAR, COLOR_CHAR );
+ return translateColorCodes( text, prefix, COLOR_CHAR, COLOR_CHAR );
}
- public static String translateColorCodes(String text, char prefix,
+ private static String translateColorCodes(String text, char prefix,
char targetColorCode, char targetHexColorCode) {
if (prefix == COLOR_CHAR) {
return text; // No need to translate, it's already been translated
}
+ // If the hex color codes are translated here, then it was not marking
+ // 'dirty' as being true, when it actually was.
+ // So to fix, eliminate 'dirty' and always convert the character array to
+ // a String.
char[] b = translateHexColorCodes( text, targetHexColorCode ).toCharArray();
int len = b.length;
- boolean dirty = false;
+// boolean dirty = false;
boolean quote = false;
boolean quoted = false;
@@ -385,11 +389,12 @@ else if ( quote ) {
else if (b[i] == prefix && "0123456789AaBbCcDdEeFfKkLlMmNnOoRr#xX".indexOf(b[i + 1]) > -1) {
b[i] = targetColorCode; // COLOR_CHAR; // 167; // Section symbol
b[i + 1] = Character.toLowerCase(b[i + 1]);
- dirty = true;
+// dirty = true;
}
}
- String results = dirty ? new String(b) : text;
+ String results = new String(b);
+// String results = dirty ? new String(b) : text;
if ( quoted ) {
results = results.replace( "\\Q", "" ).replace( "\\E", "" );
}
@@ -430,8 +435,17 @@ public static String translateAmpColorCodes(String text) {
* @return
*/
public static String translateAmpColorCodesAltHexCode(String text) {
- return translateColorCodes( text, '&', COLOR_CHAR, '&' );
+ return translateColorCodes( text, '&', COLOR_CHAR, '&' );
}
+
+ // NOTE: It's not needed to remove the '&'
+// public static String translateAmpColorCodesAltHex2Code(String text) {
+// if ( text != null && text.contains( "" ) ) {
+// text = text.replace( "", "#" );
+// }
+// return translateColorCodes( text, '&', COLOR_CHAR, '&' );
+// }
+
/**
* Strips the given message of all color codes
*
@@ -460,41 +474,41 @@ public static String stripColor(String text) {
* @param targetColorCode
* @return
*/
- public static String translateHexColorCodes( String text, char targetColorCode ) {
- StringBuilder sb = new StringBuilder();
-
- if ( text != null && !text.trim().isEmpty() ) {
-
- int idxStart = text.indexOf( "\\Q" );
- int idxEnd = -1;
-
- if ( idxStart == -1 ) {
- sb.append( translateHexColorCodesCore( text, targetColorCode ) );
- }
- else {
- while ( idxStart >= 0 ) {
- sb.append( translateHexColorCodesCore(
- text.substring( idxEnd + (idxEnd == -1 ? 1 : 0), idxStart ), targetColorCode) );
-
- idxEnd = text.indexOf( "\\E", idxStart );
-
- if ( idxEnd == -1 ) {
- sb.append( text.substring( idxStart ) );
- idxStart = -1;
- }
- else {
- sb.append( text.substring( idxStart, idxEnd ) );
-
- idxStart = text.indexOf( "\\Q", idxEnd );
- }
- }
- if ( idxStart == -1 && idxEnd >= 0 && (idxEnd) < text.length() ) {
- sb.append( text.substring( idxEnd ) );
- }
- }
- }
-
- return sb.toString();
+ protected static String translateHexColorCodes( String text, char targetColorCode ) {
+ StringBuilder sb = new StringBuilder();
+
+ if ( text != null && !text.trim().isEmpty() ) {
+
+ int idxStart = text.indexOf( "\\Q" );
+ int idxEnd = -1;
+
+ if ( idxStart == -1 ) {
+ sb.append( translateHexColorCodesCore( text, targetColorCode ) );
+ }
+ else {
+ while ( idxStart >= 0 ) {
+ sb.append( translateHexColorCodesCore(
+ text.substring( idxEnd + (idxEnd == -1 ? 1 : 0), idxStart ), targetColorCode) );
+
+ idxEnd = text.indexOf( "\\E", idxStart );
+
+ if ( idxEnd == -1 ) {
+ sb.append( text.substring( idxStart ) );
+ idxStart = -1;
+ }
+ else {
+ sb.append( text.substring( idxStart, idxEnd ) );
+
+ idxStart = text.indexOf( "\\Q", idxEnd );
+ }
+ }
+ if ( idxStart == -1 && idxEnd >= 0 && (idxEnd) < text.length() ) {
+ sb.append( text.substring( idxEnd ) );
+ }
+ }
+ }
+
+ return sb.toString();
}
/**
@@ -506,39 +520,45 @@ public static String translateHexColorCodes( String text, char targetColorCode )
* @param targetColorCode the char value that is used to inject as a color code
* @return
*/
- public static String translateHexColorCodesCore(String message, char targetColorCode) {
- String results = "";
-
- if ( message != null ) {
-
-// final Pattern hexPattern = Pattern.compile(startTag + "([A-Fa-f0-9]{6})" + endTag);
-
- Matcher matcher = HEX_PATTERN.matcher(message);
- StringBuffer buffer = new StringBuffer(message.length() + 4 * 8);
- while (matcher.find()) {
- String group = matcher.group(1);
- matcher.appendReplacement(buffer, targetColorCode + "x"
- + targetColorCode + group.charAt(0) + targetColorCode + group.charAt(1)
- + targetColorCode + group.charAt(2) + targetColorCode + group.charAt(3)
- + targetColorCode + group.charAt(4) + targetColorCode + group.charAt(5)
- );
- }
- results = matcher.appendTail(buffer).toString();
- }
-
- return results;
+ private static String translateHexColorCodesCore(String message, char targetColorCode) {
+ String results = "";
+
+ if ( message != null ) {
+
+ // NOTE: if '' is used, then it will convert the hex codes, but it will also
+ // leave the leading '&' there. So remove the '&' prefix.
+ if ( message != null && message.contains( "" ) ) {
+ message = message.replace( "", "#" );
+ }
+
+ // final Pattern hexPattern = Pattern.compile(startTag + "([A-Fa-f0-9]{6})" + endTag);
+
+ Matcher matcher = HEX_PATTERN.matcher(message);
+ StringBuffer buffer = new StringBuffer(message.length() + 4 * 8);
+ while (matcher.find()) {
+ String group = matcher.group(1);
+ matcher.appendReplacement(buffer, targetColorCode + "x"
+ + targetColorCode + group.charAt(0) + targetColorCode + group.charAt(1)
+ + targetColorCode + group.charAt(2) + targetColorCode + group.charAt(3)
+ + targetColorCode + group.charAt(4) + targetColorCode + group.charAt(5)
+ );
+ }
+ results = matcher.appendTail(buffer).toString();
+ }
+
+ return results;
}
- public static String convertToAmpColorCodes( String textEncoded ) {
+ private static String convertToAmpColorCodes( String textEncoded ) {
- String results = textEncoded;
-
- if ( textEncoded != null && textEncoded.contains( COLOR_ ) ) {
- results = textEncoded.replaceAll( COLOR_, "&" );
- }
-
- return results;
+ String results = textEncoded;
+
+ if ( textEncoded != null && textEncoded.contains( COLOR_ ) ) {
+ results = textEncoded.replaceAll( COLOR_, "&" );
+ }
+
+ return results;
}
/**
@@ -553,7 +573,7 @@ public static String convertToAmpColorCodes( String textEncoded ) {
* @return
*/
public static String escapeAmpCodes( String textEncoded ) {
- return convertToAmpColorCodes(textEncoded).replaceAll("&", "U+0026");
+ return convertToAmpColorCodes(textEncoded).replaceAll("&", "U+0026");
}
/**
@@ -629,17 +649,17 @@ public static String tab(String text) {
* @return The human-readable string.
*/
public static String getTimeUntilString(long millis) {
- return getTimeUntilString( millis, unitMillis, unitPrefixSpacer, null );
+ return getTimeUntilString( millis, unitMillis, unitPrefixSpacer, null );
}
public static String getTimeUntilString(long millis, String spaces ) {
- return getTimeUntilString( millis, unitMillis, spaces, null );
+ return getTimeUntilString( millis, unitMillis, spaces, null );
}
public static String getTimeUntilShortString(long millis, String spaces ) {
- return getTimeUntilString( millis, unitMillisShort, spaces, null );
+ return getTimeUntilString( millis, unitMillisShort, spaces, null );
}
public static String getTimeUntilColonsString(long millis, String spaces ) {
- DecimalFormat dFmt = new DecimalFormat( "00" );
- return getTimeUntilString( millis, unitMillisColons, spaces, dFmt );
+ DecimalFormat dFmt = new DecimalFormat( "00" );
+ return getTimeUntilString( millis, unitMillisColons, spaces, dFmt );
}
private static String getTimeUntilString(long millis, Map units,
String unitSpacer, DecimalFormat dFmt ) {
@@ -705,16 +725,16 @@ public static String pluralize(String baseNoun, int quantity) {
public static String formatTimeDaysHhMmSs( long timeMs ) {
- DecimalFormat iFmt = Prison.getDecimalFormatStaticInt();
- DecimalFormat tFmt = Prison.getDecimalFormatStatic("00");
+ DecimalFormat iFmt = Prison.getDecimalFormatStaticInt();
+ DecimalFormat tFmt = Prison.getDecimalFormatStatic("00");
// SimpleDateFormat sdFmt = new SimpleDateFormat( "HH:mm:ss" );
// long _sec = 1000;
// long _min = _sec * 60;
// long _hour = _min * 60;
// long _day = _hour * 24;
-
- long ms = timeMs;
+
+ long ms = timeMs;
long days = millisPerDay < ms ? ms / millisPerDay : 0;
ms -= (days * millisPerDay);
@@ -740,22 +760,18 @@ public static String formatTimeDaysHhMmSs( long timeMs ) {
public static List formatTreeMapStats( TreeMap statMap,
int columns ) {
- return formatTreeMapStats( statMap, columns, false );
+ return formatTreeMapStats( statMap, columns, false );
}
public static List formatTreeMapStats( TreeMap statMap,
int columns, boolean timeFormat ) {
- List msgs = new ArrayList<>();
+ List msgs = new ArrayList<>();
Set keys = statMap.keySet();
List values = new ArrayList<>();
-// List valueMaxLen = new ArrayList<>();
-
-// StringBuilder sb = new StringBuilder();
-// int count = 0;
for ( String earningKey : keys )
{
@@ -784,84 +800,31 @@ else if ( valueObj instanceof Long ) {
String msg = String.format( "&3%s&8: &b%s", earningKey, value ).trim();
-// String msgNoColor = Text.stripColor( msg );
-// int lenMNC = msgNoColor.length();
-//
-//
-// int col = values.size() % columns;
values.add( msg );
-// if ( col >= valueMaxLen.size() || lenMNC > valueMaxLen.get( col ) ) {
-//
-// if ( col > valueMaxLen.size() - 1 ) {
-// valueMaxLen.add( lenMNC );
-// }
-// else {
-//
-// valueMaxLen.set( col, lenMNC );
-// }
-// }
}
msgs = formatColumnsFromList( values, columns );
-
-// for ( int j = 0; j < values.size(); j++ )
-// {
-// String msg = values.get( j );
-//
-// int col = j % columns;
-//
-// int maxColumnWidth = col > valueMaxLen.size() - 1 ?
-// msg.length() :
-// valueMaxLen.get( col );
-//
-// sb.append( msg );
-//
-// // Pad the right of all content with spaces to align columns, up to a
-// // given maxLength:
-// String msgNoColor = Text.stripColor( msg );
-// int lenMNC = msgNoColor.length();
-// for( int i = lenMNC; i < maxColumnWidth; i++ ) {
-// sb.append( " " );
-// }
-//
-// // The spacer:
-// sb.append( " " );
-//
-// if ( ++count % columns == 0 ) {
-// msgs.add( String.format(
-// " " + sb.toString() ) );
-// sb.setLength( 0 );
-//
-// }
-// }
-//
-// if ( sb.length() > 0 ) {
-//
-// msgs.add( String.format(
-// " " + sb.toString() ) );
-// }
-
- return msgs;
+
+ return msgs;
}
public static List formatColumnsFromList( List textItems,
int columns ) {
- List msgs = new ArrayList<>();
-
- List valueMaxLen = new ArrayList<>();
-
- StringBuilder sb = new StringBuilder();
- int count = 0;
-
- // Find the maxLenght value for each column that will be generated:
- for ( int i = 0; i < textItems.size(); i++ )
- {
- String msg = textItems.get( i );
-
- String msgNoColor = Text.stripColor( msg );
+ List msgs = new ArrayList<>();
+
+ List valueMaxLen = new ArrayList<>();
+
+ StringBuilder sb = new StringBuilder();
+ int count = 0;
+
+ // Find the maxLenght value for each column that will be generated:
+ for ( int i = 0; i < textItems.size(); i++ ) {
+ String msg = textItems.get( i );
+
+ String msgNoColor = Text.stripColor( msg );
int lenMNC = msgNoColor.length();
@@ -878,7 +841,7 @@ public static List formatColumnsFromList( List textItems,
}
}
}
-
+
for ( int j = 0; j < textItems.size(); j++ )
{
@@ -910,14 +873,14 @@ public static List formatColumnsFromList( List textItems,
}
}
-
+
if ( sb.length() > 0 ) {
msgs.add( String.format(
" " + sb.toString() ) );
}
-
- return msgs;
+
+ return msgs;
}
}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/util/Vector.java b/prison-core/src/main/java/tech/mcprison/prison/util/Vector.java
index 46c93e2ee..b9695b6f1 100644
--- a/prison-core/src/main/java/tech/mcprison/prison/util/Vector.java
+++ b/prison-core/src/main/java/tech/mcprison/prison/util/Vector.java
@@ -20,6 +20,7 @@
import tech.mcprison.prison.internal.World;
+import java.text.DecimalFormat;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Random;
@@ -616,7 +617,8 @@ public int getBlockZ() {
* to account for floating point errors. The epsilon can be retrieved
* with epsilon.
*/
- @Override public boolean equals(Object obj) {
+ @Override
+ public boolean equals(Object obj) {
if (!(obj instanceof Vector)) {
return false;
}
@@ -632,7 +634,8 @@ public int getBlockZ() {
*
* @return hash code
*/
- @Override public int hashCode() {
+ @Override
+ public int hashCode() {
int hash = 7;
hash = 79 * hash + (int) (Double.doubleToLongBits(this.x) ^ (Double.doubleToLongBits(this.x)
@@ -649,7 +652,8 @@ public int getBlockZ() {
*
* @return vector
*/
- @Override public Vector clone() {
+ @Override
+ public Vector clone() {
try {
return (Vector) super.clone();
} catch (CloneNotSupportedException e) {
@@ -660,8 +664,19 @@ public int getBlockZ() {
/**
* Returns this vector's components as x,y,z.
*/
- @Override public String toString() {
- return x + "," + y + "," + z;
+ @Override
+ public String toString() {
+
+ DecimalFormat dFmt = new DecimalFormat( "##0.0000" );
+
+ String msg = String.format(
+ "x: %8s y: %8s z: %8s",
+ dFmt.format( getX() ),
+ dFmt.format( getY() ),
+ dFmt.format( getZ() )
+ );
+
+ return msg;
}
/**
diff --git a/prison-core/src/main/java/tech/mcprison/prison/wip/internal/heads/MinecraftHeadData.java b/prison-core/src/main/java/tech/mcprison/prison/wip/internal/heads/MinecraftHeadData.java
new file mode 100644
index 000000000..277131951
--- /dev/null
+++ b/prison-core/src/main/java/tech/mcprison/prison/wip/internal/heads/MinecraftHeadData.java
@@ -0,0 +1,76 @@
+package tech.mcprison.prison.wip.internal.heads;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import tech.mcprison.prison.wip.internal.heads.MinecraftHeadsCache.MinecraftHeadsCategory;
+
+public class MinecraftHeadData {
+
+ private MinecraftHeadsCategory category;
+ private String name;
+ private String uuid;
+ private String value;
+ private String tags;
+
+ private boolean used;
+
+ private transient List tagList;
+
+ public MinecraftHeadData() {
+ super();
+
+ this.used = false;
+
+ this.tagList = new ArrayList<>();
+ }
+
+ public MinecraftHeadsCategory getCategory() {
+ return category;
+ }
+ public void setCategory(MinecraftHeadsCategory category) {
+ this.category = category;
+ }
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getUuid() {
+ return uuid;
+ }
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ public String getValue() {
+ return value;
+ }
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String getTags() {
+ return tags;
+ }
+ public void setTags(String tags) {
+ this.tags = tags;
+ }
+
+ public List getTagList() {
+ return tagList;
+ }
+ public void setTagList(List tagList) {
+ this.tagList = tagList;
+ }
+
+ public boolean isUsed() {
+ return used;
+ }
+ public void setUsed(boolean used) {
+ this.used = used;
+ }
+}
diff --git a/prison-core/src/main/java/tech/mcprison/prison/wip/internal/heads/MinecraftHeadsCache.java b/prison-core/src/main/java/tech/mcprison/prison/wip/internal/heads/MinecraftHeadsCache.java
new file mode 100644
index 000000000..c62cff466
--- /dev/null
+++ b/prison-core/src/main/java/tech/mcprison/prison/wip/internal/heads/MinecraftHeadsCache.java
@@ -0,0 +1,196 @@
+package tech.mcprison.prison.wip.internal.heads;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+public class MinecraftHeadsCache {
+
+ private static MinecraftHeadsCache instance;
+
+ private Date headDataDownloadDate;
+
+ private transient TreeSet tags;
+
+ private List headData;
+
+ private transient TreeMap> headDataByCategory;
+
+ private transient TreeMap headDataByUuid;
+
+ private transient TreeMap> headDataByTags;
+
+ public enum MinecraftHeadsCategory {
+ alphabet,
+ animals,
+ blocks,
+ decoration,
+ fooddrink("food-drinks"),
+ humans,
+ humanoid,
+ miscellaneous,
+ monsters,
+ plants;
+
+ private final String value;
+ private MinecraftHeadsCategory() {
+ this.value = this.name();
+ }
+ private MinecraftHeadsCategory( String value ) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+ }
+
+ private MinecraftHeadsCache() {
+ super();
+
+ this.headDataDownloadDate = null;
+
+ this.tags = new TreeSet<>();
+
+ this.headData = new ArrayList<>();
+
+ this.headDataByUuid = new TreeMap<>();
+
+ this.headDataByTags = new TreeMap<>();
+ }
+
+ public static MinecraftHeadsCache getInstance() {
+ if ( instance == null ) {
+
+ synchronized ( MinecraftHeadsCache.class ) {
+ if ( instance == null ) {
+ instance = new MinecraftHeadsCache();
+ }
+ }
+ }
+
+ return instance;
+ }
+
+
+ /**
+ * After the headData is loaded from the file system, this function will build
+ * the associated indexes to allow the heads to be accessed in various ways.
+ *
+ *
+ */
+ public void parseHeadData( boolean purgeUnused ) {
+ List purge = new ArrayList<>();
+
+ for (MinecraftHeadData head : this.headData ) {
+
+ if ( purgeUnused && !head.isUsed() ) {
+ purge.add( head );
+ }
+
+ else {
+
+ // Build the category index:
+ if ( !getHeadDataByCategory().containsKey( head.getCategory() ) ) {
+ getHeadDataByCategory().put( head.getCategory(), new ArrayList<>() );
+ }
+ getHeadDataByCategory().get( head.getCategory() ).add( head );
+
+ // build uuid index:
+ if ( !getHeadDataByUuid().containsKey( head.getUuid() ) ) {
+ getHeadDataByUuid().put( head.getUuid(), head );
+ }
+
+ // Extract tags:
+ if ( head.getTags() != null ) {
+ List tagz = Arrays.asList(
+ head.getTags().toLowerCase().split(",") );
+ // Extract "tags" in the name field that are within parenthesis:
+ getTagFromName( head.getName(), tagz );
+
+ for ( String tag : tagz ) {
+
+ // Add to tag collection:
+ if ( !getTags().contains( tag ) ) {
+ getTags().add( tag );
+ }
+
+ if ( !getHeadDataByTags().containsKey( tag ) ) {
+ getHeadDataByTags().put( tag, new ArrayList<>() );
+ }
+ getHeadDataByTags().get( tag ).add( head );
+
+ }
+
+ }
+ }
+
+ }
+
+
+ if ( purgeUnused && purge.size() > 0 ) {
+ getHeadData().removeAll( purge );
+ }
+ }
+
+ private void getTagFromName(String name, List tagz) {
+
+ int b = name.indexOf('(');
+ int e = name.indexOf(')');
+
+ if ( b != -1 && e != -1 && b < e ) {
+ String tag = name.substring( b + 1, e ).toLowerCase();
+ tagz.add( tag );
+ }
+ }
+
+ public Date getHeadDataDownloadDate() {
+ return headDataDownloadDate;
+ }
+ public void setHeadDataDownloadDate(Date headDataDownloadDate) {
+ this.headDataDownloadDate = headDataDownloadDate;
+ }
+
+ public TreeSet getTags() {
+ return tags;
+ }
+
+ public void setTags(TreeSet tags) {
+ this.tags = tags;
+ }
+
+ public List getHeadData() {
+ return headData;
+ }
+
+ public void setHeadData(List headData) {
+ this.headData = headData;
+ }
+
+ public TreeMap> getHeadDataByCategory() {
+ return headDataByCategory;
+ }
+
+ public void setHeadDataByCategory(TreeMap> headDataByCategory) {
+ this.headDataByCategory = headDataByCategory;
+ }
+
+ public TreeMap getHeadDataByUuid() {
+ return headDataByUuid;
+ }
+
+ public void setHeadDataByUuid(TreeMap headDataByUuid) {
+ this.headDataByUuid = headDataByUuid;
+ }
+
+ public TreeMap> getHeadDataByTags() {
+ return headDataByTags;
+ }
+
+ public void setHeadDataByTags(TreeMap> headDataByTags) {
+ this.headDataByTags = headDataByTags;
+ }
+}
diff --git a/prison-core/src/main/resources/lang/core/de_DE.properties b/prison-core/src/main/resources/lang/core/de_DE.properties
index fa3866cf2..7f986035d 100644
--- a/prison-core/src/main/resources/lang/core/de_DE.properties
+++ b/prison-core/src/main/resources/lang/core/de_DE.properties
@@ -79,7 +79,7 @@
# like to share, please contact a staff member on our Discord server.
#Thanks for your contributions!
#
-messages__version=10
+messages__version=11
messages__auto_refresh=true
@@ -232,3 +232,7 @@ core_ranks_topn__player_line_2_detail_format= [-3] [-10] [7] [-18] [9]
core_ranks_topn__player_line_2_detail_values={rankPosition}, {prestigeDefaultRankTagNoColor}, {rankScore}, {playerName}, {balanceKmbt}
+## Please note there is another similar message in the spigot module:
+## spigot_minebombs__cooldown_delay
+core_minebombs__cooldown_delay=You cannot use another Prison Mine Bomb for %1 seconds.
+
diff --git a/prison-core/src/main/resources/lang/core/en_GB.properties b/prison-core/src/main/resources/lang/core/en_GB.properties
index 469ec9e69..630cb8cdb 100644
--- a/prison-core/src/main/resources/lang/core/en_GB.properties
+++ b/prison-core/src/main/resources/lang/core/en_GB.properties
@@ -76,7 +76,7 @@
# like to share, please contact a staff member on our Discord server.
#Thanks for your contributions!
#
-messages__version=10
+messages__version=11
messages__auto_refresh=true
@@ -232,3 +232,7 @@ core_ranks_topn__player_line_2_detail_format= [-3] [-10] [7] [-18] [9]
core_ranks_topn__player_line_2_detail_values={rankPosition}, {prestigeDefaultRankTagNoColor}, {rankScore}, {playerName}, {balanceKmbt}
+## Please note there is another similar message in the spigot module:
+## spigot_minebombs__cooldown_delay
+core_minebombs__cooldown_delay=You cannot use another Prison Mine Bomb for %1 seconds.
+
diff --git a/prison-core/src/main/resources/lang/core/en_US.properties b/prison-core/src/main/resources/lang/core/en_US.properties
index 19f7bb39a..58c4e21a3 100644
--- a/prison-core/src/main/resources/lang/core/en_US.properties
+++ b/prison-core/src/main/resources/lang/core/en_US.properties
@@ -76,7 +76,7 @@
# like to share, please contact a staff member on our Discord server.
#Thanks for your contributions!
#
-messages__version=11
+messages__version=12
messages__auto_refresh=true
@@ -232,4 +232,8 @@ core_ranks_topn__player_line_2_detail_format= [-3] [-10] [7] [-18] [9]
core_ranks_topn__player_line_2_detail_values={rankPosition}, {prestigeDefaultRankTagNoColor}, {rankScore}, {playerName}, {balanceKmbt}
+## Please note there is another similar message in the spigot module:
+## spigot_minebombs__cooldown_delay
+core_minebombs__cooldown_delay=You cannot use another Prison Mine Bomb for %1 seconds.
+
diff --git a/prison-core/src/main/resources/lang/core/es_ES.properties b/prison-core/src/main/resources/lang/core/es_ES.properties
index 071440daf..41e3dfc3d 100644
--- a/prison-core/src/main/resources/lang/core/es_ES.properties
+++ b/prison-core/src/main/resources/lang/core/es_ES.properties
@@ -76,133 +76,133 @@
# like to share, please contact a staff member on our Discord server.
#Thanks for your contributions!
#
-messages__version=10
+messages__version=12
messages__auto_refresh=true
core_output__prefix_template=| %1 | &7
-core_output__prefix_template_prison=Prison
-core_output__prefix_template_info=Info
-core_output__prefix_template_warning=Warning
+core_output__prefix_template_prison=Prisión
+core_output__prefix_template_info=Información
+core_output__prefix_template_warning=Advertencia
core_output__prefix_template_error=Error
-core_output__prefix_template_debug=Debug
+core_output__prefix_template_debug=Depurar
core_output__color_code_info=&3
core_output__color_code_warning=&c
core_output__color_code_error=&c
core_output__color_code_debug=&b
-core_output__error_startup_failure=Prison: (Sending to System.err due to Output.log Logger failure):
-core_output__error_incorrect_number_of_parameters=Log Failure (%1): Incorrect number of parameters: [%2] Original raw message: [%3] Arguments: %4
+core_output__error_startup_failure=Prisión: (Enviando a System.err debido a falla en el registro de salida):
+core_output__error_incorrect_number_of_parameters=Falla en el registro (%1): Número incorrecto de parámetros: [%2] Mensaje en bruto original: [%3] Argumentos: %4
core_text__prefix=&3
-core_text__just_now=just now
-core_text__ago=ago
-core_text__from_now=from now
-core_text__and=and
+core_text__just_now=justo ahora
+core_text__ago=hace
+core_text__from_now=dentro de
+core_text__and=y
core_text__time_units_prefix_spacer=
-core_text__time_units_singular=year,month,week,day,hour,minute,second
-core_text__time_units_plural=years,months,weeks,days,hours,minutes,seconds
-core_text__time_units_short=y,m,w,d,h,m,s
+core_text__time_units_singular=año,mes,semana,dÃa,hora,minuto,segundo
+core_text__time_units_plural=años,meses,semanas,dÃas,horas,minutos,segundos
+core_text__time_units_short=a,m,s,d,h,m,s
-core_tokens__name_required=Prison Tokens=A player's name is required when used from console.
-core_tokens__cannot_view_others_balances=Prison Tokens: You do not have permission to view other player's balances.
-core_tokens__view_balance=&3%1 has %2 tokens.
-core_tokens__add_invalid_amount=Prison Tokens: Invalid amount: '%1'. Must be greater than zero.
-core_tokens__added_amount=&3%1 now has &7%2 &3tokens after adding &7%3&3.
-core_tokens__removed_amount=&3%1 now has &7%2 &3tokens after removing &7%3&3.
-core_tokens__set_amount=&3%1 now has &7%2 &3tokens.
+core_tokens__name_required=Tokens de la Prisión=Se requiere un nombre de jugador cuando se usa desde la consola.
+core_tokens__cannot_view_others_balances=Tokens de la Prisión: No tienes permiso para ver los saldos de otros jugadores.
+core_tokens__view_balance=&3%1 tiene %2 tokens.
+core_tokens__add_invalid_amount=Tokens de la Prisión: Cantidad inválida: '%1'. Debe ser mayor que cero.
+core_tokens__added_amount=&3%1 ahora tiene &7%2 &3tokens después de agregar &7%3&3.
+core_tokens__removed_amount=&3%1 ahora tiene &7%2 &3tokens después de eliminar &7%3&3.
+core_tokens__set_amount=&3%1 ahora tiene &7%2 &3tokens.
-core_runCmd__name_required=A valid player name is required.
-core_runCmd__command_required=A command is required.
+core_runCmd__name_required=Se requiere un nombre de jugador válido.
+core_runCmd__command_required=Se requiere un comando.
+
+
+core_prison_utf8_test=Привет! Давай поÑмотрим, работает ли? Test 01
# The following are the original messages and they will eventually be replaced.
includeError=[%1] tiene un valor inválido.
excludeError=[%1] tiene un valor inválido.
-cantAsConsole=No puedes realizar esto desde la consola.
-missingArgument=The argument [%1] no está definido (no tiene valor predeterminado).
+cantAsConsole=No puedes hacer esto como consola.
+missingArgument=El argumento [%1] no está definido (no tiene un valor predeterminado).
missingFlagArgument=La bandera -%1 no tiene los parámetros requeridos.
-undefinedFlagArgument= [%1] para la bandera -%2 no está definido.
-internalErrorOccurred=Un error interno ha ocurrido al ejecutar este comando.
-noPermission=No tienes los permisos requeridos para ejecutar este comando.
+undefinedFlagArgument=El argumento [%1] de la bandera -%2 no está definido.
+internalErrorOccurred=Se produjo un error interno al intentar realizar este comando.
+noPermission=Le faltan los permisos necesarios para realizar este comando.
blockParseError=El parámetro [%1] no es un bloque válido.
numberParseError=El parámetro [%1] no es un número.
-numberTooLow=El parámetro [%1] debe ser igual o mayor a %2.
-numberTooHigh=El parámetro [%1] debe ser igual o menor a %2.
-numberRangeError=El parámetro [%1] debe ser igual o mayor a %2 y menor o igual a %3.
-tooFewCharacters=El parámetro [%1] debe ser igual o mayor a %2 caracteres.
-tooManyCharacters=El parámetro [%1] debe ser igual o menor a %2 caracteres.
-playerNotOnline=El jugador %1 no se encuentra conectado.
-worldNotFound=El mundo %1 no ha sido encontrado.
-
-
-
+numberTooLow=El parámetro [%1] debe ser igual o mayor que %2.
+numberTooHigh=El parámetro [%1] debe ser igual o menor que %2.
+numberRangeError=El parámetro [%1] debe ser igual o mayor que %2 y menor o igual que %3.
+tooFewCharacters=El parámetro [%1] debe tener igual o mayor que %2 caracteres.
+tooManyCharacters=El parámetro [%1] debe tener igual o menor que %2 caracteres.
+playerNotOnline=El jugador %1 no está en lÃnea.
+worldNotFound=El mundo %1 no se encontró.
-core_gui__click_to_decrease=&3Click to decrease.
-core_gui__click_to_increase=&3Click to increase.
+core_gui__click_to_decrease=&3Haz clic para disminuir.
+core_gui__click_to_increase=&3Haz clic para aumentar.
-core_gui__click_to_cancel=&3Click to cancel.
-core_gui__click_to_close=&3Click to close.
-core_gui__click_to_confirm=&3Click to confirm.
-core_gui__click_to_delete=&3Click to delete.
-core_gui__click_to_disable=&3Click to disable.
-core_gui__click_to_edit=&3Click to edit.
-core_gui__click_to_enable=&3Click to enable.
-core_gui__click_to_open=&3Click to open.
+core_gui__click_to_cancel=&3Haz clic para cancelar.
+core_gui__click_to_close=&3Haz clic para cerrar.
+core_gui__click_to_confirm=&3Haz clic para confirmar.
+core_gui__click_to_delete=&3Haz clic para eliminar.
+core_gui__click_to_disable=&3Haz clic para desactivar.
+core_gui__click_to_edit=&3Haz clic para editar.
+core_gui__click_to_enable=&3Haz clic para habilitar.
+core_gui__click_to_open=&3Haz clic para abrir.
-core_gui__left_click_to_confirm=&3Left-Click to confirm.
-core_gui__left_click_to_reset=&3Left-Click to reset.
-core_gui__left_click_to_open=&3Left-Click to open.
-core_gui__left_click_to_edit=&3Left-Click to edit.
+core_gui__left_click_to_confirm=&3Haz clic izquierdo para confirmar.
+core_gui__left_click_to_reset=&3Haz clic izquierdo para restablecer.
+core_gui__left_click_to_open=&3Haz clic izquierdo para abrir.
+core_gui__left_click_to_edit=&3Haz clic izquierdo para editar.
-core_gui__right_click_to_cancel=&3Right-Click to cancel.
-core_gui__right_click_to_delete=&3Right-Click to delete.
-core_gui__right_click_to_disable=&3Right-Click to disable.
-core_gui__right_click_to_enable=&3Right-Click to enable.
-core_gui__right_click_to_toggle=&3Right-Click to toggle.
+core_gui__right_click_to_cancel=&3Haz clic derecho para cancelar.
+core_gui__right_click_to_delete=&3Haz clic derecho para eliminar.
+core_gui__right_click_to_disable=&3Haz clic derecho para desactivar.
+core_gui__right_click_to_enable=&3Haz clic derecho para habilitar.
+core_gui__right_click_to_toggle=&3Haz clic derecho para alternar.
-core_gui__right_click_and_shift_to_delete=&3Right-Click and shift to delete.
-core_gui__right_click_and_shift_to_disable=&3Right-Click and shift to disable.
-core_gui__right_click_and_shift_to_toggle=&3Right-Click and shift to toggle.
+core_gui__right_click_and_shift_to_delete=&3Haz clic derecho y shift para eliminar.
+core_gui__right_click_and_shift_to_disable=&3Haz clic derecho y shift para desactivar.
+core_gui__right_click_and_shift_to_toggle=&3Haz clic derecho y shift para alternar.
-core_gui__page_next=&3Next page.
-core_gui__page_prior=&3Prior page.
+core_gui__page_next=&3Página siguiente.
+core_gui__page_prior=&3Página anterior.
# Note: The core_gui__page_tools_ messages all use the following placeholders
# so you can structure them any way you need to. You not no have to use
# any of them, but you can also use all of them.
# {first_page} {prior_page} {current_page} {next_page} {last_page}
-core_gui__page_tools_close=&3Close
-core_gui__page_tools_go_back=&3Go Back
-core_gui__page_tools_first_page=&3Prior page: {first_page} of {last_page}
-core_gui__page_tools_prior_page=&3Prior page: {prior_page} of {last_page}
-core_gui__page_tools_current_page=&3Current page: {current_page} of {last_page}
-core_gui__page_tools_next_page=&3Next page: {next_page} of {last_page}
-core_gui__page_tools_last_page=&3Last page: {last_page} of {last_page}
+core_gui__page_tools_close=&3Cerrar
+core_gui__page_tools_go_back=&3Volver
+core_gui__page_tools_first_page=&3Página anterior: {first_page} de {last_page}
+core_gui__page_tools_prior_page=&3Página anterior: {prior_page} de {last_page}
+core_gui__page_tools_current_page=&3Página actual: {current_page} de {last_page}
+core_gui__page_tools_next_page=&3Página siguiente: {next_page} de {last_page}
+core_gui__page_tools_last_page=&3Última página: {last_page} de {last_page}
-core_gui__money_earned=&3You earned &a$%1
-core_gui__price=&3Price: %1
-core_gui__confirm=&3Confirm: %1 %2
-core_gui__delay=&3Delay: %1 secs
-core_gui__multiplier=&3Multiplier: x %1
-core_gui__value=&3Value: %1
-core_gui__permission=&3Permission: &7%1
-core_gui__prestige_name=&3Prestige name: %1
+core_gui__money_earned=&3Ganaste &a$%1
+core_gui__price=&3Precio: %1
+core_gui__confirm=&3Confirmar: %1 %2
+core_gui__delay=&3Retraso: %1 segs
+core_gui__multiplier=&3Multiplicador: x %1
+core_gui__value=&3Valor: %1
+core_gui__permission=&3Permiso: &7%1
+core_gui__prestige_name=&3Nombre de prestigio: %1
@@ -215,9 +215,9 @@ core_gui__prestige_name=&3Prestige name: %1
# Important: Every [] must be paired with a value or it will produce a runtime error:
# 'Incorrect number of parameters: [Format specifier %s]
core_ranks_topn__player_line_1_header_format=[4] [-18] [-10] [11] [-8] [-12]
-core_ranks_topn__player_line_1_header_values=Rank, Player, PreDefRanks, Balance, r-Score, Penalty
+core_ranks_topn__player_line_1_header_values=Rango, Jugador, PreDefRanks, Balance, r-Score, Penalización
core_ranks_topn__player_line_2_header_format=[4] [-10] [7] [-18] [9]
-core_ranks_topn__player_line_2_header_values=Rank, Ranks, r-Score, Player, Balance
+core_ranks_topn__player_line_2_header_values=Rango, Rangos, r-Score, Jugador, Balance
# For detail_values you can use any of the following placeholders, but they must pair up
# with the detail_format's [].
@@ -232,3 +232,6 @@ core_ranks_topn__player_line_2_detail_format= [-3] [-10] [7] [-18] [9]
core_ranks_topn__player_line_2_detail_values={rankPosition}, {prestigeDefaultRankTagNoColor}, {rankScore}, {playerName}, {balanceKmbt}
+## Please note there is another similar message in the spigot module:
+## spigot_minebombs__cooldown_delay
+core_minebombs__cooldown_delay=You cannot use another Prison Mine Bomb for %1 seconds.
diff --git a/prison-core/src/main/resources/lang/core/fi_FI.properties b/prison-core/src/main/resources/lang/core/fi_FI.properties
index 10574cbf5..735000ce3 100644
--- a/prison-core/src/main/resources/lang/core/fi_FI.properties
+++ b/prison-core/src/main/resources/lang/core/fi_FI.properties
@@ -76,7 +76,7 @@
# like to share, please contact a staff member on our Discord server.
#Thanks for your contributions!
#
-messages__version=11
+messages__version=12
messages__auto_refresh=true
@@ -232,3 +232,6 @@ core_ranks_topn__player_line_2_detail_format= [-3] [-10] [7] [-18] [9]
core_ranks_topn__player_line_2_detail_values={rankPosition}, {prestigeDefaultRankTagNoColor}, {rankScore}, {playerName}, {balanceKmbt}
+## Please note there is another similar message in the spigot module:
+## spigot_minebombs__cooldown_delay
+core_minebombs__cooldown_delay=You cannot use another Prison Mine Bomb for %1 seconds.
diff --git a/prison-core/src/main/resources/lang/core/fr_FR.properties b/prison-core/src/main/resources/lang/core/fr_FR.properties
index a9d319fad..b45c2bd32 100644
--- a/prison-core/src/main/resources/lang/core/fr_FR.properties
+++ b/prison-core/src/main/resources/lang/core/fr_FR.properties
@@ -76,7 +76,7 @@
# like to share, please contact a staff member on our Discord server.
#Thanks for your contributions!
#
-messages__version=11
+messages__version=12
messages__auto_refresh=true
@@ -232,3 +232,6 @@ core_ranks_topn__player_line_2_detail_format= [-3] [-10] [7] [-18] [9]
core_ranks_topn__player_line_2_detail_values={rankPosition}, {prestigeDefaultRankTagNoColor}, {rankScore}, {playerName}, {balanceKmbt}
+## Please note there is another similar message in the spigot module:
+## spigot_minebombs__cooldown_delay
+core_minebombs__cooldown_delay=You cannot use another Prison Mine Bomb for %1 seconds.
diff --git a/prison-core/src/main/resources/lang/core/hu_HU.properties b/prison-core/src/main/resources/lang/core/hu_HU.properties
index 7e4062aa0..85059ca8d 100644
--- a/prison-core/src/main/resources/lang/core/hu_HU.properties
+++ b/prison-core/src/main/resources/lang/core/hu_HU.properties
@@ -76,7 +76,7 @@
# like to share, please contact a staff member on our Discord server.
#Thanks for your contributions!
#
-messages__version=10
+messages__version=11
messages__auto_refresh=true
@@ -232,3 +232,6 @@ core_ranks_topn__player_line_2_detail_format= [-3] [-10] [7] [-18] [9]
core_ranks_topn__player_line_2_detail_values={rankPosition}, {prestigeDefaultRankTagNoColor}, {rankScore}, {playerName}, {balanceKmbt}
+## Please note there is another similar message in the spigot module:
+## spigot_minebombs__cooldown_delay
+core_minebombs__cooldown_delay=You cannot use another Prison Mine Bomb for %1 seconds.
diff --git a/prison-core/src/main/resources/lang/core/it_IT.properties b/prison-core/src/main/resources/lang/core/it_IT.properties
index 1a2f28993..08f1fbe6e 100644
--- a/prison-core/src/main/resources/lang/core/it_IT.properties
+++ b/prison-core/src/main/resources/lang/core/it_IT.properties
@@ -76,7 +76,7 @@
# like to share, please contact a staff member on our Discord server.
#Thanks for your contributions!
#
-messages__version=10
+messages__version=11
messages__auto_refresh=true
@@ -232,3 +232,6 @@ core_ranks_topn__player_line_2_detail_format= [-3] [-10] [7] [-18] [9]
core_ranks_topn__player_line_2_detail_values={rankPosition}, {prestigeDefaultRankTagNoColor}, {rankScore}, {playerName}, {balanceKmbt}
+## Please note there is another similar message in the spigot module:
+## spigot_minebombs__cooldown_delay
+core_minebombs__cooldown_delay=You cannot use another Prison Mine Bomb for %1 seconds.
diff --git a/prison-core/src/main/resources/lang/core/nl_BE.properties b/prison-core/src/main/resources/lang/core/nl_BE.properties
index 4ad3da75f..279e7f2d7 100644
--- a/prison-core/src/main/resources/lang/core/nl_BE.properties
+++ b/prison-core/src/main/resources/lang/core/nl_BE.properties
@@ -76,7 +76,7 @@
# like to share, please contact a staff member on our Discord server.
#Thanks for your contributions!
#
-messages__version=10
+messages__version=11
messages__auto_refresh=true
@@ -232,4 +232,7 @@ core_ranks_topn__player_line_2_detail_format= [-3] [-10] [7] [-18] [9]
core_ranks_topn__player_line_2_detail_values={rankPosition}, {prestigeDefaultRankTagNoColor}, {rankScore}, {playerName}, {balanceKmbt}
+## Please note there is another similar message in the spigot module:
+## spigot_minebombs__cooldown_delay
+core_minebombs__cooldown_delay=You cannot use another Prison Mine Bomb for %1 seconds.
diff --git a/prison-core/src/main/resources/lang/core/nl_NL.properties b/prison-core/src/main/resources/lang/core/nl_NL.properties
index 88f1a3261..9421dca6a 100644
--- a/prison-core/src/main/resources/lang/core/nl_NL.properties
+++ b/prison-core/src/main/resources/lang/core/nl_NL.properties
@@ -76,7 +76,7 @@
# like to share, please contact a staff member on our Discord server.
#Thanks for your contributions!
#
-messages__version=10
+messages__version=11
messages__auto_refresh=true
@@ -232,3 +232,6 @@ core_ranks_topn__player_line_2_detail_format= [-3] [-10] [7] [-18] [9]
core_ranks_topn__player_line_2_detail_values={rankPosition}, {prestigeDefaultRankTagNoColor}, {rankScore}, {playerName}, {balanceKmbt}
+## Please note there is another similar message in the spigot module:
+## spigot_minebombs__cooldown_delay
+core_minebombs__cooldown_delay=You cannot use another Prison Mine Bomb for %1 seconds.
diff --git a/prison-core/src/main/resources/lang/core/pt_PT.properties b/prison-core/src/main/resources/lang/core/pt_PT.properties
index 30f5072b9..3e2961b16 100644
--- a/prison-core/src/main/resources/lang/core/pt_PT.properties
+++ b/prison-core/src/main/resources/lang/core/pt_PT.properties
@@ -76,7 +76,7 @@
# like to share, please contact a staff member on our Discord server.
#Thanks for your contributions!
#
-messages__version=6
+messages__version=7
messages__auto_refresh=true
@@ -232,3 +232,6 @@ core_ranks_topn__player_line_2_detail_format= [-3] [-10] [7] [-18] [9]
core_ranks_topn__player_line_2_detail_values={rankPosition}, {prestigeDefaultRankTagNoColor}, {rankScore}, {playerName}, {balanceKmbt}
+## Please note there is another similar message in the spigot module:
+## spigot_minebombs__cooldown_delay
+core_minebombs__cooldown_delay=You cannot use another Prison Mine Bomb for %1 seconds.
diff --git a/prison-core/src/main/resources/lang/core/ro_RO.properties b/prison-core/src/main/resources/lang/core/ro_RO.properties
index aa7a2f680..ddf7ca06c 100644
--- a/prison-core/src/main/resources/lang/core/ro_RO.properties
+++ b/prison-core/src/main/resources/lang/core/ro_RO.properties
@@ -76,7 +76,7 @@
#
-messages__version=5
+messages__version=6
messages__auto_refresh=true
@@ -232,4 +232,7 @@ core_ranks_topn__player_line_2_detail_format= [-3] [-10] [7] [-18] [9]
core_ranks_topn__player_line_2_detail_values={rankPosition}, {prestigeDefaultRankTagNoColor}, {rankScore}, {playerName}, {balanceKmbt}
+## Please note there is another similar message in the spigot module:
+## spigot_minebombs__cooldown_delay
+core_minebombs__cooldown_delay=You cannot use another Prison Mine Bomb for %1 seconds.
diff --git a/prison-core/src/main/resources/lang/core/zh-CN.properties b/prison-core/src/main/resources/lang/core/zh_CN.properties
similarity index 60%
rename from prison-core/src/main/resources/lang/core/zh-CN.properties
rename to prison-core/src/main/resources/lang/core/zh_CN.properties
index 6a036fd92..3e6715b95 100644
--- a/prison-core/src/main/resources/lang/core/zh-CN.properties
+++ b/prison-core/src/main/resources/lang/core/zh_CN.properties
@@ -76,7 +76,7 @@
# like to share, please contact a staff member on our Discord server.
#Thanks for your contributions!
#
-messages__version=9
+messages__version=12
messages__auto_refresh=true
@@ -85,124 +85,124 @@ core_output__prefix_template_prison=监狱
core_output__prefix_template_info=ä¿¡æ¯
core_output__prefix_template_warning=è¦å‘Š
core_output__prefix_template_error=错误
-core_output__prefix_template_debug=Debug
+core_output__prefix_template_debug=调试
core_output__color_code_info=&3
core_output__color_code_warning=&c
core_output__color_code_error=&c
core_output__color_code_debug=&b
-core_output__error_startup_failure=监狱: (Sending to System.err due to Output.log Logger failure):
-core_output__error_incorrect_number_of_parameters= 日志失败(%1): Incorrect number of parameters: [%2] Original raw message: [%3] Arguments: %4
+core_output__error_startup_failure=监狱: (使用 System.err å‘é€, å› Output.log 记录出现问题):
+core_output__error_incorrect_number_of_parameters=日志记录失败 (%1): å—æ®µæ•°é‡ä¸æ£ç¡®: [%2] 原信æ¯: [%3] 傿•°: %4
core_text__prefix=&3
core_text__just_now=现在
-core_text__ago=以å‰
-core_text__from_now=åŽ
-core_text__and=å
-core_text__time_units_prefix_spacer= ’Œ
-core_text__time_units_singular=å¹´ã€æœˆã€å‘¨ã€æ—¥ã€æ—¶ã€åˆ†ã€ç§’
-core_text__time_units_plural=å¹´ã€æœˆã€å‘¨ã€æ—¥ã€æ—¶ã€åˆ†ã€ç§’
-core_text__time_units_short=å¹´ã€æœˆã€å‘¨ã€æ—¥ã€æ—¶ã€åˆ†ã€ç§’
+core_text__ago=å‰
+core_text__from_now=现在
+core_text__and=与
+core_text__time_units_prefix_spacer=
+core_text__time_units_singular=年,月,周,日,时,分,秒
+core_text__time_units_plural=年,月,周,日,时,分,秒
+core_text__time_units_short=y,m,w,d,h,m,s
-core_tokens__name_required=Prison Tokens=A player's name is required when used from console.
-core_tokens__cannot_view_others_balances=Prison Tokens: You do not have permission to view other player's balances.
-core_tokens__view_balance=&3%1 has %2 tokens.
-core_tokens__add_invalid_amount=Prison Tokens: Invalid amount: '%1'. Must be greater than zero.
-core_tokens__added_amount=&3%1 now has &7%2 &3tokens after adding &7%3&3.
-core_tokens__removed_amount=&3%1 now has &7%2 &3tokens after removing &7%3&3.
-core_tokens__set_amount=&3%1 now has &7%2 &3tokens.
+core_tokens__name_required=Prison Tokens=åœ¨æŽ§åˆ¶å°æ‰§è¡Œè¯¥å‘½ä»¤æ—¶å¿…须输入玩家åç§°.
+core_tokens__cannot_view_others_balances=监狱代å¸: ä½ æ²¡æœ‰æƒé™æŸ¥çœ‹å…¶ä»–玩家的余é¢.
+core_tokens__view_balance=&3%1 拥有 %2 枚代å¸.
+core_tokens__add_invalid_amount=监狱代å¸: æ•°é‡æ— 效: '%1'. 需大于零.
+core_tokens__added_amount=&3%1 获得了 &7%3&3 枚代å¸, 现在拥有 &7%2 &3枚代å¸.
+core_tokens__removed_amount=&3%1 失去了 &7%3&3 枚代å¸, 现在拥有 &7%2 &3枚代å¸.
+core_tokens__set_amount=&3%1 现在拥有 &7%2 &3枚代å¸.
-core_runCmd__name_required=A valid player name is required.
-core_runCmd__command_required=A command is required.
+core_runCmd__name_required=请输入有效玩家åç§°.
+core_runCmd__command_required=请输入有效命令.
-core_prison_utf8_test=\u041F\u0440\u0438\u0432\u0435\u0442! \u0414\u0430\u0432\u0430\u0439 \u043F\u043E\u0441\u043C\u043E\u0442\u0440\u0438\u043C, \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442 \u043B\u0438? Test 01
+core_prison_utf8_test=æ£åœ¨æµ‹è¯• UTF-8 ç¼–ç 兼容性... 测试 01
# The following are the original messages and they will eventually be replaced.
-includeError=[%1] å…·æœ‰æ— æ•ˆå€¼
-excludeError=[%1] å…·æœ‰æ— æ•ˆå€¼
-cantAsConsole=您ä¸èƒ½åœ¨æŽ§åˆ¶å°æ‰§è¡Œæ¤æ“作
-missingArgument=æœªå®šä¹‰å‚æ•°[%1](它没有默认值)
-missingFlagArgument=æ ‡å¿—-%1æ²¡æœ‰æ‰€éœ€çš„å‚æ•°
-undefinedFlagArgument=æœªå®šä¹‰æ ‡å¿—-%2çš„å‚æ•°[%1]
-internalErrorOccurred=å°è¯•执行æ¤å‘½ä»¤æ—¶å‘生内部错误
-noPermission=ä½ ç¼ºå°‘æ‰§è¡Œè¯¥å‘½ä»¤çš„æƒé™
-blockParseError=傿•°[%1]䏿˜¯æœ‰æ•ˆçš„æ–¹å—
-numberParseError=傿•°[%1]䏿˜¯æ•°å—
-numberTooLow=傿•°[%1]å¿…é¡»ç‰äºŽæˆ–大于%2
-numberTooHigh=傿•°[%1]å¿…é¡»ç‰äºŽæˆ–å°äºŽ%2
-numberRangeError=傿•°[%1]å¿…é¡»ç‰äºŽæˆ–大于%2且å°äºŽæˆ–ç‰äºŽ%3
-tooFewCharacters=傿•°[%1]å¿…é¡»ç‰äºŽæˆ–大于%2
-tooManyCharacters=傿•°[%1]å¿…é¡»ç‰äºŽæˆ–å°äºŽ%2
-playerNotOnline=玩家%1ä¸åœ¨çº¿
-worldNotFound=找ä¸åˆ°ä¸–界%1
+includeError=[%1] ä¸ºæ— æ•ˆå€¼.
+excludeError=[%1] ä¸ºæ— æ•ˆå€¼.
+cantAsConsole=控制å°ä¸ä¸èƒ½è¿™ä¹ˆåš.
+missingArgument=傿•° [%1] 未定义 (æ— é»˜è®¤å€¼).
+missingFlagArgument=æ ‡å¿— -%1 ç¼ºå°‘æŒ‡å®šå—æ®µ.
+undefinedFlagArgument=æ ‡å¿— -%2 ç¼ºå°‘å‚æ•° [%1].
+internalErrorOccurred=执行命令时出现内部错误.
+noPermission=ä½ æ²¡æœ‰æƒé™æ‰§è¡Œè¿™ä¸ªå‘½ä»¤.
+blockParseError=æ‰€ç»™å‚æ•° [%1] 䏿˜¯æœ‰æ•ˆæ–¹å—.
+numberParseError=æ‰€ç»™å‚æ•° [%1] 䏿˜¯æœ‰æ•ˆæ•°å—.
+numberTooLow=æ‰€ç»™å‚æ•° [%1] å¿…é¡»ä¸å°äºŽ %2.
+numberTooHigh=æ‰€ç»™å‚æ•° [%1] å¿…é¡»ä¸å¤§äºŽ %2.
+numberRangeError=æ‰€ç»™å‚æ•° [%1] å¿…é¡»ä¸å°äºŽ %2 且ä¸å¤§äºŽ %3.
+tooFewCharacters=æ‰€ç»™å‚æ•° [%1] å¿…é¡»ä¸å°äºŽ %2 个å—符.
+tooManyCharacters=æ‰€ç»™å‚æ•° [%1] å¿…é¡»ä¸å¤§äºŽ %2 个å—符.
+playerNotOnline=玩家 %1 ä¸åœ¨çº¿.
+worldNotFound=世界 %1 ä¸å˜åœ¨.
-core_gui__click_to_decrease=&3点击å‡å°‘
-core_gui__click_to_increase=&3点击增åŠ
+core_gui__click_to_decrease=&3点击å‡å°‘.
+core_gui__click_to_increase=&3ç‚¹å‡»å¢žåŠ .
-core_gui__click_to_cancel=&3å•击以喿¶ˆã€‚
-core_gui__click_to_close=&3å•击以关é—
-core_gui__click_to_confirm=&3点击确认
-core_gui__click_to_delete=&3å•å‡»ä»¥åˆ é™¤
-core_gui__click_to_disable=&3å•击以ç¦ç”¨
-core_gui__click_to_edit=&3点击编辑
-core_gui__click_to_enable=&3å•击以å¯ç”¨
-core_gui__click_to_open=&3å•击打开
+core_gui__click_to_cancel=&3ç‚¹å‡»å–æ¶ˆ.
+core_gui__click_to_close=&3点击关é—.
+core_gui__click_to_confirm=&3点击确认.
+core_gui__click_to_delete=&3ç‚¹å‡»åˆ é™¤.
+core_gui__click_to_disable=&3点击ç¦ç”¨.
+core_gui__click_to_edit=&3点击编辑.
+core_gui__click_to_enable=&3点击å¯ç”¨.
+core_gui__click_to_open=&3点击打开.
-core_gui__left_click_to_confirm=&3左键å•击确认
-core_gui__left_click_to_reset=&3左键å•击以é‡ç½®
-core_gui__left_click_to_open=&3左键å•击打开
-core_gui__left_click_to_edit=&3左键å•击进行编辑
+core_gui__left_click_to_confirm=&3左键点击确认.
+core_gui__left_click_to_reset=&3左键点击é‡ç½®.
+core_gui__left_click_to_open=&3左键点击打开.
+core_gui__left_click_to_edit=&3左键点击编辑.
-core_gui__right_click_to_cancel=&3å³é”®å•击以喿¶ˆ
-core_gui__right_click_to_delete=&3å³é”®å•å‡»ä»¥åˆ é™¤
-core_gui__right_click_to_disable=&3å³é”®å•击以ç¦ç”¨
-core_gui__right_click_to_enable=&3å³é”®å•击以å¯ç”¨
-core_gui__right_click_to_toggle=&3å³é”®å•击以切æ¢
+core_gui__right_click_to_cancel=&3å³é”®ç‚¹å‡»å–消.
+core_gui__right_click_to_delete=&3å³é”®ç‚¹å‡»åˆ 除.
+core_gui__right_click_to_disable=&3å³é”®ç‚¹å‡»ç¦ç”¨.
+core_gui__right_click_to_enable=&3å³é”®ç‚¹å‡»å¯ç”¨.
+core_gui__right_click_to_toggle=&3å³é”®ç‚¹å‡»åˆ‡æ¢.
-core_gui__right_click_and_shift_to_delete=&3å³é”®å•击并按ä½shifté”®ä»¥åˆ é™¤
-core_gui__right_click_and_shift_to_disable=&3å³é”®å•击并按ä½shift键以ç¦ç”¨
-core_gui__right_click_and_shift_to_toggle=&3å³é”®å•击并按ä½shift键切æ¢
+core_gui__right_click_and_shift_to_delete=&3Shift+å³é”®ç‚¹å‡»åˆ 除.
+core_gui__right_click_and_shift_to_disable=&3Shift+å³é”®ç‚¹å‡»ç¦ç”¨.
+core_gui__right_click_and_shift_to_toggle=&3Shift+å³é”®ç‚¹å‡»åˆ‡æ¢.
-core_gui__page_next=&3下一页
-core_gui__page_prior=&3上一页
+core_gui__page_next=&3下一页.
+core_gui__page_prior=&3上一页.
# Note: The core_gui__page_tools_ messages all use the following placeholders
# so you can structure them any way you need to. You not no have to use
# any of them, but you can also use all of them.
# {first_page} {prior_page} {current_page} {next_page} {last_page}
-core_gui__page_tools_close=&3Close
-core_gui__page_tools_go_back=&3Go Back
-core_gui__page_tools_first_page=&3Prior page: {first_page} of {last_page}
-core_gui__page_tools_prior_page=&3Prior page: {prior_page} of {last_page}
-core_gui__page_tools_current_page=&3Current page: {current_page} of {last_page}
-core_gui__page_tools_next_page=&3Next page: {next_page} of {last_page}
-core_gui__page_tools_last_page=&3Last page: {last_page} of {last_page}
+core_gui__page_tools_close=&3å…³é—
+core_gui__page_tools_go_back=&3返回
+core_gui__page_tools_first_page=&3已是首页: 第 {first_page} 页, 共 {last_page} 页
+core_gui__page_tools_prior_page=&3上一页: 第 {prior_page} 页, 共 {last_page} 页
+core_gui__page_tools_current_page=&3当å‰é¡µ: 第 {current_page} 页, å…± {last_page} 页
+core_gui__page_tools_next_page=&3下一页: 第 {next_page} 页, 共 {last_page} 页
+core_gui__page_tools_last_page=&3已是末页: 第 {last_page} 页, 共 {last_page} 页
-core_gui__money_earned=&3You earned &a$%1
-core_gui__price=&3ä»·æ ¼ï¼š%1
-core_gui__confirm=&3确认:%1%2
-core_gui__delay=&3延迟:%1秒
-core_gui__multiplier=&3倿•°ï¼šx%1
-core_gui__value=&3值:%1
-core_gui__permission=&3æƒé™ï¼š&7%1
-core_gui__prestige_name=&3声望å称:%1
+core_gui__money_earned=&3ä½ èŽ·å¾—äº† &a$%1
+core_gui__price=&3ä»·æ ¼: %1
+core_gui__confirm=&3确认: %1 %2
+core_gui__delay=&3延迟: %1 秒
+core_gui__multiplier=&3å€çއ: x %1
+core_gui__value=&3值: %1
+core_gui__permission=&3æƒé™: &7%1
+core_gui__prestige_name=&3特æƒå: %1
@@ -215,9 +215,9 @@ core_gui__prestige_name=&3声望å称:%1
# Important: Every [] must be paired with a value or it will produce a runtime error:
# 'Incorrect number of parameters: [Format specifier %s]
core_ranks_topn__player_line_1_header_format=[4] [-18] [-10] [11] [-8] [-12]
-core_ranks_topn__player_line_1_header_values=Rank, Player, PreDefRanks, Balance, r-Score, Penalty
+core_ranks_topn__player_line_1_header_values=ç‰çº§, 玩家, ç‰çº§, ä½™é¢, 分数, 惩罚
core_ranks_topn__player_line_2_header_format=[4] [-10] [7] [-18] [9]
-core_ranks_topn__player_line_2_header_values=Rank, Ranks, r-Score, Player, Balance
+core_ranks_topn__player_line_2_header_values=ç‰çº§, ç‰çº§, 分数, 玩家, ä½™é¢
# For detail_values you can use any of the following placeholders, but they must pair up
# with the detail_format's [].
@@ -232,4 +232,6 @@ core_ranks_topn__player_line_2_detail_format= [-3] [-10] [7] [-18] [9]
core_ranks_topn__player_line_2_detail_values={rankPosition}, {prestigeDefaultRankTagNoColor}, {rankScore}, {playerName}, {balanceKmbt}
-
+## Please note there is another similar message in the spigot module:
+## spigot_minebombs__cooldown_delay
+core_minebombs__cooldown_delay=You cannot use another Prison Mine Bomb for %1 seconds.
diff --git a/prison-core/src/main/resources/lang/core/zh_TW.properties b/prison-core/src/main/resources/lang/core/zh_TW.properties
index d8daac534..5eaa9056a 100644
--- a/prison-core/src/main/resources/lang/core/zh_TW.properties
+++ b/prison-core/src/main/resources/lang/core/zh_TW.properties
@@ -76,7 +76,7 @@
# like to share, please contact a staff member on our Discord server.
#Thanks for your contributions!
#
-messages__version=10
+messages__version=11
messages__auto_refresh=true
@@ -232,4 +232,7 @@ core_ranks_topn__player_line_2_detail_format= [-3] [-10] [7] [-18] [9]
core_ranks_topn__player_line_2_detail_values={rankPosition}, {prestigeDefaultRankTagNoColor}, {rankScore}, {playerName}, {balanceKmbt}
+## Please note there is another similar message in the spigot module:
+## spigot_minebombs__cooldown_delay
+core_minebombs__cooldown_delay=You cannot use another Prison Mine Bomb for %1 seconds.
diff --git a/prison-core/src/main/resources/lang/mines/de_DE.properties b/prison-core/src/main/resources/lang/mines/de_DE.properties
index 502cddbd9..fd9b8aa12 100644
--- a/prison-core/src/main/resources/lang/mines/de_DE.properties
+++ b/prison-core/src/main/resources/lang/mines/de_DE.properties
@@ -105,4 +105,4 @@ mines_mtp__no_target_mine_found=No target mine found. &3Resubmit teleport reques
mines_mtp__player_must_be_in_game=You can only teleport players that are online and in the game.
mines_mtp__player_must_be_in_game=&3Specified player is not in the game so they cannot be teleported.
mines_mtp__cannot_use_virtual_mines=&cInvalid option. This mine is a virtual mine&7. Use &a/mines set area &7to enable the mine.
-mines_mtp__teleport_failed=&3Telport failed. Are you sure you're a Player?
+mines_mtp__teleport_failed=&3Teleport failed. Are you sure you're a Player?
diff --git a/prison-core/src/main/resources/lang/mines/en_US.properties b/prison-core/src/main/resources/lang/mines/en_US.properties
index b21d897fe..4ddf1717b 100644
--- a/prison-core/src/main/resources/lang/mines/en_US.properties
+++ b/prison-core/src/main/resources/lang/mines/en_US.properties
@@ -60,7 +60,7 @@
#
-messages__version=5
+messages__version=6
messages__auto_refresh=true
@@ -90,6 +90,7 @@ spawn_set=&7The mine spawnpoint has been set.
spawn_removed=&7The mine spawnpoint has been removed.
spawnpoint_same_world=&7The &cspawnpoint &7must be in the same &cworld &7as the mine.
not_a_block=&c%1 &7is not a block.
+not_a_block_sellall=&c%1 &7is not a block that can be used in mines. Its only for sellall usage.
block_already_added=&7That block has already been added to the mine.
mine_full=&cThe mine will be too full. &7Try lowering the percentage of this block and/or other blocks in the mine to make some room.
block_added=&7Added block &3%1 &7to mine &3%2&7.
@@ -106,4 +107,4 @@ mines_mtp__no_target_mine_found=No target mine found. &3Resubmit teleport reques
mines_mtp__player_must_be_in_game=You can only teleport players that are online and in the game.
mines_mtp__player_must_be_in_game=&3Specified player is not in the game so they cannot be teleported.
mines_mtp__cannot_use_virtual_mines=&cInvalid option. This mine is a virtual mine&7. Use &a/mines set area &7to enable the mine.
-mines_mtp__teleport_failed=&3Telport failed. Are you sure you're a Player?
+mines_mtp__teleport_failed=&3Teleport failed. Are you sure you're a Player?
diff --git a/prison-core/src/main/resources/lang/mines/es_ES.properties b/prison-core/src/main/resources/lang/mines/es_ES.properties
index e2baf94f9..2f7de6a62 100644
--- a/prison-core/src/main/resources/lang/mines/es_ES.properties
+++ b/prison-core/src/main/resources/lang/mines/es_ES.properties
@@ -60,13 +60,9 @@
#
-messages__version=5
+messages__version=6
messages__auto_refresh=true
-
-
-# The following are the original messages and they will eventually be replaced.
-
reset_warning=&7Todas las minas %1 se reiniciarán en &3%2&7.
reset_message=&7Todas las minas %1 han sido reiniciadas.
skip_reset_message=
@@ -90,6 +86,7 @@ spawn_set=&7El punto de aparición (spawnpoint) de la mina ha sido definid.
spawn_removed=&7The mine spawnpoint has been removed.
spawnpoint_same_world=&7El &cpunto de aparición &7debe estar en el mismo &cmundo &7que la mina.
not_a_block=&c%1 &7no es un bloque.
+not_a_block_sellall=&c%1 &7is not a block that can be used in mines. Its only for sellall usage.
block_already_added=&7Ese bloque ya ha sido añadido a la mina.
mine_full=&cLa mina estará demasiado llena. &7Intenta reduciendo el porcentaje de este bloque y/u otros bloques en la mina para hacer más espacio.
block_added=&7Se ha añadido el bloque &3%1 &7a la mina &3%2&7.
@@ -99,10 +96,10 @@ block_deleted=&7Se ha eliminado el bloque &3%1 &7de la mina &3%2&7.
mine_redefined=&7Se ha &3redefinido &7la mina exitosamente.
missing_world=&7El mundo en el que se ha creado la mina no se ha podido encontrar.
-mines_mtp__unable_to_teleport=Sorry. You're unable to teleport there.
-mines_mtp__unable_to_teleport_others=&3You cannot teleport other players to a mine. Ignoring parameter.
-mines_mtp__no_target_mine_found=No target mine found. &3Resubmit teleport request with a mine name.
-mines_mtp__player_must_be_in_game=You can only teleport players that are online and in the game.
-mines_mtp__player_must_be_in_game=&3Specified player is not in the game so they cannot be teleported.
-mines_mtp__cannot_use_virtual_mines=&cInvalid option. This mine is a virtual mine&7. Use &a/mines set area &7to enable the mine.
-mines_mtp__teleport_failed=&3Telport failed. Are you sure you're a Player?
+mines_mtp__unable_to_teleport=Lamentablemente, no puedes teletransportarte allÃ.
+mines_mtp__unable_to_teleport_others=&3No puedes teletransportar a otros jugadores a una mina. Ignorando parámetro.
+mines_mtp__no_target_mine_found=No se ha encontrado una mina objetivo. &3Vuelve a enviar la solicitud de teletransporte con un nombre de mina.
+mines_mtp__player_must_be_in_game=Sólo puedes teletransportar a jugadores que estén en lÃnea y en el juego.
+mines_mtp__player_must_be_in_game=&3El jugador especificado no está en el juego, por lo que no se puede teletransportar.
+mines_mtp__cannot_use_virtual_mines=&cOpción inválida. Esta mina es una mina virtual&7. Utiliza &a/mines set area &7para habilitar la mina.
+mines_mtp__teleport_failed=&3Fallo en el teletransporte. ¿Estás seguro de que eres un jugador?
\ No newline at end of file
diff --git a/prison-core/src/main/resources/lang/mines/fi_FI.properties b/prison-core/src/main/resources/lang/mines/fi_FI.properties
index a17a07eae..d29b4e55c 100644
--- a/prison-core/src/main/resources/lang/mines/fi_FI.properties
+++ b/prison-core/src/main/resources/lang/mines/fi_FI.properties
@@ -60,7 +60,7 @@
#
-messages__version=5
+messages__version=6
messages__auto_refresh=true
@@ -90,6 +90,7 @@ spawn_set=&7Mainin spawni on asetettu.
spawn_removed=&7Mainin spawni on onnistuneesti poistettu.
spawnpoint_same_world=&cspawnpoint &7pitää olla samassa mailmassa kuin maini.
not_a_block=&c%1 &7ei ole blockki.
+not_a_block_sellall=&c%1 &7is not a block that can be used in mines. Its only for sellall usage.
block_already_added=&7Tämä blockki on jo lisätty mainiin..
mine_full=&cMaini on jo täynnä.
block_added=&7Lisätty &3%1 &7mainiin &3%2&7.
diff --git a/prison-core/src/main/resources/lang/mines/fr_FR.properties b/prison-core/src/main/resources/lang/mines/fr_FR.properties
index fccacf7cb..4cc5ac32d 100644
--- a/prison-core/src/main/resources/lang/mines/fr_FR.properties
+++ b/prison-core/src/main/resources/lang/mines/fr_FR.properties
@@ -60,7 +60,7 @@
#
-messages__version=5
+messages__version=6
messages__auto_refresh=true
@@ -89,7 +89,8 @@ mine_does_not_exist=&7Une mine du même nom existe déjà .
spawn_set=&7Le point de spawn de la mine a été défini.
spawn_removed=&7Le point de spawn de la mine a été supprimé.
spawnpoint_same_world=&7Le &cpoint de spawn &7doit être dans le même &cmonde &7que la mine.
-not_a_block=&c%1 &7n'est pas un bloc.
+not_a_block=&c%1 &7n'est pas un bloc..
+not_a_block_sellall=&c%1 &7is not a block that can be used in mines. Its only for sellall usage.
block_already_added=&7Ce bloc a déjà été ajouté dans la mine.
mine_full=&cCette mine sera trop remplie. &7Essaye de réduire le percentage de ce block ou d'un autre dans la mine pour faire de la place.
block_added=&7Le bloc &3%1 &7a été ajoutée à la mine &3%2&7.
diff --git a/prison-core/src/main/resources/lang/mines/hu_HU.properties b/prison-core/src/main/resources/lang/mines/hu_HU.properties
index cd2424220..6ef77b837 100644
--- a/prison-core/src/main/resources/lang/mines/hu_HU.properties
+++ b/prison-core/src/main/resources/lang/mines/hu_HU.properties
@@ -60,7 +60,7 @@
#
-messages__version=5
+messages__version=6
messages__auto_refresh=true
@@ -90,6 +90,7 @@ spawn_set=&7A bánya spawnpontja beállÃtva.
spawn_removed=&7The mine spawnpoint has been removed.
spawnpoint_same_world=&7A &cspawnpont-nak&7 ugyanabban a &cvilágban&7 bányában kell lennie.
not_a_block=&c%1 &7nem egy blokk.
+not_a_block_sellall=&c%1 &7is not a block that can be used in mines. Its only for sellall usage.
block_already_added=&7Ez a blokk már felkerült a bányába.
mine_full=&cA bánya túlságosan tele lesz. &7Jobban próbáld csökkenteni a blokk és/vagy más blokkok százalékos arányát a bányában.
block_added=&7A blokk hozzáadva &3%1 &7a(z) &3%2&7 bányához.
@@ -105,4 +106,4 @@ mines_mtp__no_target_mine_found=No target mine found. &3Resubmit teleport reques
mines_mtp__player_must_be_in_game=You can only teleport players that are online and in the game.
mines_mtp__player_must_be_in_game=&3Specified player is not in the game so they cannot be teleported.
mines_mtp__cannot_use_virtual_mines=&cInvalid option. This mine is a virtual mine&7. Use &a/mines set area &7to enable the mine.
-mines_mtp__teleport_failed=&3Telport failed. Are you sure you're a Player?
+mines_mtp__teleport_failed=&3Teleport failed. Are you sure you're a Player?
diff --git a/prison-core/src/main/resources/lang/mines/it_IT.properties b/prison-core/src/main/resources/lang/mines/it_IT.properties
index 2c5b126ff..06213227e 100644
--- a/prison-core/src/main/resources/lang/mines/it_IT.properties
+++ b/prison-core/src/main/resources/lang/mines/it_IT.properties
@@ -60,7 +60,7 @@
#
-messages__version=5
+messages__version=6
messages__auto_refresh=true
@@ -90,6 +90,7 @@ spawn_set=&7Il punto di spawn della miniera è stato settato.
spawn_removed=&7The mine spawnpoint has been removed.
spawnpoint_same_world=&7Il &cPunto di spawn &7deve essere nello stesso &cmondo &7della miniera.
not_a_block=&c%1 &7non è un blocco.
+not_a_block_sellall=&c%1 &7is not a block that can be used in mines. Its only for sellall usage.
block_already_added=&7Quel blocco è già stato aggiunto alla miniera.
mine_full=&cLa miniera con quel valore supera il limite. &7Prova ad abbassare la percentuale di questo blocco e / o altri blocchi nella miniera per fare spazio.
block_added=&7Aggiunto il blocco &3%1 &7alla miniera &3%2&7.
@@ -105,4 +106,4 @@ mines_mtp__no_target_mine_found=No target mine found. &3Resubmit teleport reques
mines_mtp__player_must_be_in_game=You can only teleport players that are online and in the game.
mines_mtp__player_must_be_in_game=&3Specified player is not in the game so they cannot be teleported.
mines_mtp__cannot_use_virtual_mines=&cInvalid option. This mine is a virtual mine&7. Use &a/mines set area &7to enable the mine.
-mines_mtp__teleport_failed=&3Telport failed. Are you sure you're a Player?
+mines_mtp__teleport_failed=&3Teleport failed. Are you sure you're a Player?
diff --git a/prison-core/src/main/resources/lang/mines/nl_BE.properties b/prison-core/src/main/resources/lang/mines/nl_BE.properties
index 41c35aa61..a3464ed54 100644
--- a/prison-core/src/main/resources/lang/mines/nl_BE.properties
+++ b/prison-core/src/main/resources/lang/mines/nl_BE.properties
@@ -60,7 +60,7 @@
#
-messages__version=5
+messages__version=6
messages__auto_refresh=true
@@ -88,6 +88,7 @@ spawn_set=&7De mijn zijn startpunt is gezet.
spawn_removed=&7The mine spawnpoint has been removed.
spawnpoint_same_world=&7Het startpunt moet in dezelfde wereld als de mijn zijn .
not_a_block=&c%1 &7is geen blok.
+not_a_block_sellall=&c%1 &7is not a block that can be used in mines. Its only for sellall usage.
block_already_added=&7Deze blok is al in de mijn toegevoegd.
mine_full=&cDe mijn zal te vol worden. &7Probeer het precentage te verlagen van deze blok en/of andere bloken in de mijn om plaats te maken.
block_added=&7blok &3%1 &7bijgevoeg &7bij mijn &3%2&7.
@@ -103,4 +104,4 @@ mines_mtp__no_target_mine_found=No target mine found. &3Resubmit teleport reques
mines_mtp__player_must_be_in_game=You can only teleport players that are online and in the game.
mines_mtp__player_must_be_in_game=&3Specified player is not in the game so they cannot be teleported.
mines_mtp__cannot_use_virtual_mines=&cInvalid option. This mine is a virtual mine&7. Use &a/mines set area &7to enable the mine.
-mines_mtp__teleport_failed=&3Telport failed. Are you sure you're a Player?
+mines_mtp__teleport_failed=&3Teleport failed. Are you sure you're a Player?
diff --git a/prison-core/src/main/resources/lang/mines/nl_NL.properties b/prison-core/src/main/resources/lang/mines/nl_NL.properties
index b93443167..b40f54a17 100644
--- a/prison-core/src/main/resources/lang/mines/nl_NL.properties
+++ b/prison-core/src/main/resources/lang/mines/nl_NL.properties
@@ -60,7 +60,7 @@
#
-messages__version=5
+messages__version=6
messages__auto_refresh=true
@@ -88,6 +88,7 @@ spawn_set=&7De mijn zijn startpunt is gezet.
spawn_removed=&7The mine spawnpoint has been removed.
spawnpoint_same_world=&7Het startpunt moet in dezelfde wereld als de mijn zijn .
not_a_block=&c%1 &7is geen blok.
+not_a_block_sellall=&c%1 &7is not a block that can be used in mines. Its only for sellall usage.
block_already_added=&7Deze blok is al in de mijn toegevoegd.
mine_full=&cDe mijn zal te vol worden. &7Probeer het precentage te verlagen van deze blok en/of andere bloken in de mijn om plaats te maken.
block_added=&7blok &3%1 &7bijgevoeg &7bij mijn &3%2&7.
@@ -103,4 +104,4 @@ mines_mtp__no_target_mine_found=No target mine found. &3Resubmit teleport reques
mines_mtp__player_must_be_in_game=You can only teleport players that are online and in the game.
mines_mtp__player_must_be_in_game=&3Specified player is not in the game so they cannot be teleported.
mines_mtp__cannot_use_virtual_mines=&cInvalid option. This mine is a virtual mine&7. Use &a/mines set area &7to enable the mine.
-mines_mtp__teleport_failed=&3Telport failed. Are you sure you're a Player?
+mines_mtp__teleport_failed=&3Teleport failed. Are you sure you're a Player?
diff --git a/prison-core/src/main/resources/lang/mines/pt_PT.properties b/prison-core/src/main/resources/lang/mines/pt_PT.properties
index af7aa2c7b..0ef4465f9 100644
--- a/prison-core/src/main/resources/lang/mines/pt_PT.properties
+++ b/prison-core/src/main/resources/lang/mines/pt_PT.properties
@@ -60,7 +60,7 @@
#
-messages__version=5
+messages__version=6
messages__auto_refresh=true
@@ -90,6 +90,7 @@ spawn_set=&7O spawnpoint da mina foi defenido.
spawn_removed=&7O spawnpoint da mina foi eliminado.
spawnpoint_same_world=&7O &cspawnpoint &7tem de ser no mesmo &cmundo &7que a mina.
not_a_block=&c%1 &7não é um bloco.
+not_a_block_sellall=&c%1 &7is not a block that can be used in mines. Its only for sellall usage.
block_already_added=&7Esse bloco já foi adicionado à mina.
mine_full=&cA mina vai estar cheia demais. &7Tenta baixa a precentagem deste bloco e/ou outros blocos dentro da mina para fazer espaço.
block_added=&7Bloco adicionado &3%1 &7á mina &3%2&7.
diff --git a/prison-core/src/main/resources/lang/mines/ro_RO.properties b/prison-core/src/main/resources/lang/mines/ro_RO.properties
index cfb6d17c9..0c2169975 100644
--- a/prison-core/src/main/resources/lang/mines/ro_RO.properties
+++ b/prison-core/src/main/resources/lang/mines/ro_RO.properties
@@ -60,7 +60,7 @@
#
-messages__version=5
+messages__version=6
messages__auto_refresh=true
@@ -90,6 +90,7 @@ spawn_set=&7Spawnpoint-ul minei a fost setat.
spawn_removed=&7Spawnpoint-ul minei a fost șters.
spawnpoint_same_world=&cSpawnpoint-ul &7trebuie să fie în aceeași &clume &7cu mina.
not_a_block=&c%1 &7nu este un block.
+not_a_block_sellall=&c%1 &7is not a block that can be used in mines. Its only for sellall usage.
block_already_added=&7Acel block a fost adăugat deja în mină.
mine_full=&cMina va fi prea plină. &7Încearcă să scazi șansele apariției acestui block și/sau altor block-uri din mină pentru a avea mai mult spațiu.
block_added=&7Block-ul &3%1 &7a fost adăugat în mina &3%2&7.
@@ -106,4 +107,4 @@ mines_mtp__no_target_mine_found=No target mine found. &3Resubmit teleport reques
mines_mtp__player_must_be_in_game=You can only teleport players that are online and in the game.
mines_mtp__player_must_be_in_game=&3Specified player is not in the game so they cannot be teleported.
mines_mtp__cannot_use_virtual_mines=&cInvalid option. This mine is a virtual mine&7. Use &a/mines set area &7to enable the mine.
-mines_mtp__teleport_failed=&3Telport failed. Are you sure you're a Player?
+mines_mtp__teleport_failed=&3Teleport failed. Are you sure you're a Player?
diff --git a/prison-core/src/main/resources/lang/mines/zh-CN.properties b/prison-core/src/main/resources/lang/mines/zh-CN.properties
index d5e632a9b..3259e89a6 100644
--- a/prison-core/src/main/resources/lang/mines/zh-CN.properties
+++ b/prison-core/src/main/resources/lang/mines/zh-CN.properties
@@ -60,7 +60,7 @@
#
-messages__version=4
+messages__version=6
messages__auto_refresh=true
@@ -89,7 +89,8 @@ mine_does_not_exist=&7没有å«è¿™ä¸ªåå—的矿区
spawn_set=&7矿区出生点已设置
spawn_removed=&7矿区出生点已移除
spawnpoint_same_world=&7&c出生点&7必须与矿区ä½äºŽåŒä¸€ä¸ª&c世界&7ä¸
-not_a_block=&c%1 &7䏿˜¯ä¸€ä¸ªæ–¹å—,请检查拼写
+not_a_block=&c%1 &7䏿˜¯ä¸€ä¸ªæ–¹å—,请检查拼å
+not_a_block_sellall=&c%1 &7is not a block that can be used in mines. Its only for sellall usage.
block_already_added=&7该方å—å·²æˆåŠŸæ·»åŠ åˆ°çŸ¿åŒºä¸
mine_full=&c矿区满了 &7试ç€é™ä½Žè¯¥æ–¹å—或其他方å—的百分比,以腾出一些空间
block_added=&7将方å—&3%1 &7æ·»åŠ åˆ°çŸ¿åŒº&3%2&7.
diff --git a/prison-core/src/main/resources/lang/mines/zh_TW.properties b/prison-core/src/main/resources/lang/mines/zh_TW.properties
index 78a6e3e5d..045bf9d92 100644
--- a/prison-core/src/main/resources/lang/mines/zh_TW.properties
+++ b/prison-core/src/main/resources/lang/mines/zh_TW.properties
@@ -60,7 +60,7 @@
#
-messages__version=6
+messages__version=7
messages__auto_refresh=true
@@ -89,7 +89,8 @@ mine_does_not_exist=&7æ¤ç¤¦å ´å稱並ä¸å˜åœ¨
spawn_set=&7ç¤¦å ´å‡ºç”Ÿé»ž å·²æˆåŠŸ è¨å®š
spawn_removed=&7The mine spawnpoint has been removed.
spawnpoint_same_world=&7這個 &c出生點 &7å¿…é ˆèˆ‡å…¶ä»– ç¤¦å ´ 在åŒä¸€å€‹ &c世界
-not_a_block=&c%1 &7䏿˜¯ä¸€å€‹æ–¹å¡Š
+not_a_block=&c%1 &7䏿˜¯ä¸€å€‹æ–¹å¡
+not_a_block_sellall=&c%1 &7is not a block that can be used in mines. Its only for sellall usage.
block_already_added=&7æ¤æ–¹å¡Šå·²ç¶“è¢«æ–°å¢žåˆ°ç¤¦å ´
mine_full=&cæ¤ç¤¦å ´å·²ç¶“滿了。 &7è«‹é™ä½Žç¤¦å ´ä¸è©²æ–¹å¡Šæˆ–其他方塊的 百分比 以騰出更多空間
block_added=&7將方塊 &3%1 &7åŠ å…¥åˆ°ç¤¦å ´ &3%2&7
@@ -106,4 +107,4 @@ mines_mtp__no_target_mine_found=No target mine found. &3Resubmit teleport reques
mines_mtp__player_must_be_in_game=You can only teleport players that are online and in the game.
mines_mtp__player_must_be_in_game=&3Specified player is not in the game so they cannot be teleported.
mines_mtp__cannot_use_virtual_mines=&cInvalid option. This mine is a virtual mine&7. Use &a/mines set area &7to enable the mine.
-mines_mtp__teleport_failed=&3Telport failed. Are you sure you're a Player?
+mines_mtp__teleport_failed=&3Teleport failed. Are you sure you're a Player?
diff --git a/prison-core/src/main/resources/lang/ranks/en_US.properties b/prison-core/src/main/resources/lang/ranks/en_US.properties
index 9807416d3..2c1ec8c57 100644
--- a/prison-core/src/main/resources/lang/ranks/en_US.properties
+++ b/prison-core/src/main/resources/lang/ranks/en_US.properties
@@ -72,7 +72,7 @@
## be able to enable them.
-messages__version=29
+messages__version=30
messages__auto_refresh=true
ranks_rankup__rankup_no_player_name=You have
@@ -94,6 +94,7 @@ ranks_rankup__rankup_no_ranks=There are no ranks in this ladder.
ranks_rankup__rankup_rank_does_not_exist=The rank %1 does not exist on this server.
ranks_rankup__rankup_rank_is_not_in_ladder=The rank %1 does not exist in the ladder %2.
ranks_rankup__rankup_currency_is_not_supported=The currency, %1, is not supported by any loaded economies.
+ranks_rankup__rankup_economy_failed=Failed to adjust player's balance. Could be an issue with vault or a cache timing issue. Try again.
ranks_rankup__rankup_ladder_removed=The ladder %1 was removed.
ranks_rankup__rankup_failure_removing_ladder=Rankup failed since the player could not be removed from the ladder %1. (Players cannot be removed from the 'default' ladder).
ranks_rankup__rankup_in_progress_failure=Rankup failed to complete normally. No status was set.
diff --git a/prison-core/src/main/resources/lang/ranks/es_ES.properties b/prison-core/src/main/resources/lang/ranks/es_ES.properties
new file mode 100644
index 000000000..077a4aaf7
--- /dev/null
+++ b/prison-core/src/main/resources/lang/ranks/es_ES.properties
@@ -0,0 +1,343 @@
+ # NOTE: A messages__version is an arbitrary integer that will be manually incremented within Prison
+# when there are changes to these messages. This value represents when message content is
+# changed, fixed, or added to. This value may not be increased if the change is very small and
+# insignificant, such as a space or a couple of letters.
+#
+# messages__auto_refresh=true indicates that this file will automatically be replaced if
+# Prison detects a messages__version difference. The old file will be deleted (renamed) and
+# a new copy will be placed in the directory to be used. If this value is set to false, then
+# Prison will not refresh this file and there could be issues with the display of other messages.
+# If auto refresh is set to false, we are not held responsible for possible issues that can
+# arise from inaccurate messages. If set to false, then you are responsible for maintaining
+# the messages on your own.
+#
+# If you make changes to this file, and you have messages__auto_refresh=false, then those
+# changes will be replaced when this file is updated. Since the old file is renamed, and
+# not deleted, you can manually merge your changes back in to the new update. The old
+# renamed files will never be deleted by prison; you can remove them when you feel like it
+# is safe to do so.
+#
+# Please consider helping Prison, and everyone else who may use Prison, by contributing all
+# translations to other languages. They should be faithful translations, and not something
+# for the sake of humor or changes just for cosmetic styling. If you have something you would
+# like to share, please contact a staff member on our Discord server.
+#Thanks for your contributions!
+#
+
+##
+## Prison Supports Unicode (UTF-8) encoding in these properties files. BUt you must
+## follow these instructions to ensure everything works properly.
+##
+## 1. You should only edit these files using a UTF-8 editor. On windows use NotePad, not WordPad.
+## WordPad will save as plain text. To confirm the save was successful: save, close the editor,
+## then reopen to confirm the encoding was preserved.
+##
+## 2. When running on Windows, you must enable utf-8 encoding in minecraft's console. Windows
+## defaults to a characterpage 1252. To enable window's use of utf-8, you need to change the
+## encoding prior to launching spigot/paper:
+## chcp 65001
+##
+## Full example of a windows script, which hooks for java debugging:
+## rem Note: chcp 65001 enables utf-8 in windows, when normally windows uses characterpage 1252
+## chcp 65001
+## java -Dfile.encoding="UTF-8" -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -Xms1g -Xmx4g -jar spigot-1.8.8.jar nogui --log-strip-color
+## pause
+##
+## 3. When viewing the logs/latest.log files you must use an editor such as NotePad instead of WordPad.
+##
+## 4. Unicode is properly displayed in game, in console, in the logs, and with paste.helpch.at when using
+## /prison support submit.
+##
+
+# NOTE: If you need to eliminate a message, leave an empty String after the equal sign `=`, or
+# use the key word `*none*`. Prison will not insert element or send a message if
+# these values are found.
+# Example: `core_text__from_now=from now` use either `core_text__from_now=` or `core_text__from_now=*none*`
+#
+# NOTE: Specific to the `core_output__` messages, `/prison reload locales` cannot reload them because
+# these are a very low level static component of the fallback messaging system within Prison.
+# You will have to restart the server if you make any changes to the messages with these prefixes.
+#
+# NOTE: You can add line feeds to your messages by inserting the placeholder '{br}'.
+#
+
+## NOTE: Prison now supports the use of secondary placeholders on all "player" related messages.
+## Just add these placeholders, in any position, combination, or quantity, to any
+## message's text.
+## {player} {rank_default} {rank_tag_default} {rank_next_default} {rank_next_tag_default}
+## {rank_prestiges} {rank_tag_prestiges} {rank_next_prestiges} {rank_next_tag_prestiges}
+## Player based messages are generally messages sent to player. Not all messages are able
+## to support these secondary placeholders; if you find one that is not supported, please
+## contact RoyalBlueRanger in a support thread on the Prison discord server and I may
+## be able to enable them.
+
+
+messages__version=29
+messages__auto_refresh=true
+
+ranks_rankup__rankup_no_player_name=Tienes
+ranks_rankup__rankup_no_player_name_broadcast=Alguien
+ranks_rankup__rankup_you_are=Tú eres
+ranks_rankup__rankup_success=¡Felicidades! %1 subió de rango a '%2'. %3
+ranks_rankup__demote_success=Desafortunadamente, %1 ha sido degradado a rango '%2'. %3
+ranks_rankup__log_rank_change=%1 inició el cambio de rango: %2
+ranks_rankup__rankup_cant_afford=¡No tienes suficiente dinero para subir de rango! El siguiente rango cuesta %1%2.
+ranks_rankup__rankup_lowest=%1 ya está en el rango más bajo!
+ranks_rankup__rankup_highest=%1 ya está en el rango más alto!
+ranks_rankup__rankup_failure=Fallo genérico al subir de rango. Revise los detalles de la subida de rango para identificar la razón.
+ranks_rankup__rankup_failed_to_load_player=Error al cargar el jugador.
+ranks_rankup__rankup_failed_to_load_ladder=Error al cargar la escalera.
+ranks_rankup__rankup_failed_to_assign_rank=Error al asignar un rango. Revise los detalles de la subida de rango para identificar la razón.
+ranks_rankup__rankup_failed_to_assign_rank_with_refund=Error al asignar un rango. Revise los detalles de la subida de rango para identificar la razón. Se han aplicado reembolsos.
+ranks_rankup__rankup_failed_to_save_player_file=Error al recuperar o escribir datos. Sus archivos pueden estar dañados. Alerta a un administrador del servidor.
+ranks_rankup__rankup_no_ranks=No hay rangos en esta escalera.
+ranks_rankup__rankup_rank_does_not_exist=El rango %1 no existe en este servidor.
+ranks_rankup__rankup_rank_is_not_in_ladder=El rango %1 no existe en la escalera %2.
+ranks_rankup__rankup_currency_is_not_supported=La moneda, %1, no es compatible con ninguna economÃa cargada.
+ranks_rankup__rankup_ladder_removed=La escalera %1 fue eliminada.
+ranks_rankup__rankup_failure_removing_ladder=La subida de rango falló porque el jugador no pudo ser eliminado de la escalera %1. (Los jugadores no pueden ser eliminados de la escalera 'default').
+ranks_rankup__rankup_in_progress_failure=La subida de rango no pudo completarse normalmente. No se estableció ningún estado.
+
+ranks_rankup__rankup_failure_to_get_rankplayer=¡No existes! El servidor no tiene registros tuyos. Intenta unirte de nuevo, o contacta a un administrador del servidor para obtener ayuda.
+ranks_rankup__rankup_failure_invalid_ladder=La escalera '%1' no existe.
+ranks_rankup__rankup_failure_must_be_online_player=&3Debes ser un jugador en el juego para ejecutar este comando, y/o el jugador debe estar en lÃnea.
+ranks_rankup__no_permission=Necesitas el permiso '%1' para subir de rango en esta escalera.
+ranks_rankup__cannot_run_from_console=&7No se puede ejecutar la subida de rango desde la consola. Consulta &3/rankup help&7.
+ranks_rankup__invalid_player_name=&7Nombre de jugador no válido. '%1'
+ranks_rankup__internal_failure=&7Modo de subida de rango no válido. Fallo interno. Por favor, informa.
+ranks_rankup__error_no_default_ladder=&c[ERROR] ¡No hay una escalera predeterminada! ¡Por favor, informa esto a un administrador!
+ranks_rankup__error_no_lower_rank=&c[ERROR] ¡No se puede obtener el rango más bajo! ¡Por favor, informa esto a un administrador!
+
+ranks_rankup__error_no_ladder=&c[ERROR] ¡La escalera %1 no existe! ¡Por favor, informa esto a un administrador!
+ranks_rankup__error_no_lower_rank_on_ladder=&c[ERROR] ¡La escalera %1 no tiene rangos! ¡Por favor, informa esto a un administrador!
+
+ranks_rankup__error_player_not_on_default_ladder=&c[ERROR] El jugador no está en la escalera predeterminada. Jugador: %1
+ranks_rankup__not_at_last_rank=&c¡No estás en el último rango!
+ranks_rankup__at_last_rank=&c¡Estás en el último rango!
+ranks_rankup__not_able_to_prestige=&7[&3Lo siento&7] &3No pudiste &6Prestigiar!
+ranks_rankup__not_able_to_reset_rank=&7No se puede restablecer tu rango en la escalera predeterminada.
+
+ranks_rankup__balance_set_to_zero=&7Tu saldo se ha establecido en cero.
+ranks_rankup__prestige_successful=&7[&3Felicidades&7] &3Has &6Prestigiado&3 a %1&c!
+ranks_rankup__prestige_failure=&7[&3Lo siento&7] &3No pudiste &6Prestigiar&3 a %1&c!
+ranks_rankup__confirm_prestige_line_1=&3Confirmar Prestigio: %1
+ranks_rankup__confirm_prestige_line_2=&3 Costo: &7%1
+ranks_rankup__confirm_prestige_line_3=&3 Saldo: &7%1%2
+ranks_rankup__confirm_prestige_line_4=&3 El rango predeterminado se restablecerá.
+ranks_rankup__confirm_prestige_line_5=&3 El saldo se restablecerá.
+ranks_rankup__confirm_prestige_line_6=&3Confirmar con el comando: '&7/prestige %1confirm&3'
+ranks_rankup__confirm_prestige_line_7=&3Confirmar haciendo clic en el bloque verde
+
+ranks_rankup__invalid_charge_value=&3Valor no válido para chargePlayer. Los valores válidos son: %1 %2
+ranks_rankup__invalid_refund_value=&3Valor no válido para refundPlayer. Los valores válidos son: %1 %2
+
+ranks_rankutil__failure_internal=Fallo al realizar la comprobación de rankupPlayerInternal, revisa los registros del servidor para ver la traza de la pila: %1
+ranks_rankutil__failure_saving_player_data=Se produjo un error al guardar los archivos de jugador.
+
+ranks_firstJoinHandler__no_ranks_on_server=¡No hay rangos en el servidor! El nuevo jugador no tiene rango.
+ranks_firstJoinHandler__could_not_save_player=No se pudieron guardar los archivos del jugador.
+ranks_firstJoinHandler__success=¡Bienvenido! %1 acaba de unirse al servidor y se le asignó el rango predeterminado.
+
+ranks_prisonRanks__failure_no_economy_status=&cSin plugin de economÃa
+ranks_prisonRanks__failure_no_economy=PrisonRanks.enable() - Falló - No hay un plugin de economÃa activo - %1
+ranks_prisonRanks__failure_loading_ranks_status=&cError al cargar los archivos de rango: %1
+ranks_prisonRanks__failure_loading_ranks=Error al cargar un archivo de rango. %1
+ranks_prisonRanks__failure_loading_ladders_status=&cError al cargar los archivos de escalera: %1
+ranks_prisonRanks__failure_loading_ladders=Error al cargar un archivo de escalera. %1
+ranks_prisonRanks__failure_loading_players_status=&cError al cargar los archivos de jugador: %1
+ranks_prisonRanks__failure_loading_players=Error al cargar un archivo de jugador. %1
+ranks_prisonRanks__failed_loading_players=&cError al cargar los jugadores: %1
+ranks_prisonRanks__failed_to_load_player_file=Error al cargar un archivo de jugador. %1
+
+ranks_prisonRanks__status_loaded_ranks=Se cargaron %1 rangos en total. rangos predeterminados: %2 rangos de prestigio: %3 otros rangos: %4
+ranks_prisonRanks__status_loaded_ladders=Se cargaron %1 escaleras.
+ranks_prisonRanks__status_loaded_players=Se cargaron %1 jugadores.
+
+ranks_prisonRanks__failure_with_ladder=&cError al %1 una nueva escalera de %2, no se pudo encontrar ninguna preexistente.
+ranks_prisonRanks__failure_with_ladder_create=crear
+ranks_prisonRanks__failure_with_ladder_save=guardar
+ranks_prisonRanks__failure_with_ladder_default=predeterminada
+ranks_prisonRanks__failure_with_ladder_prestiges=prestigios
+
+ranks_prisonRanks__added_new_player=&7Prisión: &cNuevo jugador añadido &7a la prisión: &3%1 &7fue encontrado en el servidor.
+ranks_prisonRanks__added_and_fixed_players=Cargador de rango de prisión: Se añadieron %1 jugadores a la prisión. Se corrigieron %2 jugadores que no tenÃan un rango en la escalera predeterminada.
+
+ranks_rank__failure_loading_ranks=&aError: Cargando Rangos! &7Excepción al analizar documentos de rango. Id de rango= %1 nombre= %2 [%3]
+
+ranks_rankManager__failure_loading_rankManager=&aError: al cargar la escalera %1 (id de escalera: %2): &7No se pudo cargar el RankManager, por lo que no se puede acceder a ningún rango.
+ranks_rankManager__failure_duplicate_rank=&aError: Fallo al cargar la escalera de Rank: El rango '%1' ya estaba vinculado a la escalera '%2', pero se intentó agregar a la escalera '%3'. Este rango no estará vinculado a la escalera '%4'
+
+ranks_rankManager__remove_rank_warning=Advertencia de eliminación de rango: No existe un rango de respaldo, por lo que los jugadores con el rango que se está eliminando no tendrán ningún rango en esa escalera.
+ranks_rankManager__cannot_save_player_file=RemoveRank: No se pudo guardar el archivo del jugador.
+ranks_rankManager__player_is_now=El jugador %1 es ahora %2
+ranks_rankManager__cannot_save_ladder_file=RemoveRank: No se pudo guardar la escalera %1.
+ranks_rankManager__failure_no_economy=Fallo de economÃa: &7La moneda &a%1&7 fue registrada con el rango &a%2&7, pero no es compatible con ninguna integración de economÃa.
+ranks_rankManager__ranks_by_ladders=&7Rangos por escaleras:
+
+ranks_ladderManager__cannot_save_ladder_file=&cLadderManager.saveLadder: No se pudo guardar la escalera. &7%1 &3Error= [&7%2&3]"
+
+ranks_playerManager__cannot_save_player_file=Se produjo un error al guardar los archivos de jugador: %1
+ranks_playerManager__cannot_add_new_player=PlayerManager.getPlayer(): Error al añadir el nuevo nombre de jugador: %1. %2
+ranks_playerManager__cannot_save_new_player_file=Error al crear un nuevo archivo de datos de jugador para el jugador %1 nombre de archivo de destino: %2
+ranks_playerManager__no_player_name_available=
+ranks_playerManager__cannot_load_player_file=No se pudo cargar el jugador: %1
+ranks_playerManager__failed_to_load_economy_currency=Error al cargar la economÃa para obtener el saldo del jugador %1 con una moneda de %2.
+ranks_playerManager__failed_to_load_economy=Error al cargar la economÃa para obtener el saldo del jugador %1.
+ranks_playerManager__last_rank_message_for__prison_rankup_rank_tag_default=
+
+ranks_commandCommands__command_add_cannot_use_percent_symbols=&7No se pueden usar sÃmbolos de porcentaje como caracteres de escape de marcadores de posición; debe usar { } en su lugar.
+ranks_commandCommands__command_add_placeholders=&7Marcadores de posición personalizados para comandos de rango son: &3%1
+ranks_commandCommands__rank_does_not_exist=El rango '%1' no existe.
+ranks_commandCommands__command_add_duplicate=El comando duplicado '%1' no se añadió al rango '%2'.
+ranks_commandCommands__command_add_success=Se añadió el comando '%1' al rango '%2'.
+
+ranks_commandCommands__command_remove_sucess=Se eliminó el comando '%1' del rango '%2'.
+ranks_commandCommands__command_remove_failed=El rango no contiene ese comando. No se realizó ningún cambio.
+
+ranks_commandCommands__command_list_contains_none=El rango '%1' no contiene comandos.
+ranks_commandCommands__command_list_cmd_header=Comandos de RankUp para el rango %1
+ranks_commandCommands__command_list_click_cmd_to_remove=&8Haz clic en un comando para eliminarlo.
+ranks_commandCommands__command_list_click_to_remove=Haz clic para eliminar.
+ranks_commandCommands__command_list_add_button=&7[&a+&7] Añadir un nuevo comando
+ranks_commandCommands__command_list_add_new_command_tool_tip=&7Añadir un nuevo comando.
+ranks_commandCommands__command_row_number_must_be_greater_than_zero=&7Por favor, proporciona un número de fila válido mayor que cero. Fila era=[&b%1&7]
+ranks_commandCommands__command_row_number_too_high=&7Por favor, proporciona un número de fila válido no mayor que &b%1&7. Fila era=[&b%2&7]
+
+ranks_commandCommands__ladder_command_add_placeholders=&7Marcadores de posición personalizados para comandos de escalera son: &3%1
+ranks_commandCommands__ladder_ladder_does_not_exist=La escalera '%1' no existe.
+ranks_commandCommands__ladder_command_add_duplicate=El comando duplicado '%1' no se añadió a la escalera '%2'.
+ranks_commandCommands__ladder_command_add_success=Se añadió el comando '%1' a la escalera '%2'.
+
+ranks_commandCommands__ladder_command_remove_sucess=Se eliminó el comando '%1' de la escalera '%2'.
+ranks_commandCommands__ladder_command_remove_failed=La escalera no contiene ese comando. No se realizó ningún cambio.
+
+ranks_commandCommands__ladder_command_list_contains_none=La escalera '%1' no contiene comandos.
+ranks_commandCommands__ladder_command_list_cmd_header=Comandos de RankUp para la escalera %1
+
+ranks_LadderCommands__ladder_already_exists=Ya existe una escalera con el nombre '%1'.
+ranks_LadderCommands__ladder_creation_error=Se produjo un error al crear tu escalera '%1'. &8Consulta la consola para obtener detalles.
+ranks_LadderCommands__ladder_created=La escalera '%1' ha sido creada.
+ranks_LadderCommands__ladder_could_not_save=No se pudo guardar la escalera.
+ranks_LadderCommands__ladder_does_not_exist=La escalera '%1' no existe.
+ranks_LadderCommands__rank_does_not_exist=El rango '%1' no existe.
+ranks_LadderCommands__ladder_already_has_rank=La escalera '%1' ya contiene el rango '%2'.
+ranks_LadderCommands__ladder_added_rank=Se añadió el rango '%1' a la escalera '%2' en la posición %3.
+ranks_LadderCommands__ladder_deleted=La escalera '%1' ha sido eliminada.
+ranks_LadderCommands__ladder_cannot_delete_default=No puedes eliminar la escalera predeterminada. Es necesaria.
+ranks_LadderCommands__ladder_cannot_delete_prestiges=No puedes eliminar la escalera de prestigio. Es necesaria.
+ranks_LadderCommands__ladder_cannot_delete_with_ranks=No se puede eliminar una escalera si todavÃa tiene rangos vinculados a ella. Elimina todos los rangos y vuelve a intentarlo.
+ranks_LadderCommands__ladder_error=Se produjo un error al eliminar tu escalera. &8Consulta la consola para obtener detalles.
+ranks_LadderCommands__ladder_error_adding=Se produjo un error al añadir un rango a tu escalera. &8Consulta la consola para obtener detalles.
+ranks_LadderCommands__ladder_error_removing=Se produjo un error al eliminar un rango de tu escalera. &8Consulta la consola para obtener detalles.
+ranks_LadderCommands__ladder_error_saving=Error al guardar la escalera.
+ranks_LadderCommands__move_rank_notice=Intentando eliminar el rango especificado de su escalera original, luego se añadirá de nuevo a la escalera de destino en la ubicación especificada. El rango no se perderá.
+
+ranks_LadderCommands__ladder_has_ranks=&7Esta escalera contiene los siguientes rangos:
+ranks_LadderCommands__ladder_default_rank=&b(Rango predeterminado) &7-
+ranks_LadderCommands__ladder_see_ranks_list=&3Ver &f/ranks list &b[nombre de la escalera] &3para obtener más detalles sobre los rangos.
+ranks_LadderCommands__ladder_has_no_perms=&3La escalera '&7%1&3' no contiene permisos ni grupos de permisos.
+ranks_LadderCommands__ladder_set_rank_cost_multiplier=&3La escalera '&7%1&3' se guardó. El multiplicador de costo de rango es ahora [%2]; era [%3].
+ranks_LadderCommands__ladder_rank_cost_multiplier_no_change=&3La escalera '&7%1&3' no se actualizó. El multiplicador de costo de rango suministrado no cambió. [%2]
+ranks_LadderCommands__ladder_rank_cost_multiplier_out_of_range=&3El multiplicador de costo de rango está fuera de rango. Debe estar entre -100% y 100%. [%1]
+ranks_LadderCommands__ladder_apply_rank_cost_multiplier_no_change=&3La escalera '&7%1&3' no se actualizó. El multiplicador de costo de rango aplicado a esta escalera no cambió. [%2]
+ranks_LadderCommands__ladder_apply_rank_cost_multiplier_saved=&3La escalera '&7%1&3' se guardó. La aplicación del multiplicador de costo de rango a esta escalera es ahora [%2]; era [%3].
+
+ranks_rankCommands__rank_already_exists=&3El rango llamado &7%1 &3ya existe. Prueba con un nombre diferente.
+ranks_rankCommands__rank_name_required=&3Se requiere un nombre de rango y no puede contener códigos de formato.
+ranks_rankCommands__ladder_does_not_exist=&3Una escalera con el nombre de '&7%1&3' no existe.
+ranks_rankCommands__ladder_has_no_ranks=&3La escalera '&7%1&3' no tiene ningún rango.
+ranks_rankCommands__ladder_has_no_ranks_text=&3--- Esta escalera no tiene rangos ---
+ranks_rankCommands__rank_does_not_exist=&3El rango '&7%1&3' no existe.
+ranks_rankCommands__rank_cannot_be_created=&3No se pudo crear el rango.
+ranks_rankCommands__rank_created_successfully=&3Tu nuevo rango, '&7%1&3', fue creado en la escalera '&7%2&3', usando el valor de etiqueta '&7%3&3'
+ranks_rankCommands__error_saving_ladder=&3La escalera '&7%1&3' no se pudo guardar en el disco. Comprueba la consola para obtener detalles.
+ranks_rankCommands__error_writting_ladder=&3La escalera '&7%1&3' no se pudo guardar en el disco. Comprueba la consola para obtener detalles.
+
+ranks_rankCommands__auto_config_preexisting_warning=&3Estás intentando ejecutar &7/ranks autoConfigure&3 con rangos o minas ya configurados. Cantidad de rangos = &7%1&3. Cantidad de minas = &7%2&3. Por favor, ejecuta este comando con la palabra clave &7help&3 para obtener más información y otras opciones de personalización: &7/ranks autoConfigure help&3. Es mejor ejecutar este comando desde la &7consola&3 debido al volumen de datos que genera. Añade la opción '&7force&3' para forzar la ejecución de este proceso. Si hay un conflicto con un rango o mina preexistente, este proceso hará todo lo posible para fusionar los nuevos rangos y minas con lo que ya existe. Hay el riesgo de que algo no se fusione correctamente. Al fusionar, todos los bloques serán reemplazados, pero en la consola se imprimirá la lista de bloques originales como referencia si quieres recrearlos. Por favor, haz una copia de seguridad de tu directorio &7plugins/Prison/&3 antes de ejecutar para estar seguro.
+ranks_rankCommands__auto_config_force_warning=&a¡Advertencia! &3Ejecutar autoConfigure con &7force&3 habilitado. No se hace responsable si las minas o los rangos chocan.
+ranks_rankCommands__auto_config_invalid_options=&3Se detectaron opciones no válidas. {br}Usa %1&3. {br}&3Las opciones restantes desconocidas fueron: [&7%2&3]
+ranks_rankCommands__auto_config_skip_rank_warning=&a¡Advertencia! &3El rango &7%1 &3ya existe y se está omitiendo junto con la generación de la mina si está habilitada, junto con todas las demás funciones.
+
+ranks_rankCommands__auto_config_no_ranks_created=Rangos autoConfigure: No se crearon rangos.
+ranks_rankCommands__auto_config_ranks_created=Rangos autoConfigure: Se crearon %1 rangos.
+ranks_rankCommands__auto_config_no_rank_cmds_created=Rangos autoConfigure: No se crearon comandos de rango.
+ranks_rankCommands__auto_config_ladder_rank_cost_multiplier_info=La escalera 'prestigios' se ha habilitado para aplicar un Multiplicador de Costo de Rango Base del %1 que se aplicará a 'todos' los costos de rango. Este multiplicador se incrementará con cada rango en la escalera.
+ranks_rankCommands__auto_config_ladder_rank_cost_multiplier_command_example=El Multiplicador de Costo de Rango Base se puede ajustar o desactivar con el comando: '/ranks ladder rankCostMultiplier
+ranks_rankCommands__auto_config_rank_cmds_created=Rangos autoConfigure: Se crearon %1 comandos de rango.
+
+ranks_rankCommands__auto_config_no_mines_created=Rangos autoConfigure: No se crearon minas.
+ranks_rankCommands__auto_config_mines_created=Rangos autoConfigure: Se crearon %1 minas.
+
+ranks_rankCommands__auto_config_no_linkage=Rangos autoConfigure: No se vincularon minas y no se vincularon rangos.
+ranks_rankCommands__auto_config_linkage_count=Rangos autoConfigure: Se vincularon %1 rangos y minas.
+
+ranks_rankCommands__rank_cannot_remove=No puedes eliminar este rango porque es el único rango en la escalera predeterminada.
+ranks_rankCommands__rank_was_removed=El rango '%1' ha sido eliminado con éxito.
+ranks_rankCommands__rank_delete_error=El rango '%1' no se pudo eliminar debido a un error.
+
+ranks_rankCommands__ranks_list_header=&3Rangos en la escalera &7%1 &3
+ranks_rankCommands__ranks_list_ladder_cost_multplier=&3 Multiplicador de Costo de Rango por Rango: &7%1
+ranks_rankCommands__ranks_list_ladder_apply_ranks_cost_multplier=&3 ¿Aplicar multiplicadores de costo de rango globales a este rango? &7%1
+ranks_rankCommands__ranks_list_ladder_edit_cost_multplier=Editar el Multiplicador de Costo de Rango de esta Escalera.
+
+ranks_rankCommands__ranks_list_click_to_edit=&7Haz clic en el nombre de un rango para ver más información.
+ranks_rankCommands__ranks_list_command_count= &cCmds: &3%1
+ranks_rankCommands__ranks_list_currency= &3Moneda: &2%1
+ranks_rankCommands__ranks_list_click_to_view=&7Haz clic para ver la información.
+ranks_rankCommands__ranks_list_click_to_view2=&7Haz clic para ver.
+ranks_rankCommands__ranks_list_create_new_rank=&7Crear un nuevo rango.
+ranks_rankCommands__ranks_list_you_may_try=&8También puedes probar
+
+ranks_rankCommands__ranks_info_header=Rango %1
+ranks_rankCommands__ranks_info_name=&3Nombre del Rango: &7%1
+ranks_rankCommands__ranks_info_tag=&3Etiqueta del Rango: &7%1 &3Sin formato: &7\Q%2\E
+ranks_rankCommands__ranks_info_ladder=&3Escalera: &7%1
+ranks_rankCommands__ranks_info_not_linked_to_mines=&3Este rango no está vinculado a ninguna mina
+ranks_rankCommands__ranks_info_linked_mines=&3Minas vinculadas a este rango: %1
+ranks_rankCommands__ranks_info_cost=&3Costo: &7$%1
+ranks_rankCommands__ranks_info_currency=&3Moneda: &7<&a%1&7>
+ranks_rankCommands__ranks_info_players_with_rank=&7Jugadores con este rango: %1
+ranks_rankCommands__ranks_info_rank_id=&6ID de Rango: &7%1
+ranks_rankCommands__ranks_info_rank_delete_message=&7[&c-&7] Eliminar
+ranks_rankCommands__ranks_info_rank_delete_tool_tip=&7Haz clic para eliminar este rango.\n&cEsta acción no se puede deshacer.
+
+ranks_rankCommands__rank_set_cost_success=Se ha establecido correctamente el costo del rango '%1' en %2
+
+ranks_rankCommands__set_currency_not_specified=Se debe especificar un nombre de moneda, o debe ser 'ninguno'. '%1' no es válido.
+ranks_rankCommands__set_currency_no_currency_to_clear=El rango '%1' no tiene una moneda, por lo que no se puede borrar.
+ranks_rankCommands__set_currency_cleared=Se ha eliminado correctamente la moneda para el rango '%1'. Este rango ya no tiene una moneda personalizada.
+ranks_rankCommands__set_currency_no_active_support=Ninguna economÃa activa admite la moneda llamada '%1'.
+ranks_rankCommands__set_currency_successful=Se ha establecido correctamente la moneda para el rango '%1' en %2
+
+ranks_rankCommands__set_tag_invalid=&cEl nombre de la etiqueta debe ser un valor válido. Para eliminar, use un valor de &aninguno&c.
+ranks_rankCommands__set_tag_no_change=&cEl nuevo nombre de la etiqueta es el mismo que el anterior. No se ha realizado ningún cambio.
+ranks_rankCommands__set_tag_cleared=&cEl nombre de la etiqueta se ha eliminado para el rango %1.
+ranks_rankCommands__set_tag_success=&cEl nombre de la etiqueta se ha cambiado a %1 para el rango %2.
+
+ranks_rankCommands__player_must_be_online=&3Debes ser un jugador en el juego para ejecutar este comando, y/o el jugador debe estar en lÃnea.
+ranks_rankCommands__player_ladder_info=&7Escalera: &b%1 &7Rango Actual: &b%2
+ranks_rankCommands__player_ladder_highest_rank= ¡Es el rango más alto!
+ranks_rankCommands__player_ladder_next_rank=&7 Próximo rango: &b%1&7 &c$&b%2
+ranks_rankCommands__player_ladder_next_rank_currency=&7 Moneda: &2%1
+ranks_rankCommands__player_balance_default=&7El saldo actual de &b%1 &7es &b%2
+ranks_rankCommands__player_balance_others=&7El saldo actual de &b%1 &7es &b%2 &2%3
+ranks_rankCommands__player_perms_offline=&7 Aviso: &3El jugador está desconectado, por lo que los permisos no están disponibles ni son precisos.
+ranks_rankCommands__player_sellall_multiplier=&7 Multiplicador de Venta: &b%1 %2
+ranks_rankCommands__player_not_accurate=&5(&2No Preciso&5)
+ranks_rankCommands__player_admin_only=&8[Solo Admin]
+ranks_rankCommands__player_past_names=&7Nombres de Jugadores Anteriores y Fecha de Cambio:
+ranks_rankCommands__player_perms=&7Permisos de Jugador:
+ranks_rankCommands__player_op=&cOP
+ranks_rankCommands__player_player=&3Jugador
+ranks_rankCommands__player_online=&3En LÃnea
+ranks_rankCommands__player_offline=&3Desconectado
+ranks_rankCommands__player_prison_offline_player=&3PrisiónJugadorDesconectado
+ranks_rankCommands__player_prison_player=&3PrisiónJugador
+ranks_rankCommands__player_no_ranks_found=&3No se encontraron rangos para &c%1
+
+ranks_rankCommands__players_invalid_ladder=La escalera '%1' no existe, o no era 'TODOS'.
+ranks_rankCommands__players_invalid_action=La acción '%1' es inválida. [jugadores, todos, completo]
+
+ranks_rankCommands__topn_forced_reload_successful=La recarga forzada de topN fue exitosa.
+ranks_rankCommands__topn_forced_reload_failure=La recarga forzada de topN falló.
+ranks_rankCommands__topn_debug_saved_success=El modo de depuración topN: todos los datos topN guardados en Prison/data_storage/prisonTopN.json y recargados para estadÃsticas de rendimiento.
\ No newline at end of file
diff --git a/prison-core/src/main/resources/lang/ranks/fr_FR.properties b/prison-core/src/main/resources/lang/ranks/fr_FR.properties
index d5284ec1b..1e5c2ab66 100644
--- a/prison-core/src/main/resources/lang/ranks/fr_FR.properties
+++ b/prison-core/src/main/resources/lang/ranks/fr_FR.properties
@@ -72,7 +72,7 @@
## be able to enable them.
-messages__version=28
+messages__version=29
messages__auto_refresh=true
ranks_rankup__rankup_no_player_name=Tu as
@@ -94,6 +94,7 @@ ranks_rankup__rankup_no_ranks=Il n'y a pas de rangs dans ce classement.
ranks_rankup__rankup_rank_does_not_exist=Le rang %1 n'existe pas dans ce serveur.
ranks_rankup__rankup_rank_is_not_in_ladder=Le rang %1 n'existe pas dans le classement %2.
ranks_rankup__rankup_currency_is_not_supported=La monnaie, %1, n'est pas supporté par aucun plugin d'économie chargé.
+ranks_rankup__rankup_economy_failed=Failed to adjust player's balance. Could be an issue with vault or a cache timing issue. Try again.
ranks_rankup__rankup_ladder_removed=Le classement %1 a été supprimé.
ranks_rankup__rankup_failure_removing_ladder=La montée en rang a échoué comme le joueur n'a pas pu être supprimé du classement. (Les joueurs ne peuvent pas être supprimés du classement 'default').
ranks_rankup__rankup_in_progress_failure=La montée en rang n'a pas réussi à se terminer correctement. Aucun statut n'a été défini.
diff --git a/prison-core/src/main/resources/lang/ranks/pt_PT.properties b/prison-core/src/main/resources/lang/ranks/pt_PT.properties
index 13c0a863c..d24bc1e39 100644
--- a/prison-core/src/main/resources/lang/ranks/pt_PT.properties
+++ b/prison-core/src/main/resources/lang/ranks/pt_PT.properties
@@ -72,7 +72,7 @@
## be able to enable them.
-messages__version=6
+messages__version=7
messages__auto_refresh=true
ranks_rankup__rankup_no_player_name=Tu têns
@@ -94,6 +94,7 @@ ranks_rankup__rankup_no_ranks=Não existe ranks nesta ladder.
ranks_rankup__rankup_rank_does_not_exist=O rank %1 não existe neste server.
ranks_rankup__rankup_rank_is_not_in_ladder=O rank %1 não existe naladder %2.
ranks_rankup__rankup_currency_is_not_supported=A economia não é suportada, %1.
+ranks_rankup__rankup_economy_failed=Failed to adjust player's balance. Could be an issue with vault or a cache timing issue. Try again.
ranks_rankup__rankup_ladder_removed=A ladder %1 foi removida.
ranks_rankup__rankup_failure_removing_ladder=Rankup falhou porque nao foi possivel remover o player da ladder %1. (Players cannot be removed from the 'default' ladder).
ranks_rankup__rankup_in_progress_failure=Rankup falhou ser complet corretamente.
diff --git a/prison-core/src/main/resources/lang/ranks/zh-CN.properties b/prison-core/src/main/resources/lang/ranks/zh-CN.properties
index 9a53f49c5..73d9bca5c 100644
--- a/prison-core/src/main/resources/lang/ranks/zh-CN.properties
+++ b/prison-core/src/main/resources/lang/ranks/zh-CN.properties
@@ -72,7 +72,7 @@
## be able to enable them.
-messages__version=25
+messages__version=26
messages__auto_refresh=true
ranks_rankup__rankup_no_player_name=ä½ å·²ç»
@@ -92,6 +92,7 @@ ranks_rankup__rankup_failed_to_assign_rank_with_refund=分é…阶级失败. é‡
ranks_rankup__rankup_failed_to_save_player_file=æ— æ³•æ£€ç´¢æˆ–å†™å…¥æ•°æ®ï¼Œæ‚¨çš„æ–‡ä»¶å¯èƒ½å·²æŸå,通知æœåŠ¡å™¨ç®¡ç†å‘˜
ranks_rankup__rankup_no_ranks=这个矿区上没有阶级
ranks_rankup__rankup_rank_does_not_exist=阶级%1ä¸å˜åœ¨
+ranks_rankup__rankup_economy_failed=Failed to adjust player's balance. Could be an issue with vault or a cache timing issue. Try again.
ranks_rankup__rankup_rank_is_not_in_ladder=阶级%2ä¸ä¸å˜åœ¨é˜¶çº§%1
ranks_rankup__rankup_currency_is_not_supported=ä»»ä½•å·²åŠ è½½çš„ç»æµŽå‰ç½®éƒ½ä¸æ”¯æŒè´§å¸%1
ranks_rankup__rankup_ladder_removed=å·²åˆ é™¤é˜¶çº§%1
diff --git a/prison-core/src/main/resources/lang/ranks/zh_TW.properties b/prison-core/src/main/resources/lang/ranks/zh_TW.properties
index 45cce31bc..97fc64c7f 100644
--- a/prison-core/src/main/resources/lang/ranks/zh_TW.properties
+++ b/prison-core/src/main/resources/lang/ranks/zh_TW.properties
@@ -72,7 +72,7 @@
## be able to enable them.
-messages__version=9
+messages__version=10
messages__auto_refresh=true
ranks_rankup__rankup_no_player_name=您已經
@@ -94,6 +94,7 @@ ranks_rankup__rankup_no_ranks=這個階內沒有階級
ranks_rankup__rankup_rank_does_not_exist=階級 %1 ä¸å˜åœ¨
ranks_rankup__rankup_rank_is_not_in_ladder=æ¤éšŽç´š %1 ä¸å˜åœ¨æ–¼éšŽ %2 之ä¸
ranks_rankup__rankup_currency_is_not_supported=這個貨幣, %1, 無法使用於æ¤
+ranks_rankup__rankup_economy_failed=Failed to adjust player's balance. Could be an issue with vault or a cache timing issue. Try again.
ranks_rankup__rankup_ladder_removed=階 %1 已經刪除
ranks_rankup__rankup_failure_removing_ladder=Rankup failed since the player could not be removed from the ladder %1. (Players cannot be removed from the 'default' ladder).
ranks_rankup__rankup_in_progress_failure=無法æ£å¸¸çš„å‡ç´š. æ¤éšŽç´šä¸å˜åœ¨
diff --git a/prison-core/src/main/resources/lang/sellall/es_ES.properties b/prison-core/src/main/resources/lang/sellall/es_ES.properties
new file mode 100644
index 000000000..3b42bef6c
--- /dev/null
+++ b/prison-core/src/main/resources/lang/sellall/es_ES.properties
@@ -0,0 +1,74 @@
+# NOTE: A messages__version is an arbitrary integer that will be manually incremented within Prison
+# when there are changes to these messages. This value represents when message content is
+# changed, fixed, or added to. This value may not be increased if the change is very small and
+# insignificant, such as a space or a couple of letters.
+#
+# messages__auto_refresh=true indicates that this file will automatically be replaced if
+# Prison detects a messages__version difference. The old file will be deleted (renamed) and
+# a new copy will be placed in the directory to be used. If this value is set to false, then
+# Prison will not refresh this file and there could be issues with the display of other messages.
+# If auto refresh is set to false, we are not held responsible for possible issues that can
+# arise from inaccurate messages. If set to false, then you are responsible for maintaining
+# the messages on your own.
+#
+# If you make changes to this file, and you have messages__auto_refresh=false, then those
+# changes will be replaced when this file is updated. Since the old file is renamed, and
+# not deleted, you can manually merge your changes back in to the new update. The old
+# renamed files will never be deleted by prison; you can remove them when you feel like it
+# is safe to do so.
+#
+# Please consider helping Prison, and everyone else who may use Prison, by contributing all
+# translations to other languages. They should be faithful translations, and not something
+# for the sake of humor or changes just for cosmetic styling. If you have something you would
+# like to share, please contact a staff member on our Discord server.
+#Thanks for your contributions!
+#
+
+##
+## Prison Supports Unicode (UTF-8) encoding in these properties files. BUt you must
+## follow these instructions to ensure everything works properly.
+##
+## 1. You should only edit these files using a UTF-8 editor. On windows use NotePad, not WordPad.
+## WordPad will save as plain text. To confirm the save was successful: save, close the editor,
+## then reopen to confirm the encoding was preserved.
+##
+## 2. When running on Windows, you must enable utf-8 encoding in minecraft's console. Windows
+## defaults to a characterpage 1252. To enable window's use of utf-8, you need to change the
+## encoding prior to launching spigot/paper:
+## chcp 65001
+##
+## Full example of a windows script, which hooks for java debugging:
+## rem Note: chcp 65001 enables utf-8 in windows, when normally windows uses characterpage 1252
+## chcp 65001
+## java -Dfile.encoding="UTF-8" -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -Xms1g -Xmx4g -jar spigot-1.8.8.jar nogui --log-strip-color
+## pause
+##
+## 3. When viewing the logs/latest.log files you must use an editor such as NotePad instead of WordPad.
+##
+## 4. Unicode is properly displayed in game, in console, in the logs, and with paste.helpch.at when using
+## /prison support submit.
+##
+
+# NOTE: If you need to eliminate a message, leave an empty String after the equal sign `=`, or
+# use the key word `*none*`. Prison will not insert element or send a message if
+# these values are found.
+# Example: `core_text__from_now=from now` use either `core_text__from_now=` or `core_text__from_now=*none*`
+#
+# NOTE: Specific to the `core_output__` messages, `/prison reload locales` cannot reload them because
+# these are a very low level static component of the fallback messaging system within Prison.
+# You will have to restart the server if you make any changes to the messages with these prefixes.
+#
+
+messages__version=2
+messages__auto_refresh=true
+
+sellall_function__message=&dEjemplo &7Mensaje
+
+sellall_spigot_utils__money_earned=&3Has ganado &a$%1
+sellall_spigot_utils__only_sellall_signs_are_enabled=&3Solo puedes vender a través de letreros. El comando está desactivado.
+sellall_spigot_utils__rate_limit_exceeded=&3Despacio. Se ha excedido el lÃmite de uso.
+sellall_spigot_utils__shop_is_empty=&3Lo siento, esta tienda de sellall está vacÃa.
+sellall_spigot_utils__you_have_nothing_to_sell=&3Lo siento, no tienes nada que vender.
+
+sellall_spigot_utils__sellall_is_disabled=&3Lo siento, sellall está deshabilitado.
+sellall_spigot_utils__sellall_gui_is_disabled=&3Lo siento, el menú de sellall está deshabilitado.
\ No newline at end of file
diff --git a/prison-core/src/main/resources/lang/spigot/es_ES.properties b/prison-core/src/main/resources/lang/spigot/es_ES.properties
new file mode 100644
index 000000000..341787a89
--- /dev/null
+++ b/prison-core/src/main/resources/lang/spigot/es_ES.properties
@@ -0,0 +1,324 @@
+# NOTE: A messages__version is an arbitrary integer that will be manually incremented within Prison
+# when there are changes to these messages. This value represents when message content is
+# changed, fixed, or added to. This value may not be increased if the change is very small and
+# insignificant, such as a space or a couple of letters.
+#
+# messages__auto_refresh=true indicates that this file will automatically be replaced if
+# Prison detects a messages__version difference. The old file will be deleted (renamed) and
+# a new copy will be placed in the directory to be used. If this value is set to false, then
+# Prison will not refresh this file and there could be issues with the display of other messages.
+# If auto refresh is set to false, we are not held responsible for possible issues that can
+# arise from inaccurate messages. If set to false, then you are responsible for maintaining
+# the messages on your own.
+#
+# If you make changes to this file, and you have messages__auto_refresh=false, then those
+# changes will be replaced when this file is updated. Since the old file is renamed, and
+# not deleted, you can manually merge your changes back in to the new update. The old
+# renamed files will never be deleted by prison; you can remove them when you feel like it
+# is safe to do so.
+#
+# Please consider helping Prison, and everyone else who may use Prison, by contributing all
+# translations to other languages. They should be faithful translations, and not something
+# for the sake of humor or changes just for cosmetic styling. If you have something you would
+# like to share, please contact a staff member on our Discord server.
+#Thanks for your contributions!
+#
+
+##
+## Prison Supports Unicode (UTF-8) encoding in these properties files. BUt you must
+## follow these instructions to ensure everything works properly.
+##
+## 1. You should only edit these files using a UTF-8 editor. On windows use NotePad, not WordPad.
+## WordPad will save as plain text. To confirm the save was successful: save, close the editor,
+## then reopen to confirm the encoding was preserved.
+##
+## 2. When running on Windows, you must enable utf-8 encoding in minecraft's console. Windows
+## defaults to a characterpage 1252. To enable window's use of utf-8, you need to change the
+## encoding prior to launching spigot/paper:
+## chcp 65001
+##
+## Full example of a windows script, which hooks for java debugging:
+## rem Note: chcp 65001 enables utf-8 in windows, when normally windows uses characterpage 1252
+## chcp 65001
+## java -Dfile.encoding="UTF-8" -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -Xms1g -Xmx4g -jar spigot-1.8.8.jar nogui --log-strip-color
+## pause
+##
+## 3. When viewing the logs/latest.log files you must use an editor such as NotePad instead of WordPad.
+##
+## 4. Unicode is properly displayed in game, in console, in the logs, and with paste.helpch.at when using
+## /prison support submit.
+##
+
+# NOTE: If you need to eliminate a message, leave an empty String after the equal sign `=`, or
+# use the key word `*none*`. Prison will not insert element or send a message if
+# these values are found.
+# Example: `core_text__from_now=from now` use either `core_text__from_now=` or `core_text__from_now=*none*`
+#
+# NOTE: Specific to the `core_output__` messages, `/prison reload locales` cannot reload them because
+# these are a very low level static component of the fallback messaging system within Prison.
+# You will have to restart the server if you make any changes to the messages with these prefixes.
+#
+
+messages__version=6
+messages__auto_refresh=true
+
+## Haga clic para hacer algo
+spigot_gui_lore_click_to_add=Haz clic para agregar.
+spigot_gui_lore_click_to_add_backpack=Haz clic para agregar una mochila.
+#spigot_gui_lore_click_to_cancel=Haz clic para cancelar.
+#spigot_gui_lore_click_to_close=Haz clic para cerrar.
+#spigot_gui_lore_click_to_confirm=Haz clic para confirmar.
+#spigot_gui_lore_click_to_decrease=Haz clic para disminuir.
+#spigot_gui_lore_click_to_delete=Haz clic para eliminar.
+#spigot_gui_lore_click_to_disable=Haz clic para deshabilitar.
+#spigot_gui_lore_click_to_edit=Haz clic para editar.
+#spigot_gui_lore_click_to_enable=Haz clic para habilitar.
+#spigot_gui_lore_click_to_increase=Haz clic para aumentar.
+spigot_gui_lore_click_to_manage_rank=Haz clic para administrar el rango.
+#spigot_gui_lore_click_to_open=Haz clic para abrir.
+spigot_gui_lore_click_to_rankup=Haz clic para subir de rango.
+spigot_gui_lore_click_to_rename=Haz clic para renombrar.
+spigot_gui_lore_click_to_select=Haz clic para seleccionar.
+spigot_gui_lore_click_to_start_block_setup=Haz clic para agregar un bloque.
+spigot_gui_lore_click_to_teleport=Haz clic para teleportar.
+spigot_gui_lore_click_to_use=Haz clic para usar.
+
+## Haga clic izquierdo para hacer algo.
+#spigot_gui_lore_click_left_to_confirm=Haz clic izquierdo para confirmar.
+#spigot_gui_lore_click_left_to_reset=Haz clic izquierdo para reiniciar.
+#spigot_gui_lore_click_left_to_open=Haz clic izquierdo para abrir.
+#spigot_gui_lore_click_left_to_edit=Haz clic izquierdo para editar.
+
+## Haga clic derecho para hacer algo.
+#spigot_gui_lore_click_right_to_cancel=Haz clic derecho para cancelar.
+#spigot_gui_lore_click_right_to_delete=Haz clic derecho para eliminar.
+#spigot_gui_lore_click_right_to_disable=Haz clic derecho para deshabilitar.
+#spigot_gui_lore_click_right_to_enable=Haz clic derecho para habilitar.
+#spigot_gui_lore_click_right_to_toggle=Haz clic derecho para cambiar.
+
+## Cambio de turno y haga clic derecho para hacer algo
+#spigot_gui_lore_click_right_and_shift_to_delete=Cambio de turno y haz clic derecho para eliminar.
+#spigot_gui_lore_click_right_and_shift_to_disable=Cambio de turno y haz clic derecho para deshabilitar.
+#spigot_gui_lore_click_right_and_shift_to_toggle=Cambio de turno y haz clic derecho para cambiar.
+
+## TÃtulos o nombres de datos.
+spigot_gui_lore_backpack_id=ID de la mochila:
+spigot_gui_lore_blocks=Bloques:
+spigot_gui_lore_blocktype=Tipo de bloque:
+spigot_gui_lore_chance=Probabilidad:
+spigot_gui_lore_command=Comando:
+spigot_gui_lore_currency=Moneda:
+#spigot_gui_lore_delay=Retraso:
+spigot_gui_lore_id=ID:
+spigot_gui_lore_info=Información:
+spigot_gui_lore_minename=Nombre de la mina:
+#spigot_gui_lore_multiplier=Multiplicador:
+spigot_gui_lore_name=Nombre:
+spigot_gui_lore_owner=Propietario:
+spigot_gui_lore_percentage=Porcentaje:
+#spigot_gui_lore_permission=Permiso:
+spigot_gui_lore_players_at_rank=Jugadores en rango:
+#spigot_gui_lore_prestige_name=Nombre de prestigio:
+#spigot_gui_lore_price=Precio:
+spigot_gui_lore_radius=Radio:
+spigot_gui_lore_rank_tag=Etiqueta de rango:
+spigot_gui_lore_reset_time=Tiempos de reinicio:
+spigot_gui_lore_size=Tamaño:
+spigot_gui_lore_show_item=Mostrar artÃculo:
+spigot_gui_lore_spawnpoint=Punto de aparición:
+spigot_gui_lore_volume=Volumen:
+#spigot_gui_lore_value=Valor:
+spigot_gui_lore_world=Mundo:
+
+## Acciones simples o estado.
+spigot_gui_lore_disabled=Desactivado.
+spigot_gui_lore_enabled=Activado.
+spigot_gui_lore_locked=¡Bloqueado!
+#spigot_gui_lore_next_page=Página siguiente.
+#spigot_gui_lore_prior_page=Página anterior.
+spigot_gui_lore_rankup=Subir de rango.
+spigot_gui_lore_selected=Seleccionado.
+spigot_gui_lore_unlocked=Desbloqueado!
+
+## Descripciones.
+spigot_gui_lore_add_backpack_instruction_1=Agrega al menos un elemento
+spigot_gui_lore_add_backpack_instruction_2=Si no lo haces, la mochila
+spigot_gui_lore_add_backpack_instruction_3=no se guardará.
+spigot_gui_lore_prestige_warning_1=El prestigio restablecerá:
+spigot_gui_lore_prestige_warning_2=- Rango.
+spigot_gui_lore_prestige_warning_3=- Saldo.
+spigot_gui_lore_ranks_setup_1=¡No hay rangos!
+spigot_gui_lore_ranks_setup_2=Si deseas continuar la configuración.
+spigot_gui_lore_ranks_setup_3=Todos los rangos y minas de A a Z se realizarán
+spigot_gui_lore_ranks_setup_4=¡Con valores &apredeterminados&3!
+spigot_gui_lore_ranks_setup_5=También puedes usar:
+spigot_gui_lore_ranks_setup_6=/ranks autoConfigure full !
+spigot_gui_lore_ranks_setup_7=Reemplace X con el precio inicial y
+spigot_gui_lore_ranks_setup_8=el multiplicador, precio predeterminado = 50000, multiplicador = 1.5.
+spigot_gui_lore_sellall_delay_use_1=Breve retraso antes de usar nuevamente
+spigot_gui_lore_sellall_delay_use_2=el comando &3/sellall sell &8.
+spigot_gui_lore_set_mine_delay_instruction_1=Establece un retraso de mina
+spigot_gui_lore_set_mine_delay_instruction_2=antes de restablecer cuando
+spigot_gui_lore_set_mine_delay_instruction_3=llegue a cero bloques.
+spigot_gui_lore_show_item_description_1=Este es el artÃculo
+spigot_gui_lore_show_item_description_2=mostrado en la GUI del jugador
+spigot_gui_lore_show_item_description_3=o /mines GUI.
+spigot_gui_lore_skip_reset_instruction_1=Salta el reinicio si
+spigot_gui_lore_skip_reset_instruction_2=no se han extraÃdo suficientes bloques
+spigot_gui_lore_skip_reset_instruction_3=.
+
+## Nombres de botones o descripciones de una sola lÃnea.
+spigot_gui_lore_autofeatures_button_description=Gestionar funciones automáticas.
+spigot_gui_lore_backpacks_button_description=Gestionar mochilas.
+spigot_gui_lore_disable_notifications=Deshabilitar notificaciones.
+spigot_gui_lore_enable_radius_mode=Activar el modo de radio.
+spigot_gui_lore_enable_within_mode=Activar el modo dentro.
+spigot_gui_lore_mines_button_description=Gestionar minas.
+spigot_gui_lore_no_multipliers=[!] ¡No hay multiplicadores!
+spigot_gui_lore_ranks_button_description=Administrador de GUI de rangos.
+spigot_gui_lore_rankup_if_enough_money=Si tienes suficiente dinero.
+spigot_gui_lore_sellall_button_description=Gestionar SellAll.
+spigot_gui_lore_sellall_edit_info=Editar moneda de SellAll.
+spigot_gui_lore_tp_to_mine=Haz clic para teleportar a la mina.
+
+## Mensajes
+spigot_message_missing_permission=¡Lo siento, no tienes permiso para usar eso!
+spigot_message_chat_event_time_end=¡Se acabó el tiempo, evento cancelado!
+spigot_message_event_cancelled=Evento cancelado.
+spigot_message_command_wrong_format=Lo siento, el formato del comando es incorrecto.
+spigot_message_console_error=Lo siento, debes ser un jugador para usar eso.
+
+## Mensajes de escalera
+spigot_message_ladder_default_empty=Lo siento, la escalera predeterminada está vacÃa.
+
+## Mensajes de minas
+spigot_message_mines_disabled=Lo siento, las minas están desactivadas.
+spigot_message_mines_name_chat_1=Por favor, escribe el &6mineName &7que te gustarÃa usar y &6submit&7.
+spigot_message_mines_name_chat_2=Escribe &cclose &7para cancelar o espera &c30 segundos&7.
+spigot_message_mines_name_chat_cancelled=Renombrar mina &ccerrado&7, ¡nada cambió!
+spigot_message_mines_item_show_edit_success=Elemento de muestra de mina editado con éxito.
+spigot_message_mines_or_gui_disabled=Lo siento, las minas o las GUI están deshabilitadas.
+
+## Mensajes de mochila
+spigot_message_backpack_cant_own=Lo siento, no puedes tener mochilas.
+spigot_message_backpack_delete_error=Lo siento, no se puede eliminar la mochila.
+spigot_message_backpack_delete_success=Mochila eliminada con éxito.
+spigot_message_backpack_format_error=Lo siento, el formato del comando no es correcto, tal vez falten algunos argumentos.
+spigot_message_backpack_limit_decrement_fail=El lÃmite de la mochila no puede ser negativo.
+spigot_message_backpack_limit_edit_success=LÃmite de mochila editado con éxito.
+spigot_message_backpack_limit_not_number=Lo siento, el lÃmite de la mochila no es un número.
+spigot_message_backpack_limit_reached=Lo siento, no puedes tener más mochilas.
+spigot_message_backpack_missing_playername=Lo siento, por favor agrega un nombre de jugador válido.
+spigot_message_backpack_resize_success=Si la mochila existe, se redimensionó con éxito.
+spigot_message_backpack_size_must_be_multiple_of_9=¡El tamaño de la mochila debe ser un múltiplo de 9 y no exceder 64!
+
+
+## Mensajes de prestigio
+spigot_message_prestiges_disabled=Lo siento, los prestigios están desactivados.
+spigot_message_prestiges_empty=Lo siento, no hay prestigios.
+spigot_message_prestiges_or_gui_disabled=Lo siento, los prestigios o las GUI están deshabilitados.
+spigot_message_prestiges_confirm=Confirmar&7: Escribe la palabra &aconfirm&7 para confirmar.
+spigot_message_prestiges_cancel=Cancelar&7: Escribe la palabra &ccancel&7 para cancelar, &ctienes 30 segundos.
+spigot_message_prestiges_cancelled=Prestigio cancelado.
+spigot_message_prestiges_cancelled_wrong_keyword=Prestigio &ccancelado&7, no escribiste la palabra: &aconfirm&7.
+
+## Mensajes de rangos
+spigot_message_ranks_disabled=Lo siento, los rangos están desactivados.
+spigot_message_ranks_or_gui_disabled=Lo siento, los rangos o las GUI están deshabilitados.
+spigot_message_ranks_tag_chat_rename_1=Por favor, introduce la &6tag &7que te gustarÃa usar y &6submit&7.
+spigot_message_ranks_tag_chat_rename_2=Introduce &cclose &7para cancelar o espera &c30 segundos&7.
+spigot_message_ranks_tag_chat_cancelled=Rename tag &ccerrado&7, ¡nada cambió!
+
+## Mensajes de SellAll
+spigot_message_sellall_auto_already_enabled=Sellall AutoSell ya esta habilitado.
+spigot_message_sellall_auto_already_disabled=SellAll AutoSell ya esta deshabilitado.
+spigot_message_sellall_auto_disabled=AutoSell se ha deshabilitado.
+spigot_message_sellall_auto_disabled_cant_use=Lo siento, debes habilitar AutoSell para usar esto.
+spigot_message_sellall_auto_enabled=AutoSell se ha habilitado.
+spigot_message_sellall_auto_perusertoggleable_enabled=Sellall AutoSell perUserToggleable está habilitado.
+spigot_message_sellall_auto_perusertoggleable_disabled=Sellall AutoSell perUserToggleable está deshabilitado.
+spigot_message_sellall_auto_perusertoggleable_already_enabled=Sellall AutoSell perUserToggleable ya esta habilitado.
+spigot_message_sellall_auto_perusertoggleable_already_disabled=Sellall AutoSell perUserToggleable ya esta deshabilitado.
+spigot_message_sellall_boolean_input_invalid=El valor booleano no es válido (los valores válidos son Verdadero o Falso).
+spigot_message_sellall_cant_find_item_config=Lo siento, no puedo encontrar tu artÃculo en la configuración.
+spigot_message_sellall_currency_chat_1=&3¡Inicio de la configuración de una nueva moneda para SellAll!
+spigot_message_sellall_currency_chat_2=Escribe &ccancel &7para cancelar.
+spigot_message_sellall_currency_chat_3=Escribe &3default &7para establecer la moneda predeterminada.
+spigot_message_sellall_currency_chat_4=Escribe el &anombre de la moneda &7para establecer la nueva moneda.
+spigot_message_sellall_currency_edit_success=Moneda de SellAll editada con éxito.
+spigot_message_sellall_currency_not_found=Lo siento, moneda no encontrada.
+spigot_message_sellall_hand_disabled=SellAll Hand desactivado con éxito.
+spigot_message_sellall_hand_enabled=SellAll Hand habilitado con éxito.
+spigot_message_sellall_hand_is_disabled=SellAll Hand está desactivado.
+spigot_message_sellall_item_add_success=ArtÃculo agregado con éxito.
+spigot_message_sellall_item_already_added=Ya has agregado este artÃculo, por favor usa el comando de edición en su lugar.
+spigot_message_sellall_item_delete_success=ArtÃculo eliminado con éxito.
+spigot_message_sellall_item_edit_success=SellAll Item editado con éxito.
+spigot_message_sellall_item_id_not_found=Lo siento, nombre de artÃculo/ID no válido.
+spigot_message_sellall_item_missing_name=Agrega el argumento de nombre de artÃculo/ID por favor.
+spigot_message_sellall_item_missing_price=Agrega el argumento de valor de artÃculo por favor.
+spigot_message_sellall_item_not_found=ArtÃculo de SellAll no encontrado en la configuración.
+spigot_message_sellall_default_values_success=Valores predeterminados de SellAll establecidos con éxito.
+spigot_message_sellall_delay_already_enabled=SellAll Delay ya esta habilitado.
+spigot_message_sellall_delay_already_disabled=SellAll Delay ya esta deshabilitado.
+spigot_message_sellall_delay_disabled=SellAll Delay deshabilitado con éxito.
+spigot_message_sellall_delay_disabled_cant_use=Lo siento, por favor habilita SellAll Delay para usar esto.
+spigot_message_sellall_delay_edit_success=Sellall Delay editado con éxito.
+spigot_message_sellall_delay_enabled=SellAll Delay habilitado con éxito.
+spigot_message_sellall_delay_not_number=El número de SellAll Delay no es válido.
+#spigot_message_sellall_delay_wait=Sellall delay is enabled, please slow down.
+spigot_message_sellall_gui_disabled=La GUI de SellAll está desactivada.
+#spigot_message_sellall_money_earned=You earned &a$
+spigot_message_sellall_multiplier_add_success=SellAll Multiplier añadido con éxito.
+spigot_message_sellall_multiplier_are_disabled=Lo siento, los multiplicadores de SellAll están desactivados.
+spigot_message_sellall_multiplier_cant_find=Lo siento, no se puede encontrar el multiplicador de SellAll.
+spigot_message_sellall_multiplier_delete_success=SellAll Multiplier eliminado con éxito.
+spigot_message_sellall_multiplier_disabled=Multiplicadores de SellAll desactivados con éxito.
+spigot_message_sellall_multiplier_edit_success=SellAll Multiplier editado con éxito.
+#spigot_message_sellall_sell_empty=Sorry, there aren't items in the SellAll shop.
+#spigot_message_sellall_sell_nothing_sellable=Sorry but you've nothing to sell.
+#spigot_message_sellall_sell_sign_only=You can use SellAll Sell only with Signs.
+spigot_message_sellall_sell_sign_notify=Has vendido con éxito a través de un cartel.
+spigot_message_sellall_trigger_already_disabled=SellAll Trigger ya esta deshabilitado.
+spigot_message_sellall_trigger_already_enabled=SellAll Trigger ya esta habilitado.
+spigot_message_sellall_trigger_disabled=SellAll Trigger deshabilitado con éxito.
+spigot_message_sellall_trigger_enabled=SellAll Trigger habilitado con éxito.
+spigot_message_sellall_trigger_is_disabled=Lo siento, SellAll Trigger está desactivado.
+spigot_message_sellall_trigger_item_add_success=Disparador de artÃculo SellAll añadido con éxito.
+spigot_message_sellall_trigger_item_cant_find=Disparador de artÃculo SellAll no encontrado en la configuración.
+spigot_message_sellall_trigger_item_delete_success=Disparador de artÃculo SellAll eliminado con éxito.
+spigot_message_sellall_trigger_item_missing=Agrega el nombre/ID del artÃculo al comando.
+
+## Mensajes de GUI
+spigot_message_gui_backpack_disabled=No se puede abrir la GUI, las mochilas están desactivadas.
+spigot_message_gui_backpack_empty=Lo siento, no hay mochilas que mostrar.
+spigot_message_gui_backpack_too_many=Lo siento, hay demasiadas mochilas y la GUI no puede mostrarlas.
+spigot_message_gui_close_success=GUI cerrada con éxito.
+spigot_message_gui_error=No se puede abrir la GUI, deshabilitada o con error.
+spigot_message_gui_error_empty=No se puede abrir la GUI, está vacÃa.
+spigot_message_gui_ladder_empty=Lo siento, no hay escaleras que mostrar. [%1]
+spigot_message_gui_ladder_too_many=Lo siento, hay demasiadas escaleras y la GUI no puede mostrarlas.
+spigot_message_gui_mines_empty=Lo siento, no hay minas que mostrar.
+spigot_message_gui_mines_too_many=Lo siento, hay demasiadas minas para que la GUI las muestre.
+spigot_message_gui_prestiges_empty=Lo siento, no hay prestigios que mostrar.
+spigot_message_gui_prestiges_too_many=Lo siento, hay demasiados prestigios y la GUI no puede mostrarlos.
+spigot_message_gui_ranks_empty=Lo siento, no hay rangos en esta escalera para mostrar.
+spigot_message_gui_ranks_rankup_commands_empty=Lo siento, no hay comandos de subida de rango para mostrar.
+spigot_message_gui_ranks_rankup_commands_too_many=Lo siento, hay demasiados comandos de subida de rango y la GUI no puede mostrarlos.
+spigot_message_gui_ranks_too_many=Lo siento, hay demasiados rangos y la GUI no puede mostrarlos.
+spigot_message_gui_reload_success=¡GUI recargada con éxito!
+#spigot_message_gui_sellall_disabled=Sorry, SellAll is disabled.
+spigot_message_gui_sellall_empty=Lo siento, no hay nada que mostrar.
+spigot_message_gui_too_high=Lo siento, pero el valor es demasiado alto (por encima del máximo posible).
+spigot_message_gui_too_low_value=Lo siento, pero el valor es demasiado bajo (por debajo del mÃnimo posible).
+
+
+spigot_blockbreak_mines__mine_is_being_reset__please_wait=La mina %1 se está restableciendo... por favor espera.
+
+spigot_blockbreak_core__validate_event__your_tool_is_worn_out=&cTu herramienta está desgastada y no se puede usar.
+
+spigot_auto_manager__inventory_is_full=&c¡ADVERTENCIA! ¡Tu inventario está lleno!
+spigot_auto_manager__is_full_dropping_item__ignore__not_useds=&c¡ADVERTENCIA! ¡Tu inventario está lleno y estás dejando caer objetos!
+spigot_auto_manager__inventory_is_full_losing_items=&c¡ADVERTENCIA! ¡Tu inventario está lleno y estás perdiendo objetos!
+
+spigot_minebombs__cooldown_delay=No puedes usar otra Bomba de Mina de Prisión durante %1 segundos.
\ No newline at end of file
diff --git a/prison-core/src/test/java/tech/mcprison/prison/TestPlatform.java b/prison-core/src/test/java/tech/mcprison/prison/TestPlatform.java
index 74eb4933e..3a86b57ca 100644
--- a/prison-core/src/test/java/tech/mcprison/prison/TestPlatform.java
+++ b/prison-core/src/test/java/tech/mcprison/prison/TestPlatform.java
@@ -30,6 +30,7 @@
import tech.mcprison.prison.PrisonCommand.RegisteredPluginsData;
import tech.mcprison.prison.backpacks.PlayerBackpack;
+import tech.mcprison.prison.bombs.MineBombEffectsData;
import tech.mcprison.prison.commands.PluginCommand;
import tech.mcprison.prison.file.FileStorage;
import tech.mcprison.prison.file.YamlFileIO;
@@ -79,6 +80,21 @@ public void getWorldLoadErrors( ChatDisplay display ) {
}
+ @Override
+ public Player getPlatformPlayer(RankPlayer rankPlayer) {
+ return null;
+ }
+
+ @Override
+ public RankPlayer getRankPlayer(UUID uuid, String name) {
+ return null;
+ }
+
+ @Override
+ public boolean saveRankPlayer(RankPlayer rPlayer) {
+ return false;
+ }
+
@Override
public Optional getPlayer(String name) {
return null;
@@ -93,10 +109,11 @@ public Optional getPlayer(UUID uuid) {
public List getOnlinePlayers() {
return new ArrayList<>();
}
+
@Override
public List getOfflinePlayers() {
- List players = new ArrayList<>();
- return players;
+ List players = new ArrayList<>();
+ return players;
}
@Override
@@ -171,15 +188,15 @@ public void log(String message, Object... format) {
@Override
public void logCore( String message ) {
- if (suppressOutput) {
- return;
- }
- System.out.println(ChatColor.stripColor(message));
+ if (suppressOutput) {
+ return;
+ }
+ System.out.println(ChatColor.stripColor(message));
}
@Override
public void logPlain( String message ) {
- System.out.println(message);
+ System.out.println(message);
}
@Override
@@ -229,24 +246,24 @@ public void identifyRegisteredPlugins() {
public Map getPlaceholderDetailCounts() {
- Map placeholderDetails = new TreeMap<>();
-
- return placeholderDetails;
+ Map placeholderDetails = new TreeMap<>();
+
+ return placeholderDetails;
}
public int getPlaceholderCount() {
- return 0;
+ return 0;
}
public int getPlaceholderRegistrationCount() {
- return 0;
+ return 0;
}
@Override
public Placeholders getPlaceholders() {
- return null;
+ return null;
}
@@ -311,6 +328,11 @@ public List