diff options
| author | davidovski <david@davidovski.xyz> | 2025-11-05 00:43:04 +0000 |
|---|---|---|
| committer | davidovski <david@davidovski.xyz> | 2025-11-05 00:43:04 +0000 |
| commit | 93ca641e63e9e1e1894ad2aa7e36935736a16bc0 (patch) | |
| tree | 65c1b2ca2c3629456fd8c232180af03fc278a8f0 /src/main/java/net/uomc/mineshaft/Mineshaft.java | |
| parent | 2e47a68b69fac942e4efd7b90f248e15f02f6a82 (diff) | |
Diffstat (limited to 'src/main/java/net/uomc/mineshaft/Mineshaft.java')
| -rw-r--r-- | src/main/java/net/uomc/mineshaft/Mineshaft.java | 102 |
1 files changed, 65 insertions, 37 deletions
diff --git a/src/main/java/net/uomc/mineshaft/Mineshaft.java b/src/main/java/net/uomc/mineshaft/Mineshaft.java index f2cbe4a..cef05df 100644 --- a/src/main/java/net/uomc/mineshaft/Mineshaft.java +++ b/src/main/java/net/uomc/mineshaft/Mineshaft.java @@ -36,6 +36,7 @@ import com.mouldycheerio.dbot.logging.FullLogger; import com.mouldycheerio.dbot.starboard.StarboardController; import com.mouldycheerio.dbot.util.PeelingUtils; +import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.entities.Member; import net.uomc.mineshaft.resources.ResourceManager; import net.uomc.mineshaft.resources.market.MarketCommand; @@ -86,21 +87,6 @@ public class Mineshaft extends CustomBot { getCommandController().addCommand(new RobCommand(this)); getCommandController().addCommand(new TradeCommand(this)); - // TODO remove this comand - getCommandController().addCommand(CommandDetails.from("setsword"), (e, b, args) -> { - List<String> argList = Arrays.asList(args); - Optional<Integer> level = argList.stream().filter(s -> PeelingUtils.isInteger(s)) - .map(s -> Integer.parseInt(s)).findFirst(); - getSword(e.getMember()).setLevel(level.get()); - sendSuccessMessage(e, "Set sword level of " + e.getMember().getAsMention() + " to " + level.get()); - }); - - // TODO remove this comand - getCommandController().addCommand(CommandDetails.from("getsword"), (e, b, args) -> { - sendSuccessMessage(e, - "" + e.getMember().getAsMention() + " has sword level: " + getSword(e.getMember()).getLevel()); - }); - getCommandController().removeCommand("help"); getCommandController().addCommand(CommandDetails.from("help"), (e, b, args) -> { String title = "Mineshaft"; @@ -121,6 +107,39 @@ public class Mineshaft extends CustomBot { // TODO update when changes String title = "Patch Notes"; StringBuilder notes = new StringBuilder(); + notes.append("### v0.6\n"); + notes.append("- Overhauled PVP mechanic\n"); + notes.append(" - Players now have HP and attacking another player will damage them \n"); + notes.append(" - Players will only drop items when they die \n"); + notes.append(" - Added option to fight back or flee from pvp encounter\n"); + notes.append(" - Fighting another player is only possible if you have a sword\n"); + notes.append("- Added sleeping `m!sleep`\n"); + notes.append(" - Reduces all cooldowns by 75%\n"); + notes.append(" - Explodes your bed in the nether, dropping ores\n"); + notes.append("- Made food edible, `m!eat`\n"); + notes.append(" - Eating food will regenerate health\n"); + notes.append(" - Food cannot be eaten during pvp encounters\n"); + notes.append("- Added campfire, `m!campfire`\n"); + notes.append(" - Fish and potatos can now be cooked\n"); + notes.append(" - Eating cooked food regenerates more health than when raw\n"); + notes.append(" - Crafting more campfires can total amount that can be cooked\n"); + notes.append("- Added blacksmith `m!blacksmith`"); + notes.append(" - Blacksmith can be used to upgrade sword and armour\n"); + notes.append(" - Stacking blacksmiths can decrease the time it takes to upgrade\n"); + notes.append(" - Each blacksmith must have a forge so that they can work\n"); + notes.append(" - Better swords increase amount of damage dealt when pvping\n"); + notes.append(" - Better armour decreases amount of damage taken from all sources\n"); + notes.append("- Fixed incorrectly displayed enchantments \n"); + notes.append("- You can no longer fish in the nether\n"); + notes.append("- Added `m!plant`, `m!harvest`, `m!expand` as aliases for their respective `m!farm` commands \n"); + notes.append("- Added `m!upgrade` command as alias to `m!blacksmith upgrade [sword|armour]` and `m!pickaxe upgrade`\n"); + notes.append("- Expired cooldowns are now listed in `m!cooldowns`\n"); + notes.append("- Added chance for furnace to produce coal\n"); + notes.append("\n"); + + String v06 = notes.toString(); + notes = new StringBuilder(); + notes.append("### v0.5.2\n"); notes.append("- Fix trader giving impossible item prices\n"); notes.append("- Items can only be given to players who are in the same dimension\n"); @@ -141,6 +160,10 @@ public class Mineshaft extends CustomBot { notes.append("- Added `m!top [item]` to list who has the most of an item\n"); notes.append("- Fixed `m!daily`\n"); notes.append("- Fixed typos\n"); + + String v05 = notes.toString(); + notes = new StringBuilder(); + notes.append("### v0.4\n"); notes.append("- Added nether\n"); notes.append(" - 10 obsidian can now be used to craft a portal\n"); @@ -154,28 +177,33 @@ public class Mineshaft extends CustomBot { notes.append("- Furnace can now be accessed every 30 minutes\n"); notes.append("- Added `m!market` for trading items\n"); notes.append("- Fix `m!give` to work properly\n"); - //notes.append("### v0.3.1\n"); - //notes.append("- Added furnace crafting recipe\n"); - //notes.append("- Added `m!daily` to get daily commands\n"); - //notes.append("- Balanced amount of ores needed to upgrade pickaxe\n"); - //notes.append("- Fix obsidian not spawning\n"); - //notes.append("- Added `m!cooldowns`\n"); - //notes.append("### v0.3\n"); - //notes.append("- Added items for all ores `m!inventory`\n"); - //notes.append("- Added pickaxe levels `m!pickaxe`\n"); - //notes.append(" - Pickaxe can be upgraded, giving access to better ores (`m!pickaxe upgrade`)\n"); - //notes.append("- Added enchanting `m!enchant`\n"); - //notes.append(" - Your pickaxe can be enchanted by spending lapis and xp\n"); - //notes.append(" - Owning bookshelves gives you a discount on the amount of levels it costs to enchant\n"); - //notes.append("- Added crafting `m!craft`\n"); - //notes.append(" - Enchanting table and books can now be crafted!\n"); - //notes.append("- Fishing now drops books\n"); - //notes.append("- Rob has been relaced with `m!kill`\n"); - //notes.append(" - Killing a player will drop some of their items\n"); - //notes.append("- Added obsidian\n"); - //notes.append("- Removed `m!flip`, this will be added in a future update (with a new mechanic)\n"); - - sendMessage(e, title, notes.toString()); + String v04 = notes.toString(); + notes = new StringBuilder(); + notes.append("### v0.3.1\n"); + notes.append("- Added furnace crafting recipe\n"); + notes.append("- Added `m!daily` to get daily commands\n"); + notes.append("- Balanced amount of ores needed to upgrade pickaxe\n"); + notes.append("- Fix obsidian not spawning\n"); + notes.append("- Added `m!cooldowns`\n"); + notes.append("### v0.3\n"); + notes.append("- Added items for all ores `m!inventory`\n"); + notes.append("- Added pickaxe levels `m!pickaxe`\n"); + notes.append(" - Pickaxe can be upgraded, giving access to better ores (`m!pickaxe upgrade`)\n"); + notes.append("- Added enchanting `m!enchant`\n"); + notes.append(" - Your pickaxe can be enchanted by spending lapis and xp\n"); + notes.append(" - Owning bookshelves gives you a discount on the amount of levels it costs to enchant\n"); + notes.append("- Added crafting `m!craft`\n"); + notes.append(" - Enchanting table and books can now be crafted!\n"); + notes.append("- Fishing now drops books\n"); + notes.append("- Rob has been relaced with `m!kill`\n"); + notes.append(" - Killing a player will drop some of their items\n"); + notes.append("- Added obsidian\n"); + notes.append("- Removed `m!flip`, this will be added in a future update (with a new mechanic)\n"); + String v03 = notes.toString(); + + List<String> pages = List.of(v06, v05, v04, v03); + + PeelingUtils.pagesRaw(e.getChannel(), e.getAuthor(), pages); }); getCommandController().addCommand(CommandDetails.from("cooldowns,cd"), (e, b, args) -> { |
