TCheckpoint

This commit is contained in:
tyuXX 2025-07-04 22:29:56 +03:00
parent e8c9fd3456
commit a461a669ed
104 changed files with 822 additions and 234 deletions

View file

@ -14,7 +14,7 @@ public class MarketBaseValues {
Map.entry(Material.EMERALD, 75.0),
Map.entry(Material.REDSTONE, 5.0),
Map.entry(Material.LAPIS_LAZULI, 15.0),
Map.entry(Material.NETHERITE_INGOT, 500.0),
Map.entry(Material.NETHERITE_INGOT, 1500.0),
Map.entry(Material.STONE, 1.5),
Map.entry(Material.GRANITE, 1.0),
Map.entry(Material.POLISHED_GRANITE, 1.5),
@ -92,7 +92,7 @@ public class MarketBaseValues {
Map.entry(Material.DEEPSLATE_DIAMOND_ORE, 100.0),
Map.entry(Material.NETHER_GOLD_ORE, 25.0),
Map.entry(Material.NETHER_QUARTZ_ORE, 10.0),
Map.entry(Material.ANCIENT_DEBRIS, 75.0),
Map.entry(Material.ANCIENT_DEBRIS, 325.0),
Map.entry(Material.COAL_BLOCK, 90.0),
Map.entry(Material.RAW_IRON_BLOCK, 225.0),
Map.entry(Material.RAW_COPPER_BLOCK, 67.5),

View file

@ -0,0 +1,14 @@
package org.gsdistance.grimmsServer.Data.Player;
public enum PlayerCapability {
AUTOSELL("Auto Sell", "Allows the player to automatically sell items in their inventory when they reach a certain threshold.", "autosell");
public final String displayName;
public final String description;
public final String capabilityId;
PlayerCapability(String displayName, String description, String capabilityId) {
this.displayName = displayName;
this.description = description;
this.capabilityId = capabilityId;
}
}

View file

@ -1,4 +1,4 @@
package org.gsdistance.grimmsServer.Data;
package org.gsdistance.grimmsServer.Data.Player;
public enum PlayerRank {
DEFAULT("Default", 1),

View file

@ -1,4 +1,4 @@
package org.gsdistance.grimmsServer.Data;
package org.gsdistance.grimmsServer.Data.Player;
import org.bukkit.entity.Player;
import org.gsdistance.grimmsServer.Stats.PlayerStats;
@ -33,7 +33,7 @@ public class PlayerTitleChecker {
}
public static void checkForMoney(Player player) {
double money = (double) PlayerStats.getPlayerStats(player).getStat("money");
double money = PlayerStats.getPlayerStats(player).getStat("money", Double.class);
PlayerTitles playerTitles = PlayerTitles.getPlayerTitles(player);
if (money > 100000.0) {
playerTitles.addTitle("Richie");
@ -50,7 +50,7 @@ public class PlayerTitleChecker {
}
public static void checkForBlockBreaks(Player player) {
long blockBreakCount = (long) PlayerStats.getPlayerStats(player).getStat("block_break_count");
long blockBreakCount = PlayerStats.getPlayerStats(player).getStat("block_break_count", Long.class);
PlayerTitles playerTitles = PlayerTitles.getPlayerTitles(player);
if (blockBreakCount > 1000) {
playerTitles.addTitle("Miner");
@ -64,7 +64,8 @@ public class PlayerTitleChecker {
}
public static void checkForTotalKills(Player player) {
Object totalKillsObj = PlayerStats.getPlayerStats(player).getStat("total_kill_count");
// TODO - This is a workaround for the fact that the total_kill_count is wongly stored as an Integer in the player for now.
Object totalKillsObj = PlayerStats.getPlayerStats(player).getStat("total_kill_count", Object.class);
long totalKills;
if (totalKillsObj instanceof Integer) {
totalKills = ((Integer) totalKillsObj).longValue();

View file

@ -1,4 +0,0 @@
package org.gsdistance.grimmsServer.Data;
public enum PlayerCapability {
}