This commit is contained in:
tyuXX 2026-01-24 00:22:40 +03:00
parent 10c011ede1
commit c45cec156d
31 changed files with 422 additions and 41 deletions

View file

@ -0,0 +1,56 @@
package org.gsdistance.grimmsServer.Data;
import java.util.Map;
public class HelpStrings {
public static final Map<String, String> helpStrings = Map.ofEntries(
Map.entry("sendmoney", "Send money to another player"),
Map.entry("makeitemlevelable", "Make the item in your hand levelable (costs 3500 money, requires level 10+)"),
Map.entry("setplayerstat", "Set a specific stat for a player"),
Map.entry("addtitle", "Add a title to a player"),
Map.entry("executeplayer", "Execute a player (requires Executioner title)"),
Map.entry("grimsservercommands", "List all available GrimmsServer commands"),
Map.entry("withdrawmoney", "Withdraw money as physical banknotes (minimum 25 money)"),
Map.entry("depositmoney", "Deposit banknotes by holding them in your main hand"),
Map.entry("acceptrequest", "Accept a pending request by ID"),
Map.entry("removetitle", "Remove a title from a player"),
Map.entry("home", "Manage your homes - set, teleport, list, or delete"),
Map.entry("nick", "Set your nickname or another player's nickname"),
Map.entry("market", "Access the market system for buying, selling, and enchanting"),
Map.entry("gutil", "Utility commands for version info, relics, capabilities, and settings"),
Map.entry("glog", "View logs for stats, titles, world info, leaderboards, and chunk data"),
Map.entry("gdim", "Dimension management - create, delete, teleport, list, and get info"),
Map.entry("gfaction", "Faction management - invite, join, leave, kick, claim, and manage ranks"),
Map.entry("gconfig", "Configuration management - dump config or reload settings"),
Map.entry("job", "Job system - log jobs, take jobs, or buy education"),
Map.entry("ghelp", "Get help for GrimmsServer commands")
);
public static final Map<String, String> helpUsages = Map.ofEntries(
Map.entry("sendmoney", "/sendmoney <player> <amount>"),
Map.entry("makeitemlevelable", "/makeitemlevelable"),
Map.entry("setplayerstat", "/setplayerstat <player> <stat> <value>"),
Map.entry("addtitle", "/addtitle <player> <title>"),
Map.entry("executeplayer", "/executeplayer <player>"),
Map.entry("grimsservercommands", "/grimsservercommands"),
Map.entry("withdrawmoney", "/withdrawmoney <amount> [count]"),
Map.entry("depositmoney", "/depositmoney"),
Map.entry("acceptrequest", "/acceptrequest <request_id>"),
Map.entry("removetitle", "/removetitle <player> <title>"),
Map.entry("home", "/home <sethome|tp|homes|delhome> [args...]"),
Map.entry("nick", "/nick <nickname> OR /nick <player> <nickname>"),
Map.entry("market", "/market <get|stock|ripoff|enchant|tp|sell|sellall|buy|enchcosts|info> [args...]"),
Map.entry("gutil", "/gutil <version|relic|capability|setting> [args...]"),
Map.entry("glog", "/glog <self_stats|other_stats|self_titles|other_titles|world|leaderboard|commands|chunk> [args...]"),
Map.entry("gdim", "/gdim <create|delete|tp|list|info> [args...]"),
Map.entry("gfaction", "/gfaction <invite|join|leave|kick|info|new|claim|unclaim|setrank|unclaimall> [args...]"),
Map.entry("gconfig", "/gconfig <dump|reload>"),
Map.entry("job", "/job <log|take|buyedu> [args...]"),
Map.entry("ghelp", "/ghelp <command>")
);
public static String getHelpString(String commandName) {
return helpStrings.getOrDefault(commandName.toLowerCase(), "Not found.");
}
public static String getHelpUsage(String commandName) {
return helpUsages.getOrDefault(commandName.toLowerCase(), "Not found.");
}
}

View file

@ -0,0 +1,61 @@
package org.gsdistance.grimmsServer.Data.Market;
import org.bukkit.potion.PotionEffectType;
import java.util.Map;
public class PotionEffectBaseValues {
public static final Map<PotionEffectType, Double> potionEffectBaseValues = Map.ofEntries(
Map.entry(PotionEffectType.SPEED, 5.0),
Map.entry(PotionEffectType.SLOWNESS, 3.0),
Map.entry(PotionEffectType.HASTE, 8.0),
Map.entry(PotionEffectType.MINING_FATIGUE, 2.0),
Map.entry(PotionEffectType.STRENGTH, 10.0),
Map.entry(PotionEffectType.INSTANT_HEALTH, 50.0),
Map.entry(PotionEffectType.INSTANT_DAMAGE, 45.0),
Map.entry(PotionEffectType.JUMP_BOOST, 4.0),
Map.entry(PotionEffectType.NAUSEA, 1.0),
Map.entry(PotionEffectType.REGENERATION, 12.0),
Map.entry(PotionEffectType.RESISTANCE, 15.0),
Map.entry(PotionEffectType.FIRE_RESISTANCE, 6.0),
Map.entry(PotionEffectType.WATER_BREATHING, 4.0),
Map.entry(PotionEffectType.INVISIBILITY, 20.0),
Map.entry(PotionEffectType.BLINDNESS, 2.0),
Map.entry(PotionEffectType.NIGHT_VISION, 3.0),
Map.entry(PotionEffectType.HUNGER, 1.0),
Map.entry(PotionEffectType.WEAKNESS, 2.0),
Map.entry(PotionEffectType.POISON, 8.0),
Map.entry(PotionEffectType.WITHER, 18.0),
Map.entry(PotionEffectType.HEALTH_BOOST, 150.0),
Map.entry(PotionEffectType.ABSORPTION, 20.0),
Map.entry(PotionEffectType.GLOWING, 1.0),
Map.entry(PotionEffectType.LEVITATION, 12.0),
Map.entry(PotionEffectType.LUCK, 30.0),
Map.entry(PotionEffectType.UNLUCK, 2.0),
Map.entry(PotionEffectType.SLOW_FALLING, 5.0),
Map.entry(PotionEffectType.CONDUIT_POWER, 14.0),
Map.entry(PotionEffectType.DOLPHINS_GRACE, 3.0),
Map.entry(PotionEffectType.BAD_OMEN, 8.0),
Map.entry(PotionEffectType.HERO_OF_THE_VILLAGE, 25.0),
Map.entry(PotionEffectType.DARKNESS, 2.0),
Map.entry(PotionEffectType.TRIAL_OMEN, 10.0),
Map.entry(PotionEffectType.WIND_CHARGED, 7.0),
Map.entry(PotionEffectType.WEAVING, 6.0),
Map.entry(PotionEffectType.OOZING, 5.0),
Map.entry(PotionEffectType.INFESTED, 4.0)
);
public static final Map<PotionEffectType, Integer> potionEffectAmplitudeLimits = Map.ofEntries(
Map.entry(PotionEffectType.REGENERATION, 2),
Map.entry(PotionEffectType.RESISTANCE, 1),
Map.entry(PotionEffectType.HASTE, 3)
);
public static double getPotionEffectBaseValue(PotionEffectType potionEffectType, int time, int amplifier) {
Integer limit = potionEffectAmplitudeLimits.get(potionEffectType);
if(limit != null && amplifier > limit) {
return Double.MAX_VALUE;
}
return potionEffectBaseValues.get(potionEffectType) * time * Math.pow(amplifier,2);
}
}

View file

@ -1,7 +1,8 @@
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");
AUTOSELL("Auto Sell", "Allows the player to automatically sell items in their inventory when they reach a certain threshold.", "autosell"),
MAGNET("Magnet","Magnetises items in a 10 block radius", "magnet");
public final String displayName;
public final String description;

View file

@ -47,6 +47,9 @@ public class PlayerTitleChecker {
if (money > 1000000000000.0) {
playerTitles.addTitle("Trillionaire");
}
if (money > 1000000000000000.0) {
playerTitles.addTitle("Trillionaire");
}
}
public static void checkForBlockBreaks(Player player) {