From ac40bdb7e9b257bc4f98db6112bbd0f15c998aa2 Mon Sep 17 00:00:00 2001 From: dinkley Date: Wed, 10 Apr 2024 00:24:13 +0100 Subject: [PATCH 1/3] Create README.md Add README which reflects the mod's purpose, and links to download it since binaries aren't being shared as releases in the repo. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..57e925c --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +Prometheus is a utility mod, granting users access to useful commands and quick utilities, and providing server owners with great control over player permissions, warps and even custom command scripts. + +### Download: + #### [Modrinth](https://modrinth.com/mod/prometheus) + #### [CurseForge](https://www.curseforge.com/minecraft/mc-mods/prometheus) From c34053b9bda5504d879eaa020882c27f08fb2e0a Mon Sep 17 00:00:00 2001 From: dinkley Date: Wed, 10 Apr 2024 00:30:37 +0100 Subject: [PATCH 2/3] Update README.md Add documentation link --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 57e925c..37c8436 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ Prometheus is a utility mod, granting users access to useful commands and quick utilities, and providing server owners with great control over player permissions, warps and even custom command scripts. +#### [Documentation](https://docs.terrarium.earth/docs/prometheus/intro) ### Download: #### [Modrinth](https://modrinth.com/mod/prometheus) #### [CurseForge](https://www.curseforge.com/minecraft/mc-mods/prometheus) + From 39d41147e4b670036f830167af4219b3f1145cf9 Mon Sep 17 00:00:00 2001 From: Dinkley Date: Fri, 12 Apr 2024 06:42:08 +0100 Subject: [PATCH 3/3] Add confirmation messages to home and warp commands --- .../prometheus/common/commands/admin/WarpCommand.java | 10 ++++++++-- .../common/commands/utilities/HomeCommand.java | 10 ++++++++-- .../main/resources/assets/prometheus/lang/en_us.json | 4 ++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/earth/terrarium/prometheus/common/commands/admin/WarpCommand.java b/common/src/main/java/earth/terrarium/prometheus/common/commands/admin/WarpCommand.java index 77c9891..71bc350 100644 --- a/common/src/main/java/earth/terrarium/prometheus/common/commands/admin/WarpCommand.java +++ b/common/src/main/java/earth/terrarium/prometheus/common/commands/admin/WarpCommand.java @@ -55,7 +55,10 @@ private static LiteralArgumentBuilder add() { .requires(source -> source.hasPermission(2)) .then(Commands.argument("name", StringArgumentType.greedyString()) .executes(context -> { - WarpHandler.add(context.getSource().getPlayerOrException(), StringArgumentType.getString(context, "name")); + ServerPlayer player = context.getSource().getPlayerOrException(); + String warpName = StringArgumentType.getString(context, "name"); + WarpHandler.add(player, warpName); + player.sendSystemMessage(CommonUtils.serverTranslatable("prometheus.locations.warp.created", warpName)); return 1; }) @@ -68,7 +71,10 @@ private static LiteralArgumentBuilder remove() { .then(Commands.argument("name", StringArgumentType.greedyString()) .suggests(SUGGESTION_PROVIDER) .executes(context -> { - WarpHandler.remove(context.getSource().getPlayerOrException(), StringArgumentType.getString(context, "name")); + ServerPlayer player = context.getSource().getPlayerOrException(); + String warpName = StringArgumentType.getString(context, "name"); + WarpHandler.remove(player, warpName); + player.sendSystemMessage(CommonUtils.serverTranslatable("prometheus.locations.warp.removed", warpName)); return 1; }) ); diff --git a/common/src/main/java/earth/terrarium/prometheus/common/commands/utilities/HomeCommand.java b/common/src/main/java/earth/terrarium/prometheus/common/commands/utilities/HomeCommand.java index ffaac85..3c29c42 100644 --- a/common/src/main/java/earth/terrarium/prometheus/common/commands/utilities/HomeCommand.java +++ b/common/src/main/java/earth/terrarium/prometheus/common/commands/utilities/HomeCommand.java @@ -60,7 +60,10 @@ private static LiteralArgumentBuilder add() { return Commands.literal("sethome") .then(Commands.argument("name", StringArgumentType.greedyString()) .executes(context -> { - HomeHandler.add(context.getSource().getPlayerOrException(), StringArgumentType.getString(context, "name")); + ServerPlayer player = context.getSource().getPlayerOrException(); + String homeName = StringArgumentType.getString(context, "name"); + HomeHandler.add(player, homeName); + player.sendSystemMessage(CommonUtils.serverTranslatable("prometheus.locations.home.created", homeName)); return 1; }) @@ -72,7 +75,10 @@ private static LiteralArgumentBuilder remove() { .then(Commands.argument("name", StringArgumentType.greedyString()) .suggests(SUGGEST_HOMES) .executes(context -> { - HomeHandler.remove(context.getSource().getPlayerOrException(), StringArgumentType.getString(context, "name")); + ServerPlayer player = context.getSource().getPlayerOrException(); + String homeName = StringArgumentType.getString(context, "name"); + HomeHandler.remove(player, homeName); + player.sendSystemMessage(CommonUtils.serverTranslatable("prometheus.locations.home.removed", homeName)); return 1; }) diff --git a/common/src/main/resources/assets/prometheus/lang/en_us.json b/common/src/main/resources/assets/prometheus/lang/en_us.json index 17e296c..7ae21e3 100644 --- a/common/src/main/resources/assets/prometheus/lang/en_us.json +++ b/common/src/main/resources/assets/prometheus/lang/en_us.json @@ -44,12 +44,16 @@ "prometheus.locations.home": "Homes", "prometheus.locations.home.command": "Homes:", "prometheus.locations.home.add": "Add a Home", + "prometheus.locations.home.created": "Home '%s' added.", + "prometheus.locations.home.removed": "Home '%s' removed.", "prometheus.locations.home.to": "Click to teleport to %s", "prometheus.locations.warp": "Warps", "prometheus.locations.warp.command": "Warps:", "prometheus.warps.error.warp_already_exists": "Warp already exists.", "prometheus.warps.error.warp_does_not_exist": "Warp does not exist.", "prometheus.warps.error.no_warps": "There are no warps.", + "prometheus.locations.warp.created": "Warp '%s' added.", + "prometheus.locations.warp.removed": "Warp '%s' removed.", "prometheus.locations.warp.add": "Add a Warp", "prometheus.locations.warp.to": "Click to warp to %s", "prometheus.locations.add": "Add New Location:",