From 8d0e30cfa3d0b911de7d869092f245a2b8a401a8 Mon Sep 17 00:00:00 2001 From: Etzelia Date: Thu, 3 Oct 2019 23:23:52 +0200 Subject: [PATCH] Ignore self when using checkup (#38) --- docs/source/changelog/index.rst | 3 ++- docs/source/changelog/v1.7.rst | 3 ++- docs/source/changelog/v1.8.rst | 24 +++++++++++++++++++ docs/source/commands.rst | 2 ++ docs/source/permissions.rst | 8 +++++-- pom.xml | 2 +- .../etztech/qol/commands/CheckupCommand.java | 2 +- 7 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 docs/source/changelog/v1.8.rst diff --git a/docs/source/changelog/index.rst b/docs/source/changelog/index.rst index 7dcbf07..b5b0006 100644 --- a/docs/source/changelog/index.rst +++ b/docs/source/changelog/index.rst @@ -12,4 +12,5 @@ Changelogs v1.4 v1.5 v1.6 - v1.7 \ No newline at end of file + v1.7 + v1.8 \ No newline at end of file diff --git a/docs/source/changelog/v1.7.rst b/docs/source/changelog/v1.7.rst index 2999a3a..2fbb389 100644 --- a/docs/source/changelog/v1.7.rst +++ b/docs/source/changelog/v1.7.rst @@ -12,4 +12,5 @@ Additions .. _World View Distance Overrides: https://git.etztech.xyz/24CarrotCraft/QoL/commit/81a2fb3fa0e16ebbd4363074b17447be1d5b950e Bug Fixes ---------- \ No newline at end of file +--------- +None \ No newline at end of file diff --git a/docs/source/changelog/v1.8.rst b/docs/source/changelog/v1.8.rst new file mode 100644 index 0000000..4aa1f0a --- /dev/null +++ b/docs/source/changelog/v1.8.rst @@ -0,0 +1,24 @@ +.. include:: ../common.rst + +.. _qol_v1.8: + +QoL v1.8 +======== + +Additions +--------- +* `Checkup Command`_ - Allows a user to start a checkup, teleporting to each online player +* `Discord Syntax`_ - Allows a user to use Discord (markdown) syntax for chat formatting + +``_italic_`` |br| +``*italic*`` |br| +``__underline__`` |br| +``**bold**`` |br| +``~~strikethrough~~`` + +.. _Checkup Command: https://git.etztech.xyz/24CarrotCraft/QoL/pulls/33 +.. _Discord Syntax: https://git.etztech.xyz/24CarrotCraft/QoL/pulls/36 + +Bug Fixes +--------- +None \ No newline at end of file diff --git a/docs/source/commands.rst b/docs/source/commands.rst index 0d3659e..b3210e3 100644 --- a/docs/source/commands.rst +++ b/docs/source/commands.rst @@ -41,4 +41,6 @@ Alias ``/names`` and ``/name`` ``/deathmute `` toggles death messages on or off for a player. +``/checkup `` Start a checkup, teleporting to all online players. + diff --git a/docs/source/permissions.rst b/docs/source/permissions.rst index e0ea706..9755d33 100644 --- a/docs/source/permissions.rst +++ b/docs/source/permissions.rst @@ -38,8 +38,12 @@ Permissions ``qol.timeout.*`` - Wildcard permission for Timeout -``qol.karattrophy`` - Ability to use the Karat Trophy Command +``qol.karattrophy`` - Ability to use the Karat Trophy command ``qol.deathmute`` - Ability to use the Death Mute command -``qol.griefalert`` - Receive GriefAlert alerts \ No newline at end of file +``qol.griefalert`` - Receive GriefAlert alerts + +``qol.checkup`` - Ability to use the Checkup command + +``qol.discord`` - Use Discord (markdown) syntax for chat formatting \ No newline at end of file diff --git a/pom.xml b/pom.xml index bb3fd08..6af587b 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ xyz.etztech QoL - 1.7 + 1.8 jar diff --git a/src/main/java/xyz/etztech/qol/commands/CheckupCommand.java b/src/main/java/xyz/etztech/qol/commands/CheckupCommand.java index 2413d9e..aa2e38d 100644 --- a/src/main/java/xyz/etztech/qol/commands/CheckupCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/CheckupCommand.java @@ -107,7 +107,7 @@ public class CheckupCommand implements CommandExecutor { while (checkup.hasNext()) { // Loop until next player is online next = checkup.next(); - if (next.isOnline()) { + if (next.isOnline() && player.getUniqueId() != next.getUniqueId()) { player.teleport(next.getLocation()); EtzTechUtil.sms(player, ChatColor.GREEN + "You are now checking on " + ChatColor.YELLOW + next.getName()); checkups.put(player.getUniqueId(), checkup);