This commit is contained in:
tyuXX 2026-07-14 17:12:43 +03:00
parent b4406dc774
commit 4db1164963
11 changed files with 5 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View file

@ -24,6 +24,10 @@ public class BuyEnchantment {
Enchantment enchantment = Enchantment.getByKey(NamespacedKey.minecraft(args[1].toLowerCase())); Enchantment enchantment = Enchantment.getByKey(NamespacedKey.minecraft(args[1].toLowerCase()));
if (enchantment != null && EnchantBaseValues.enchantBaseValues.containsKey(enchantment)) { if (enchantment != null && EnchantBaseValues.enchantBaseValues.containsKey(enchantment)) {
ItemStack itemToApply = ((Player) sender).getInventory().getItemInMainHand(); ItemStack itemToApply = ((Player) sender).getInventory().getItemInMainHand();
if (itemToApply.getAmount() > 1) {
sender.sendMessage("You can only enchant one item at a time. Please unstack the item first.");
return false;
}
int enchantBonus = Math.toIntExact(Math.min(Math.round(Math.sqrt(ItemLevelHandler.getLevelHandler(itemToApply, (Player) sender).getLevel())), 100L)); int enchantBonus = Math.toIntExact(Math.min(Math.round(Math.sqrt(ItemLevelHandler.getLevelHandler(itemToApply, (Player) sender).getLevel())), 100L));
if (RelicHandler.isRelic(itemToApply)) { if (RelicHandler.isRelic(itemToApply)) {
RelicHandler relicHandler = RelicHandler.getRelicHandler(itemToApply); RelicHandler relicHandler = RelicHandler.getRelicHandler(itemToApply);

View file

@ -8,7 +8,7 @@ import org.gsdistance.grimmsServer.Shared;
import java.util.Map; import java.util.Map;
public class PlayerTitles { public class PlayerTitles {
public static final Map<String, String> titles = Map.ofEntries(Map.entry("Dictator", "The title of a dictator, not to be messed with."), Map.entry("Executioner", "The title and power of execution."), Map.entry("Murderer", "Someone whose crimes follow him till death."), Map.entry("Victim", "Got murdered, unfortunate."), Map.entry("DragonSlayer", "The fabled warrior to defeat the fabled dragon or something like that."), Map.entry("Newbie", "Wowie! Joining the game gives a title!"), Map.entry("Richie", "Money talks, well at least that's what I've been told!"), Map.entry("Millionaire", "Wow, that's quite a lot ya' know!"), Map.entry("Billionaire", "Capitalism at it's finest."), Map.entry("Trillionaire", "Literally insane, no comment."), Map.entry("Quadrillionaire", "Why?"), Map.entry("Miner", "Minin' to the earths core."), Map.entry("Anti-block", "DEMOLISH 10000 blocks"), Map.entry("UltimateMiner", "Mine 100000 blocks"), Map.entry("Titlemaxxer", "Get more than 5 titles"), Map.entry("KillingMachine", "Kill 100 things(?)."), Map.entry("ProGamer", "Kill 1000 things(?)."), Map.entry("Hitman", "Professional killerguy."), Map.entry("Leader", "You got on the leaderboard."), Map.entry("Null", "Not a title bro.")); public static final Map<String, String> titles = Map.ofEntries(Map.entry("Dictator", "The title of a dictator, not to be messed with."), Map.entry("Executioner", "The title and power of execution."), Map.entry("Murderer", "Someone whose crimes follow him till death."), Map.entry("Victim", "Got murdered, unfortunate."), Map.entry("DragonSlayer", "The fabled warrior to defeat the fabled dragon or something like that."), Map.entry("Newbie", "Wowie! Joining the game gives a title!"), Map.entry("Richie", "Money talks, well at least that's what I've been told!"), Map.entry("Millionaire", "Wow, that's quite a lot ya' know!"), Map.entry("Billionaire", "Capitalism at it's finest."), Map.entry("Trillionaire", "Literally insane, no comment."), Map.entry("Quadrillionaire", "Why?"), Map.entry("Miner", "Minin' to the earths core."), Map.entry("Anti-block", "DEMOLISH 10000 blocks"), Map.entry("UltimateMiner", "Mine 100000 blocks"), Map.entry("Titlemaxxer", "Get more than 5 titles"), Map.entry("KillingMachine", "Kill 100 things(?)."), Map.entry("ProGamer", "Kill 1000 things(?)."), Map.entry("Hitman", "Professional killerguy."), Map.entry("Leader", "You got on the leaderboard."), Map.entry("Null", "Not a title bro."), Map.entry("BugSlayer", "Reported a bug."), Map.entry("ExploitDestroyer","Reported an exploit."), Map.entry("Disgrace.", "Abused an exploit."));
private final Player player; private final Player player;
public PlayerTitles(Player player) { public PlayerTitles(Player player) {