From 6c5c20960b782d6b922d31859baca01132c63b9f Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Mon, 15 Oct 2018 17:07:01 -0500 Subject: [PATCH 1/5] Added messages when notifying the user they are entering spec. --- .../qol/listeners/CommandPreprocessListener.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java b/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java index e626b6f..05f4c47 100644 --- a/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java +++ b/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java @@ -52,20 +52,29 @@ public class CommandPreprocessListener implements Listener { DynmapAPI dynmap = (DynmapAPI) plugin.getDynmap(); // Spec dynmap hide - if (base.equals("spec") && sender.hasPermission("SafeSpectate.spectate") && dynmap != null) { + if (base.equals("spec") && sender.hasPermission("safespectate.spectate") && dynmap != null) { + String message; boolean visibleStatus; if (sender.getGameMode() != GameMode.SPECTATOR){ dynmapVisibleStatusMap.put(sender.getUniqueId(), dynmap.getPlayerVisbility(sender.getName())); visibleStatus = false; + + message = "You are now being hidden Dynmap."; + } else if (dynmapVisibleStatusMap.containsKey(sender.getUniqueId())){ visibleStatus = dynmapVisibleStatusMap.remove(sender.getUniqueId()); + + String status = ((visibleStatus) ? "shown" : "hidden"); + message = "Your " + status + " status has been restored on Dynmap."; } else { + message = "You are now visible on the Dynmap."; visibleStatus = true; } - dynmap.setPlayerVisiblity(sender.getDisplayName(), visibleStatus); + sender.spigot().sendMessage(new TextComponent(ChatColor.GREEN + message)); + dynmap.setPlayerVisiblity(sender.getName(), visibleStatus); } // Spec TP confirmation From 202141eba0dcaa7eb6aefaeabac293ff96b8962c Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Mon, 15 Oct 2018 18:10:18 -0500 Subject: [PATCH 2/5] Updated documentation --- docs/source/changelog/index.rst | 3 ++- docs/source/changelog/v1.4.rst | 19 +++++++++++++++++++ docs/source/commands.rst | 6 ++++++ docs/source/misc.rst | 3 +-- docs/source/permissions.rst | 6 +++++- pom.xml | 2 +- src/main/resources/plugin.yml | 2 +- 7 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 docs/source/changelog/v1.4.rst diff --git a/docs/source/changelog/index.rst b/docs/source/changelog/index.rst index d98b334..3323717 100644 --- a/docs/source/changelog/index.rst +++ b/docs/source/changelog/index.rst @@ -8,4 +8,5 @@ Changelogs .. toctree:: :maxdepth: 1 - v1.3 \ No newline at end of file + v1.3 + v1.4 \ No newline at end of file diff --git a/docs/source/changelog/v1.4.rst b/docs/source/changelog/v1.4.rst new file mode 100644 index 0000000..1876362 --- /dev/null +++ b/docs/source/changelog/v1.4.rst @@ -0,0 +1,19 @@ +.. include:: ../common.rst + +.. _qol_v1.4: + +QoL v1.4 +======== + +Additions +--------- +* `Death Mute Command`_ - ``/dm `` mutes death messages from a player until a sever restart. +* `24 Karat Trophy Command`_ ``/karattrophy `` awards the player the 24 Karat Trophy advancement. +* Spec-Dynmap Message - A message is now displayed when the user is hidden on Dynmap after using /spec. + +.. _Death Mute Command: https://git.etztech.xyz/Etzelia/QoL/issues/9 +.. _24 Karat Trophy Command: https://git.etztech.xyz/Etzelia/QoL/issues/16 + +Bug Fixes +--------- +None \ No newline at end of file diff --git a/docs/source/commands.rst b/docs/source/commands.rst index 3d4d86b..3f66da8 100644 --- a/docs/source/commands.rst +++ b/docs/source/commands.rst @@ -36,3 +36,9 @@ Alias ``/names`` and ``/name`` ``/whitelist `` - Turns Whitelist mode on or off. When in Whitelist mode, no one can connect unless they have the permission node. ``/timeout `` - Turns Timeout mode on or off. When in Timeout mode, no one can chat unless they have the permission node. + +``/karattrophy `` awards the player the 24 Karat Trophy Advancement. + +``/dm `` mutes death messages from a player until a sever restart. + + diff --git a/docs/source/misc.rst b/docs/source/misc.rst index be2d8dc..639ecc4 100644 --- a/docs/source/misc.rst +++ b/docs/source/misc.rst @@ -46,6 +46,5 @@ QoL provides a way to monitor your TPS and send an alert to a Discord webhook wh Auto Dynmap Hide ---------------- -If Dynmap is detected on the server, QoL will hide a user on the dynmap when they spec. When they come out of -spec, their previous visibility state will be restored. +If Dynmap is detected on the server, QoL will hide a user on the dynmap when they spec. When they come out of spec, their previous visibility state will be restored. diff --git a/docs/source/permissions.rst b/docs/source/permissions.rst index a97961a..e1452dc 100644 --- a/docs/source/permissions.rst +++ b/docs/source/permissions.rst @@ -36,4 +36,8 @@ Permissions ``qol.timeout.command`` - Ability to use the Timeout command -``qol.timeout.*`` - Wildcard permission for Timeout \ No newline at end of file +``qol.timeout.*`` - Wildcard permission for Timeout + +``qol.karattrophy`` - Ability to use the Karat Trophy Command + +``qol.shadowmute`` - Ability to use the Shadow Mute command \ No newline at end of file diff --git a/pom.xml b/pom.xml index 085cf1a..b28af2c 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ xyz.etztech QoL - 1.3 + 1.4 jar diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 1456734..9e95ebe 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -75,7 +75,7 @@ permissions: description: Ability to use the Death Mute command default: op qol.karattrophy: - description: to use the Karat Trophy Command + description: Ability to use the Karat Trophy Command default: op qol.auditable: description: Audits command usage From 3091fba5b43fd2d14c7f120cc43c3fa8504ae965 Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Mon, 15 Oct 2018 18:12:39 -0500 Subject: [PATCH 3/5] Added commit for spec dynmap message --- docs/source/changelog/v1.4.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/changelog/v1.4.rst b/docs/source/changelog/v1.4.rst index 1876362..f317295 100644 --- a/docs/source/changelog/v1.4.rst +++ b/docs/source/changelog/v1.4.rst @@ -9,10 +9,11 @@ Additions --------- * `Death Mute Command`_ - ``/dm `` mutes death messages from a player until a sever restart. * `24 Karat Trophy Command`_ ``/karattrophy `` awards the player the 24 Karat Trophy advancement. -* Spec-Dynmap Message - A message is now displayed when the user is hidden on Dynmap after using /spec. +* `Spec-Dynmap Message`_ - A message is now displayed when the user is hidden on Dynmap after using /spec. .. _Death Mute Command: https://git.etztech.xyz/Etzelia/QoL/issues/9 .. _24 Karat Trophy Command: https://git.etztech.xyz/Etzelia/QoL/issues/16 +.. _Spec-Dynmap Message`_: https://git.etztech.xyz/ZeroHD/QoL/commit/6c5c20960b782d6b922d31859baca01132c63b9f Bug Fixes --------- From 584b069c336864363ce039417127773ed1d5b345 Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Mon, 15 Oct 2018 18:16:06 -0500 Subject: [PATCH 4/5] Typo in death mute permissions documentation --- docs/source/permissions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/permissions.rst b/docs/source/permissions.rst index e1452dc..ab00d7c 100644 --- a/docs/source/permissions.rst +++ b/docs/source/permissions.rst @@ -40,4 +40,4 @@ Permissions ``qol.karattrophy`` - Ability to use the Karat Trophy Command -``qol.shadowmute`` - Ability to use the Shadow Mute command \ No newline at end of file +``qol.deathmute`` - Ability to use the Death Mute command \ No newline at end of file From 5c15eec17cd1a090a538a7a398fbde94e95d6670 Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Mon, 15 Oct 2018 21:32:13 -0500 Subject: [PATCH 5/5] Updated docs and changed spec dynmap hide perm to SafeSpectate.spectate --- docs/source/changelog/v1.4.rst | 2 +- docs/source/commands.rst | 2 +- .../xyz/etztech/qol/listeners/CommandPreprocessListener.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/changelog/v1.4.rst b/docs/source/changelog/v1.4.rst index f317295..77b5271 100644 --- a/docs/source/changelog/v1.4.rst +++ b/docs/source/changelog/v1.4.rst @@ -7,7 +7,7 @@ QoL v1.4 Additions --------- -* `Death Mute Command`_ - ``/dm `` mutes death messages from a player until a sever restart. +* `Death Mute Command`_ - ``/deathmute `` mutes death messages from a player until a sever restart. * `24 Karat Trophy Command`_ ``/karattrophy `` awards the player the 24 Karat Trophy advancement. * `Spec-Dynmap Message`_ - A message is now displayed when the user is hidden on Dynmap after using /spec. diff --git a/docs/source/commands.rst b/docs/source/commands.rst index 3f66da8..6654170 100644 --- a/docs/source/commands.rst +++ b/docs/source/commands.rst @@ -39,6 +39,6 @@ Alias ``/names`` and ``/name`` ``/karattrophy `` awards the player the 24 Karat Trophy Advancement. -``/dm `` mutes death messages from a player until a sever restart. +``/deathmute `` mutes death messages from a player until a sever restart. diff --git a/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java b/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java index 05f4c47..7cc97bd 100644 --- a/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java +++ b/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java @@ -52,7 +52,7 @@ public class CommandPreprocessListener implements Listener { DynmapAPI dynmap = (DynmapAPI) plugin.getDynmap(); // Spec dynmap hide - if (base.equals("spec") && sender.hasPermission("safespectate.spectate") && dynmap != null) { + if (base.equals("spec") && sender.hasPermission("SafeSpectate.spectate") && dynmap != null) { String message; boolean visibleStatus; if (sender.getGameMode() != GameMode.SPECTATOR){