From 4b161f23f43697189579c32a49ea469ff20a2e20 Mon Sep 17 00:00:00 2001 From: YTG1234 <54103478+YTG1234@users.noreply.github.com> Date: Fri, 6 Nov 2020 14:07:44 +0200 Subject: [PATCH 01/19] Some cursed code, didn't test this yet --- .../kotlin/me/gserv/fabrikommander/Common.kt | 3 ++ .../fabrikommander/commands/SetHomeCommand.kt | 1 - .../fabrikommander/commands/TpaCommand.kt | 25 ++++++++++ .../gserv/fabrikommander/data/TpaRequest.kt | 47 +++++++++++++++++++ .../me/gserv/fabrikommander/utils/Text.kt | 2 +- 5 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt create mode 100644 src/main/kotlin/me/gserv/fabrikommander/data/TpaRequest.kt diff --git a/src/main/kotlin/me/gserv/fabrikommander/Common.kt b/src/main/kotlin/me/gserv/fabrikommander/Common.kt index 7fd641f..e71b949 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/Common.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/Common.kt @@ -27,6 +27,9 @@ object Common : ModInitializer { HomesCommand(dispatcher).register() SetHomeCommand(dispatcher).register() + // Teleport commands + TpaCommand(dispatcher).register() + // Misc comands PingCommand(dispatcher).register() } diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/SetHomeCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/SetHomeCommand.kt index 1ff3252..846fbf0 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/SetHomeCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/SetHomeCommand.kt @@ -5,7 +5,6 @@ import me.gserv.fabrikommander.data.PlayerDataManager import me.gserv.fabrikommander.data.spec.Home import me.gserv.fabrikommander.utils.* import net.minecraft.server.command.CommandManager -import net.minecraft.text.LiteralText class SetHomeCommand(val dispatcher: Dispatcher) { fun register() { diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt new file mode 100644 index 0000000..c6e3bc5 --- /dev/null +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt @@ -0,0 +1,25 @@ +package me.gserv.fabrikommander.commands + +import me.gserv.fabrikommander.data.TpaRequest +import me.gserv.fabrikommander.utils.Context +import me.gserv.fabrikommander.utils.Dispatcher +import net.minecraft.command.argument.EntityArgumentType +import net.minecraft.server.command.CommandManager.* + +class TpaCommand(val dispatcher: Dispatcher) { + fun register() { + dispatcher.register( + literal("tpa").then( + argument("target", EntityArgumentType.player()).executes(this::tpaCommand) + ) + ) + } + + fun tpaCommand(context: Context): Int { + val target = EntityArgumentType.getPlayer(context, "target") + val source = context.source.player + val request = TpaRequest(source = source, target = target, tpaHere = false) + request.notifyTarget() + return 1 + } +} diff --git a/src/main/kotlin/me/gserv/fabrikommander/data/TpaRequest.kt b/src/main/kotlin/me/gserv/fabrikommander/data/TpaRequest.kt new file mode 100644 index 0000000..416f2f8 --- /dev/null +++ b/src/main/kotlin/me/gserv/fabrikommander/data/TpaRequest.kt @@ -0,0 +1,47 @@ +package me.gserv.fabrikommander.data + +import me.gserv.fabrikommander.utils.* +import net.minecraft.server.network.ServerPlayerEntity +import net.minecraft.text.ClickEvent +import net.minecraft.text.HoverEvent +import net.minecraft.text.MutableText +import net.minecraft.util.Util + +class TpaRequest( + val source: ServerPlayerEntity, + val target: ServerPlayerEntity, + val availableForTicks: Int = 6000, + val tpaHere: Boolean +) { + fun apply() { + if (tpaHere) target.teleport(source.serverWorld, source.x, source.y, source.z, source.yaw, source.pitch) + source.teleport(target.serverWorld, target.x, target.y, target.z, target.yaw, target.pitch) + } + + fun notifyTarget() { + // Message will be configurable later + val message = click( + hover( + aqua(source.displayName as MutableText) + yellow( + "has requested" + when (tpaHere) { + true -> "you" + false -> "to" + } + "teleport to" + when (tpaHere) { // Will change to one when later, for now it's two + true -> "them" + false -> "you" + } + "." + ), + HoverEvent( + HoverEvent.Action.SHOW_TEXT, + yellow("Click to teleport!") + ) + ), + ClickEvent( + ClickEvent.Action.RUN_COMMAND, + "/tpaccept " + source.name // Command not implemented yet + ) + ) + + target.sendSystemMessage(message, Util.NIL_UUID) + } +} diff --git a/src/main/kotlin/me/gserv/fabrikommander/utils/Text.kt b/src/main/kotlin/me/gserv/fabrikommander/utils/Text.kt index b7839e8..ecaa1d6 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/utils/Text.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/utils/Text.kt @@ -60,5 +60,5 @@ fun hover(text: MutableText, event: HoverEvent) = text.setStyle(text.style.withH // endregion // region: Operators -operator fun MutableText.plus(other: MutableText): MutableText = this.append(other) +operator fun MutableText.plus(other: Text): MutableText = this.append(other) // endregion From 0d86457b4d5a5d0a0c1cc10033e5b579e72c8acc Mon Sep 17 00:00:00 2001 From: YTG1234 <54103478+YTG1234@users.noreply.github.com> Date: Fri, 6 Nov 2020 14:32:58 +0200 Subject: [PATCH 02/19] Cleaned up message, added /tpahere --- .../fabrikommander/commands/TpaCommand.kt | 19 +++++++++++++++---- .../gserv/fabrikommander/data/TpaRequest.kt | 8 ++++---- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt index c6e3bc5..8a62d0f 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt @@ -4,21 +4,32 @@ import me.gserv.fabrikommander.data.TpaRequest import me.gserv.fabrikommander.utils.Context import me.gserv.fabrikommander.utils.Dispatcher import net.minecraft.command.argument.EntityArgumentType -import net.minecraft.server.command.CommandManager.* +import net.minecraft.server.command.CommandManager.argument +import net.minecraft.server.command.CommandManager.literal class TpaCommand(val dispatcher: Dispatcher) { fun register() { dispatcher.register( literal("tpa").then( - argument("target", EntityArgumentType.player()).executes(this::tpaCommand) + argument("target", EntityArgumentType.player()).executes { + tpaCommand(it, false) + } + ) + ) + + dispatcher.register( + literal("tpahere").then( + argument("target", EntityArgumentType.player()).executes { + tpaCommand(it, true) + } ) ) } - fun tpaCommand(context: Context): Int { + fun tpaCommand(context: Context, tpaHere: Boolean): Int { val target = EntityArgumentType.getPlayer(context, "target") val source = context.source.player - val request = TpaRequest(source = source, target = target, tpaHere = false) + val request = TpaRequest(source = source, target = target, tpaHere = tpaHere) request.notifyTarget() return 1 } diff --git a/src/main/kotlin/me/gserv/fabrikommander/data/TpaRequest.kt b/src/main/kotlin/me/gserv/fabrikommander/data/TpaRequest.kt index 416f2f8..3a70c22 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/data/TpaRequest.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/data/TpaRequest.kt @@ -22,11 +22,11 @@ class TpaRequest( // Message will be configurable later val message = click( hover( - aqua(source.displayName as MutableText) + yellow( - "has requested" + when (tpaHere) { + source.displayName as MutableText + yellow( + " has requested " + when (tpaHere) { true -> "you" false -> "to" - } + "teleport to" + when (tpaHere) { // Will change to one when later, for now it's two + } + " teleport to " + when (tpaHere) { // Will change to one when later, for now it's two true -> "them" false -> "you" } + "." @@ -38,7 +38,7 @@ class TpaRequest( ), ClickEvent( ClickEvent.Action.RUN_COMMAND, - "/tpaccept " + source.name // Command not implemented yet + "/tpaccept " + source.uuidAsString // Command not implemented yet ) ) From 52ba230ba09257d7dd58a40c8d3400410f9d5cc1 Mon Sep 17 00:00:00 2001 From: YTG1234 <54103478+YTG1234@users.noreply.github.com> Date: Fri, 6 Nov 2020 14:55:30 +0200 Subject: [PATCH 03/19] Implement requested changes --- .../kotlin/me/gserv/fabrikommander/Common.kt | 1 + .../fabrikommander/commands/TpaCommand.kt | 16 ++----- .../fabrikommander/commands/TpaHereCommand.kt | 26 ++++++++++ .../gserv/fabrikommander/data/TpaRequest.kt | 47 ++++++++++++------- 4 files changed, 60 insertions(+), 30 deletions(-) create mode 100644 src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt diff --git a/src/main/kotlin/me/gserv/fabrikommander/Common.kt b/src/main/kotlin/me/gserv/fabrikommander/Common.kt index e71b949..d0fc6ad 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/Common.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/Common.kt @@ -29,6 +29,7 @@ object Common : ModInitializer { // Teleport commands TpaCommand(dispatcher).register() + TpaHereCommand(dispatcher).register() // Misc comands PingCommand(dispatcher).register() diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt index 8a62d0f..121a1c3 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt @@ -11,25 +11,15 @@ class TpaCommand(val dispatcher: Dispatcher) { fun register() { dispatcher.register( literal("tpa").then( - argument("target", EntityArgumentType.player()).executes { - tpaCommand(it, false) - } - ) - ) - - dispatcher.register( - literal("tpahere").then( - argument("target", EntityArgumentType.player()).executes { - tpaCommand(it, true) - } + argument("target", EntityArgumentType.player()).executes(this::tpaCommand) ) ) } - fun tpaCommand(context: Context, tpaHere: Boolean): Int { + fun tpaCommand(context: Context): Int { val target = EntityArgumentType.getPlayer(context, "target") val source = context.source.player - val request = TpaRequest(source = source, target = target, tpaHere = tpaHere) + val request = TpaRequest(source = source, target = target, tpaHere = false) request.notifyTarget() return 1 } diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt new file mode 100644 index 0000000..1d63fb7 --- /dev/null +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt @@ -0,0 +1,26 @@ +package me.gserv.fabrikommander.commands + +import me.gserv.fabrikommander.data.TpaRequest +import me.gserv.fabrikommander.utils.Context +import me.gserv.fabrikommander.utils.Dispatcher +import net.minecraft.command.argument.EntityArgumentType +import net.minecraft.server.command.CommandManager.argument +import net.minecraft.server.command.CommandManager.literal + +class TpaHereCommand(val dispatcher: Dispatcher) { + fun register() { + dispatcher.register( + literal("tpahere").then( + argument("target", EntityArgumentType.player()).executes(this::tpaHereCommand) + ) + ) + } + + fun tpaHereCommand(context: Context): Int { + val target = EntityArgumentType.getPlayer(context, "target") + val source = context.source.player + val request = TpaRequest(source = source, target = target, tpaHere = true) + request.notifyTarget() + return 1 + } +} diff --git a/src/main/kotlin/me/gserv/fabrikommander/data/TpaRequest.kt b/src/main/kotlin/me/gserv/fabrikommander/data/TpaRequest.kt index 3a70c22..35eb413 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/data/TpaRequest.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/data/TpaRequest.kt @@ -20,27 +20,40 @@ class TpaRequest( fun notifyTarget() { // Message will be configurable later - val message = click( - hover( - source.displayName as MutableText + yellow( - " has requested " + when (tpaHere) { - true -> "you" - false -> "to" - } + " teleport to " + when (tpaHere) { // Will change to one when later, for now it's two - true -> "them" - false -> "you" - } + "." + val message = + source.displayName as MutableText + yellow( + " has requested " + when (tpaHere) { + true -> "you" + false -> "to" + } + " teleport to " + when (tpaHere) { // Will change to one when later, for now it's two + true -> "them" + false -> "you" + } + ) + reset(". [") + click( + hover( + aqua("Accept"), + HoverEvent( + HoverEvent.Action.SHOW_TEXT, + green("Click here to accept the request.") + ) + ), + ClickEvent( + ClickEvent.Action.RUN_COMMAND, + "/tpaccept " + source.uuidAsString // There can be multiple active requests + ) + ) + reset(" / ") + hover( + click( + aqua("Deny"), + ClickEvent( + ClickEvent.Action.RUN_COMMAND, + "/tpdeny " + source.uuidAsString // There can be multiple active requests + ) ), HoverEvent( HoverEvent.Action.SHOW_TEXT, - yellow("Click to teleport!") + red("Click here to deny the request.") ) - ), - ClickEvent( - ClickEvent.Action.RUN_COMMAND, - "/tpaccept " + source.uuidAsString // Command not implemented yet - ) - ) + ) + reset("]") target.sendSystemMessage(message, Util.NIL_UUID) } From 5d3731029c3a70394ca929501e41c532cd36b278 Mon Sep 17 00:00:00 2001 From: YTG123 <54103478+YTG1234@users.noreply.github.com> Date: Sat, 7 Nov 2020 14:57:57 +0200 Subject: [PATCH 04/19] I'm surprised this actually works --- .../kotlin/me/gserv/fabrikommander/Common.kt | 1 + .../fabrikommander/commands/TpaCommand.kt | 4 +-- .../fabrikommander/commands/TpaHereCommand.kt | 4 +-- .../commands/TpacceptCommand.kt | 34 ++++++++++++++++++ .../{TpaRequest.kt => TeleportRequest.kt} | 35 ++++++++++++++----- 5 files changed, 65 insertions(+), 13 deletions(-) create mode 100644 src/main/kotlin/me/gserv/fabrikommander/commands/TpacceptCommand.kt rename src/main/kotlin/me/gserv/fabrikommander/data/{TpaRequest.kt => TeleportRequest.kt} (57%) diff --git a/src/main/kotlin/me/gserv/fabrikommander/Common.kt b/src/main/kotlin/me/gserv/fabrikommander/Common.kt index d0fc6ad..a9d6c4f 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/Common.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/Common.kt @@ -30,6 +30,7 @@ object Common : ModInitializer { // Teleport commands TpaCommand(dispatcher).register() TpaHereCommand(dispatcher).register() + TpacceptCommand(dispatcher).register() // Misc comands PingCommand(dispatcher).register() diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt index 121a1c3..7bf5720 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt @@ -1,6 +1,6 @@ package me.gserv.fabrikommander.commands -import me.gserv.fabrikommander.data.TpaRequest +import me.gserv.fabrikommander.data.TeleportRequest import me.gserv.fabrikommander.utils.Context import me.gserv.fabrikommander.utils.Dispatcher import net.minecraft.command.argument.EntityArgumentType @@ -19,7 +19,7 @@ class TpaCommand(val dispatcher: Dispatcher) { fun tpaCommand(context: Context): Int { val target = EntityArgumentType.getPlayer(context, "target") val source = context.source.player - val request = TpaRequest(source = source, target = target, tpaHere = false) + val request = TeleportRequest(source = source, target = target, inverted = false) request.notifyTarget() return 1 } diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt index 1d63fb7..bb31146 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt @@ -1,6 +1,6 @@ package me.gserv.fabrikommander.commands -import me.gserv.fabrikommander.data.TpaRequest +import me.gserv.fabrikommander.data.TeleportRequest import me.gserv.fabrikommander.utils.Context import me.gserv.fabrikommander.utils.Dispatcher import net.minecraft.command.argument.EntityArgumentType @@ -19,7 +19,7 @@ class TpaHereCommand(val dispatcher: Dispatcher) { fun tpaHereCommand(context: Context): Int { val target = EntityArgumentType.getPlayer(context, "target") val source = context.source.player - val request = TpaRequest(source = source, target = target, tpaHere = true) + val request = TeleportRequest(source = source, target = target, inverted = true) request.notifyTarget() return 1 } diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpacceptCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpacceptCommand.kt new file mode 100644 index 0000000..6e24cc0 --- /dev/null +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpacceptCommand.kt @@ -0,0 +1,34 @@ +package me.gserv.fabrikommander.commands + +import me.gserv.fabrikommander.data.TeleportRequest +import me.gserv.fabrikommander.utils.Context +import me.gserv.fabrikommander.utils.Dispatcher +import me.gserv.fabrikommander.utils.plus +import me.gserv.fabrikommander.utils.red +import net.minecraft.command.argument.EntityArgumentType +import net.minecraft.server.command.CommandManager.argument +import net.minecraft.server.command.CommandManager.literal + +// I'm not sure how I should capitalise this +class TpacceptCommand(val dispatcher: Dispatcher) { + fun register() { + dispatcher.register( + literal("tpaccept").then( + argument("source", EntityArgumentType.player()).executes(this::tpacceptCommand) + ) + ) + } + + fun tpacceptCommand(context: Context): Int { + val source = EntityArgumentType.getPlayer(context, "source") + if (TeleportRequest.ACTIVE_REQUESTS[source.uuidAsString + context.source.player.uuidAsString] == null) { + context.source.sendError( + red("No active teleport request from ") + source.displayName + ) + return 0 + } + TeleportRequest.ACTIVE_REQUESTS[source.uuidAsString + context.source.player.uuidAsString]!!.apply() + TeleportRequest.ACTIVE_REQUESTS.remove(source.uuidAsString + context.source.player.uuidAsString) + return 1 + } +} diff --git a/src/main/kotlin/me/gserv/fabrikommander/data/TpaRequest.kt b/src/main/kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt similarity index 57% rename from src/main/kotlin/me/gserv/fabrikommander/data/TpaRequest.kt rename to src/main/kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt index 35eb413..1449e3a 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/data/TpaRequest.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt @@ -1,20 +1,37 @@ package me.gserv.fabrikommander.data -import me.gserv.fabrikommander.utils.* +import me.gserv.fabrikommander.utils.aqua +import me.gserv.fabrikommander.utils.click +import me.gserv.fabrikommander.utils.green +import me.gserv.fabrikommander.utils.hover +import me.gserv.fabrikommander.utils.plus +import me.gserv.fabrikommander.utils.red +import me.gserv.fabrikommander.utils.reset +import me.gserv.fabrikommander.utils.yellow import net.minecraft.server.network.ServerPlayerEntity import net.minecraft.text.ClickEvent import net.minecraft.text.HoverEvent import net.minecraft.text.MutableText import net.minecraft.util.Util -class TpaRequest( +class TeleportRequest( val source: ServerPlayerEntity, val target: ServerPlayerEntity, - val availableForTicks: Int = 6000, - val tpaHere: Boolean + val inverted: Boolean ) { + companion object { + @JvmStatic + val ACTIVE_REQUESTS = hashMapOf() + } + + init { + // I should come up with a better system but I want to make sure that there can't be two teleport requests with the same source and target. + val id = source.uuidAsString + target.uuidAsString + ACTIVE_REQUESTS[id] = this + } + fun apply() { - if (tpaHere) target.teleport(source.serverWorld, source.x, source.y, source.z, source.yaw, source.pitch) + if (inverted) target.teleport(source.serverWorld, source.x, source.y, source.z, source.yaw, source.pitch) source.teleport(target.serverWorld, target.x, target.y, target.z, target.yaw, target.pitch) } @@ -22,10 +39,10 @@ class TpaRequest( // Message will be configurable later val message = source.displayName as MutableText + yellow( - " has requested " + when (tpaHere) { + " has requested " + when (inverted) { true -> "you" false -> "to" - } + " teleport to " + when (tpaHere) { // Will change to one when later, for now it's two + } + " teleport to " + when (inverted) { // Will change to one when later, for now it's two true -> "them" false -> "you" } @@ -39,14 +56,14 @@ class TpaRequest( ), ClickEvent( ClickEvent.Action.RUN_COMMAND, - "/tpaccept " + source.uuidAsString // There can be multiple active requests + "/tpaccept " + source.entityName // There can be multiple active requests ) ) + reset(" / ") + hover( click( aqua("Deny"), ClickEvent( ClickEvent.Action.RUN_COMMAND, - "/tpdeny " + source.uuidAsString // There can be multiple active requests + "/tpdeny " + source.entityName // There can be multiple active requests ) ), HoverEvent( From 08d901016498e9cb43a6de7fa15cc84b51d376c1 Mon Sep 17 00:00:00 2001 From: YTG123 <54103478+YTG1234@users.noreply.github.com> Date: Sat, 7 Nov 2020 15:02:36 +0200 Subject: [PATCH 05/19] Fixed a minor error --- src/main/kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt b/src/main/kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt index 1449e3a..fd82ecb 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt @@ -38,7 +38,7 @@ class TeleportRequest( fun notifyTarget() { // Message will be configurable later val message = - source.displayName as MutableText + yellow( + reset("") + source.displayName as MutableText + yellow( // reset("") used to make the vanilla click event for player names not apply to the whole message " has requested " + when (inverted) { true -> "you" false -> "to" From 934f944ee81a5c1ff9419dc283c216cbf603985e Mon Sep 17 00:00:00 2001 From: YTG123 <54103478+YTG1234@users.noreply.github.com> Date: Sat, 7 Nov 2020 15:50:19 +0200 Subject: [PATCH 06/19] Implement cancelling and denying --- .../kotlin/me/gserv/fabrikommander/Common.kt | 4 +- ...{TpacceptCommand.kt => TpAcceptCommand.kt} | 6 +-- .../commands/TpCancelCommand.kt | 36 ++++++++++++++++++ .../fabrikommander/commands/TpDenyCommand.kt | 37 +++++++++++++++++++ 4 files changed, 79 insertions(+), 4 deletions(-) rename src/main/kotlin/me/gserv/fabrikommander/commands/{TpacceptCommand.kt => TpAcceptCommand.kt} (90%) create mode 100644 src/main/kotlin/me/gserv/fabrikommander/commands/TpCancelCommand.kt create mode 100644 src/main/kotlin/me/gserv/fabrikommander/commands/TpDenyCommand.kt diff --git a/src/main/kotlin/me/gserv/fabrikommander/Common.kt b/src/main/kotlin/me/gserv/fabrikommander/Common.kt index a9d6c4f..a41f336 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/Common.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/Common.kt @@ -30,7 +30,9 @@ object Common : ModInitializer { // Teleport commands TpaCommand(dispatcher).register() TpaHereCommand(dispatcher).register() - TpacceptCommand(dispatcher).register() + TpAcceptCommand(dispatcher).register() + TpCancelCommand(dispatcher).register() + TpDenyCommand(dispatcher).register() // Misc comands PingCommand(dispatcher).register() diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpacceptCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpAcceptCommand.kt similarity index 90% rename from src/main/kotlin/me/gserv/fabrikommander/commands/TpacceptCommand.kt rename to src/main/kotlin/me/gserv/fabrikommander/commands/TpAcceptCommand.kt index 6e24cc0..4c6d6a6 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/TpacceptCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpAcceptCommand.kt @@ -10,16 +10,16 @@ import net.minecraft.server.command.CommandManager.argument import net.minecraft.server.command.CommandManager.literal // I'm not sure how I should capitalise this -class TpacceptCommand(val dispatcher: Dispatcher) { +class TpAcceptCommand(val dispatcher: Dispatcher) { fun register() { dispatcher.register( literal("tpaccept").then( - argument("source", EntityArgumentType.player()).executes(this::tpacceptCommand) + argument("source", EntityArgumentType.player()).executes(this::tpAcceptCommand) ) ) } - fun tpacceptCommand(context: Context): Int { + fun tpAcceptCommand(context: Context): Int { val source = EntityArgumentType.getPlayer(context, "source") if (TeleportRequest.ACTIVE_REQUESTS[source.uuidAsString + context.source.player.uuidAsString] == null) { context.source.sendError( diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpCancelCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpCancelCommand.kt new file mode 100644 index 0000000..4e26eef --- /dev/null +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpCancelCommand.kt @@ -0,0 +1,36 @@ +package me.gserv.fabrikommander.commands + +import me.gserv.fabrikommander.data.TeleportRequest +import me.gserv.fabrikommander.utils.Context +import me.gserv.fabrikommander.utils.Dispatcher +import me.gserv.fabrikommander.utils.aqua +import me.gserv.fabrikommander.utils.plus +import me.gserv.fabrikommander.utils.red +import net.minecraft.command.argument.EntityArgumentType +import net.minecraft.server.command.CommandManager.argument +import net.minecraft.server.command.CommandManager.literal + +class TpCancelCommand(val dispatcher: Dispatcher) { + fun register() { + dispatcher.register( + literal("tpcancel").then( + argument("target", EntityArgumentType.player()).executes(this::tpCancelCommand) + ) + ) + } + + fun tpCancelCommand(context: Context): Int { + val target = EntityArgumentType.getPlayer(context, "target") + if (TeleportRequest.ACTIVE_REQUESTS[context.source.player.uuidAsString + target.uuidAsString] == null) { + context.source.sendError( + red("No active teleport request to ") + target.displayName + ) + return 0 + } + TeleportRequest.ACTIVE_REQUESTS.remove(context.source.player.uuidAsString + target.uuidAsString) + context.source.sendFeedback(aqua( + "Teleport request to " + ) + target.displayName + aqua(" was cancelled."), true) + return 1 + } +} diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpDenyCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpDenyCommand.kt new file mode 100644 index 0000000..90c6729 --- /dev/null +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpDenyCommand.kt @@ -0,0 +1,37 @@ +package me.gserv.fabrikommander.commands + +import me.gserv.fabrikommander.data.TeleportRequest +import me.gserv.fabrikommander.utils.Context +import me.gserv.fabrikommander.utils.Dispatcher +import me.gserv.fabrikommander.utils.aqua +import me.gserv.fabrikommander.utils.plus +import me.gserv.fabrikommander.utils.red +import net.minecraft.command.argument.EntityArgumentType +import net.minecraft.server.command.CommandManager.argument +import net.minecraft.server.command.CommandManager.literal + +class TpDenyCommand(val dispatcher: Dispatcher) { + fun register() { + dispatcher.register( + literal("tpdeny").then( + argument("source", EntityArgumentType.player()).executes(this::tpDenyCommand) + ) + ) + } + + fun tpDenyCommand(context: Context): Int { + val source = EntityArgumentType.getPlayer(context, "source") + if (TeleportRequest.ACTIVE_REQUESTS[source.uuidAsString + context.source.player.uuidAsString] == null) { + context.source.sendError( + red("No active teleport request from ") + source.displayName + ) + return 0 + } + TeleportRequest.ACTIVE_REQUESTS.remove(source.uuidAsString + context.source.player.uuidAsString) + context.source.sendFeedback( + aqua("Teleport request from ") + source.displayName + aqua(" was denied"), + true + ) + return 1 + } +} From 84d88d722bbda3892f9b2c01c08e48ae9d6e8ad1 Mon Sep 17 00:00:00 2001 From: YTG123 <54103478+YTG1234@users.noreply.github.com> Date: Sat, 7 Nov 2020 16:06:31 +0200 Subject: [PATCH 07/19] Added more messages --- .../fabrikommander/commands/TpAcceptCommand.kt | 6 ++++-- .../fabrikommander/commands/TpCancelCommand.kt | 1 + .../fabrikommander/commands/TpDenyCommand.kt | 1 + .../fabrikommander/commands/TpaCommand.kt | 8 +++++++- .../fabrikommander/commands/TpaHereCommand.kt | 8 +++++++- .../fabrikommander/data/TeleportRequest.kt | 18 +++++++++++++++++- 6 files changed, 37 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpAcceptCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpAcceptCommand.kt index 4c6d6a6..bda4f5f 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/TpAcceptCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpAcceptCommand.kt @@ -21,13 +21,15 @@ class TpAcceptCommand(val dispatcher: Dispatcher) { fun tpAcceptCommand(context: Context): Int { val source = EntityArgumentType.getPlayer(context, "source") - if (TeleportRequest.ACTIVE_REQUESTS[source.uuidAsString + context.source.player.uuidAsString] == null) { + val request = TeleportRequest.ACTIVE_REQUESTS[source.uuidAsString + context.source.player.uuidAsString] + if (request == null) { context.source.sendError( red("No active teleport request from ") + source.displayName ) return 0 } - TeleportRequest.ACTIVE_REQUESTS[source.uuidAsString + context.source.player.uuidAsString]!!.apply() + request.apply() + request.notifySourceOfAccept() TeleportRequest.ACTIVE_REQUESTS.remove(source.uuidAsString + context.source.player.uuidAsString) return 1 } diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpCancelCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpCancelCommand.kt index 4e26eef..6ec9be5 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/TpCancelCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpCancelCommand.kt @@ -27,6 +27,7 @@ class TpCancelCommand(val dispatcher: Dispatcher) { ) return 0 } + TeleportRequest.ACTIVE_REQUESTS[context.source.player.uuidAsString + target.uuidAsString]!!.notifyTargetOfCancel() TeleportRequest.ACTIVE_REQUESTS.remove(context.source.player.uuidAsString + target.uuidAsString) context.source.sendFeedback(aqua( "Teleport request to " diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpDenyCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpDenyCommand.kt index 90c6729..6a0d07b 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/TpDenyCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpDenyCommand.kt @@ -27,6 +27,7 @@ class TpDenyCommand(val dispatcher: Dispatcher) { ) return 0 } + TeleportRequest.ACTIVE_REQUESTS[source.uuidAsString + context.source.player.uuidAsString]!!.notifySourceOfDeny() TeleportRequest.ACTIVE_REQUESTS.remove(source.uuidAsString + context.source.player.uuidAsString) context.source.sendFeedback( aqua("Teleport request from ") + source.displayName + aqua(" was denied"), diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt index 7bf5720..3243ee7 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt @@ -3,6 +3,8 @@ package me.gserv.fabrikommander.commands import me.gserv.fabrikommander.data.TeleportRequest import me.gserv.fabrikommander.utils.Context import me.gserv.fabrikommander.utils.Dispatcher +import me.gserv.fabrikommander.utils.aqua +import me.gserv.fabrikommander.utils.plus import net.minecraft.command.argument.EntityArgumentType import net.minecraft.server.command.CommandManager.argument import net.minecraft.server.command.CommandManager.literal @@ -20,7 +22,11 @@ class TpaCommand(val dispatcher: Dispatcher) { val target = EntityArgumentType.getPlayer(context, "target") val source = context.source.player val request = TeleportRequest(source = source, target = target, inverted = false) - request.notifyTarget() + request.notifyTargetOfRequest() + context.source.sendFeedback( + aqua("Teleport request sent to ") + target.displayName, + true + ) return 1 } } diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt index bb31146..1bc4f43 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt @@ -3,6 +3,8 @@ package me.gserv.fabrikommander.commands import me.gserv.fabrikommander.data.TeleportRequest import me.gserv.fabrikommander.utils.Context import me.gserv.fabrikommander.utils.Dispatcher +import me.gserv.fabrikommander.utils.aqua +import me.gserv.fabrikommander.utils.plus import net.minecraft.command.argument.EntityArgumentType import net.minecraft.server.command.CommandManager.argument import net.minecraft.server.command.CommandManager.literal @@ -20,7 +22,11 @@ class TpaHereCommand(val dispatcher: Dispatcher) { val target = EntityArgumentType.getPlayer(context, "target") val source = context.source.player val request = TeleportRequest(source = source, target = target, inverted = true) - request.notifyTarget() + request.notifyTargetOfRequest() + context.source.sendFeedback( + aqua("Teleport request sent to ") + target.displayName, + true + ) return 1 } } diff --git a/src/main/kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt b/src/main/kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt index fd82ecb..fc0bfc6 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt @@ -35,7 +35,18 @@ class TeleportRequest( source.teleport(target.serverWorld, target.x, target.y, target.z, target.yaw, target.pitch) } - fun notifyTarget() { + fun notifySourceOfAccept() { + val message = + reset("") + target.displayName + aqua(" has accepted your teleport request") + source.sendSystemMessage(message, Util.NIL_UUID) + } + + fun notifySourceOfDeny() { + val message = reset("") + target.displayName + aqua(" has denied your teleport request") + source.sendSystemMessage(message, Util.NIL_UUID) + } + + fun notifyTargetOfRequest() { // Message will be configurable later val message = reset("") + source.displayName as MutableText + yellow( // reset("") used to make the vanilla click event for player names not apply to the whole message @@ -74,4 +85,9 @@ class TeleportRequest( target.sendSystemMessage(message, Util.NIL_UUID) } + + fun notifyTargetOfCancel() { + val message = reset("") + source.displayName + aqua(" has cancelled their teleport request.") + target.sendSystemMessage(message, Util.NIL_UUID) + } } From 3195fcca76d5a52f262a6142d7c79964dbefb18a Mon Sep 17 00:00:00 2001 From: YTG123 <54103478+YTG1234@users.noreply.github.com> Date: Fri, 4 Dec 2020 12:49:59 +0200 Subject: [PATCH 08/19] Updated things --- .DS_Store | Bin 0 -> 8196 bytes gradle.properties | 6 +-- gradle/wrapper/gradle-wrapper.jar | Bin 58694 -> 58910 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 53 ++++++++++++++--------- gradlew.bat | 22 +++++++++- 6 files changed, 58 insertions(+), 25 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ac366a124a66330ab9b9631e6cb098e00bf57dc6 GIT binary patch literal 8196 zcmeHM%Sr<=6uoik1AHK^x(v7%{ew{}x_2WYsBOg-S}SUo!u*a)!4D9>z@1xH{(wK= zxk(&z+evXHiZ_s)G56k_(=&BqMj|p>!}bPIorvbp8JFiVR5XrrA8S)##sUrMsdv7y z-x~BU$1-(79Z(0<0d+tfPzQdC1K6{<%_a7IAJtJEPzU~{1N?lj=!|*5!lQe1U~oqO zU=7o*;d+@bfHq(ru<(con(?JTUuwb;!}xN{+mM$BEIj&hGU4!H0<#Gx6yw;jzIEwj za*sNy1M0xI0~S*?TBCF7(v3L3XSXkLtUqWpn!Q02bNs7z^l<;QDdX*l@yky1ZeZ~l zr8N7=OC1_gQ?Qe{8_!5+7+I%3s8lkNCG_}*j?cKFQ)*L>&SE`TYihOBQ)W!m6J<@% zQ)b0_vW|O&G7W#a&~iqnu@<7^cW8;C2^}J%QbUvx^OIQz0T`ONFI{-i7W|9byE2;O zFY6QcBw`T!E04@SgKuT&k5E8wOQZ3G2C+s$g~$;){AQCu#gHz9f`k476og2EyNp(P zAEJWqu)v~N^%{&V!Dn9gz9LCJSC{ydVO7DGx%a$%%JIu0B3^^>cEdW@B#VU>G1#n literal 0 HcmV?d00001 diff --git a/gradle.properties b/gradle.properties index af76645..6d080e7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,11 +4,11 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # Check these on https://modmuss50.me/fabric.html minecraft_version=1.16.4 - yarn_mappings=1.16.4+build.6 - loader_version=0.10.6+build.214 + yarn_mappings=1.16.4+build.7 + loader_version=0.10.8 #Fabric api - fabric_version=0.25.1+build.416-1.16 + fabric_version=0.27.1+1.16 loom_version=0.5-SNAPSHOT diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 490fda8577df6c95960ba7077c43220e5bb2c0d9..62d4c053550b91381bbd28b1afc82d634bf73a8a 100644 GIT binary patch delta 6447 zcmY*dbyQSczlH%shY+L(kQ}C6ise@?c@F%#`dE9xT=qM=Dm?$VxD1hrECD1a#01Q8o zMyT3}z+1K>hPE%4doH=x5X;^NP(OFD5GByp;5FQ^bpzkBa(;eudMu7Iyv$DE+N=>p z{3Y5_BP>F3)tXW*Styc(Ji3jnK-giGA_&42fsbZ@#+e+ly3w0VmLC;LA)h1UY(ChA zfwqQ?-@}@S93F|exOv;Se;P|SrYvEG(8q&|ltqvQHO9KgCSwM!Y+#d5eIRq$Mi`pU__N$FTxW@KAWIw= zayY6@9EyxG<_tr&{Wi87m5*mf=u&=;eL1gf{Mt)q8Drick8CcxzLW>cG~TbW)|$*D zYMc|5eZNNzt7O_C1LqgaI`Z0B+2#;3yO;E7N4oMY@~7$4;MRonU+Ca z#*cD!7$u9pZ|3f!-_6rpN}XhAWd`1qiR{e*1CJK1dvBsjUyY@BuT|;EAz}*0uSwT_ zq(g0jXTAK4wsQ>kIKEfRQZw^GIKNRZmV)b;c*Kpc?IvNuq{+eCM4%IBoRUk!JeJ4IVH!pLl+5gQn^$0Fw(WROw~SclOYWbMmvR+x&lYa zrU`5lck*s2zl;n6HEa_E|Btu!_BeeF8T=~0Z-pdJsKtN8nr88*8loznbI`@@8U-bc zCE&MaHH#?LN;6&wU%>->{X&6n*c6ECkP#Bn{lafo9KW+AKK>>f)YfzG#t`XCsl$WX zeS|50l&G{J6yrdD0#njv3|C}K(~azN%1+c#*-JXtZd=Rs-zr)f{Mneaqpgewz^3OM5FaDaH3?RpqMyL}=5sFu_zcDc^E~=$H zp`mutZ0ahrf32c`6ROB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kc*CA+ui@= zieS-e>hskR-1I9Sx7b4i6p>2LP#vgtG6;8vGL>E3$NPQ$J2r~XGQDNg;Sw=& zC}lz+3@Sq%I2q-97R&9|8Ij2^?^DGQK_oiqZS2$!-rzVqn=~d~TS{n&I+svxt4dWO zT?K0)JEx>9E7saW8h!5+MmAkC`g~v*@ z6VKn0>eZdon>BH(O$mACnxk3D?vSlCFFnvZ#+&hUs)Wr!aP{<@|oc^G>bJk59^xhmz!RA%|K_$o)V`D@gVs>@bSmXVID_PQXp znfja8U01+t3V!o{8ZKi~G@#q$KrAH-Ks3$G{Qo}H|N1ijJMsgZDgOmM1O$Fi0>0CX zpbAzXhYbP@PV;~=*nn7eQGjoT2b9nGFNg-PpHT$a@?7JL7I&pmkmclS7#Y#zRYg_`D0h47O z&|%88tXNh8{Yk$@@*HA-B9r#tDkY$>!U#Ie`j1TupjRn@;(ykyyld-zJ{@qm!UG~I zxR#ZxV8CEi5JXV?ANc~bS9*;MYtkTvifc5iynmg!XpIr%SN*R#E?|3&2QVs~N02d=N!1;GdfNGr)gc$|K#-y*M=Ra9B4#cmk-naoQuS*cWnE3C4 F{|nTN-B$nr diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 186b715..be52383 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index cccdd3d..fbd7c51 100755 --- a/gradlew +++ b/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" @@ -66,6 +82,7 @@ esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then @@ -109,10 +126,11 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath @@ -138,19 +156,19 @@ if $cygwin ; then else eval `echo args$i`="\"$arg\"" fi - i=$((i+1)) + i=`expr $i + 1` done case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi @@ -159,14 +177,9 @@ save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } -APP_ARGS=$(save "$@") +APP_ARGS=`save "$@"` # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index f955316..5093609 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -13,8 +29,11 @@ if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome @@ -65,6 +84,7 @@ set CMD_LINE_ARGS=%* set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% From f46383be3dcf5c65ec638383ffbcd54091219c78 Mon Sep 17 00:00:00 2001 From: YTG123 <54103478+YTG1234@users.noreply.github.com> Date: Fri, 4 Dec 2020 13:03:23 +0200 Subject: [PATCH 09/19] long overdue tbh --- .../kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt b/src/main/kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt index fc0bfc6..80b868d 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/data/TeleportRequest.kt @@ -51,11 +51,8 @@ class TeleportRequest( val message = reset("") + source.displayName as MutableText + yellow( // reset("") used to make the vanilla click event for player names not apply to the whole message " has requested " + when (inverted) { - true -> "you" - false -> "to" - } + " teleport to " + when (inverted) { // Will change to one when later, for now it's two - true -> "them" - false -> "you" + true -> "you teleport to them" + false -> "to teleport to you" } ) + reset(". [") + click( hover( From fe59f288e51be33036a004940d3341c2d397a636 Mon Sep 17 00:00:00 2001 From: YTG123 <54103478+YTG1234@users.noreply.github.com> Date: Sat, 12 Dec 2020 14:29:13 +0200 Subject: [PATCH 10/19] update FAPI --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 1e7fbee..5c6aaf8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G loader_version=0.10.8 #Fabric api - fabric_version=0.27.1+1.16 + fabric_version=0.28.0+1.16 loom_version=0.5-SNAPSHOT From 34af585f13fbd207979eda19133ae6e54407eb0b Mon Sep 17 00:00:00 2001 From: YTG123 <54103478+YTG1234@users.noreply.github.com> Date: Sat, 12 Dec 2020 17:36:14 +0200 Subject: [PATCH 11/19] Update FAPI --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 5c6aaf8..8314c60 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G loader_version=0.10.8 #Fabric api - fabric_version=0.28.0+1.16 + fabric_version=0.28.1+1.16 loom_version=0.5-SNAPSHOT From 6b1aaba79d82686ed767bc5f41fab29daef7d147 Mon Sep 17 00:00:00 2001 From: YTG123 <54103478+YTG1234@users.noreply.github.com> Date: Sun, 13 Dec 2020 11:23:18 +0200 Subject: [PATCH 12/19] updated things --- gradle/wrapper/gradle-wrapper.jar | Bin 58910 -> 59203 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 2 +- gradlew.bat | 21 +++------------------ 4 files changed, 5 insertions(+), 20 deletions(-) diff --git a/gradle/wr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_~&(G8j1E(XB hw}tl`5K!1C(72%nnjQrp<7@!WCh47rWB+@R{{wClNUHz< diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index be52383..4d9ca16 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index fbd7c51..4f906e0 100755 --- a/gradlew +++ b/gradlew @@ -130,7 +130,7 @@ fi if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath diff --git a/gradlew.bat b/gradlew.bat index 5093609..107acd3 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -54,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -64,21 +64,6 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line @@ -86,7 +71,7 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell From 03fb55640da2be1d75d0b8bcf92681d84282ecaa Mon Sep 17 00:00:00 2001 From: YTG123 <54103478+YTG1234@users.noreply.github.com> Date: Wed, 16 Dec 2020 18:42:38 +0200 Subject: [PATCH 13/19] Update src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt Co-authored-by: SpaceClouds42 <71787666+SpaceClouds42@users.noreply.github.com> --- .../kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt index 3243ee7..44b829f 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt @@ -5,6 +5,10 @@ import me.gserv.fabrikommander.utils.Context import me.gserv.fabrikommander.utils.Dispatcher import me.gserv.fabrikommander.utils.aqua import me.gserv.fabrikommander.utils.plus +import me.gserv.fabrikommander.utils.red +import me.gserv.fabrikommander.utils.hover +import me.gserv.fabrikommander.utils.click +import me.gserv.fabrikommander.utils.reset import net.minecraft.command.argument.EntityArgumentType import net.minecraft.server.command.CommandManager.argument import net.minecraft.server.command.CommandManager.literal From f5b41d58b5dc511aa2b2550b33182fdf76ce09cd Mon Sep 17 00:00:00 2001 From: YTG123 <54103478+YTG1234@users.noreply.github.com> Date: Wed, 16 Dec 2020 18:42:46 +0200 Subject: [PATCH 14/19] Update src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt Co-authored-by: SpaceClouds42 <71787666+SpaceClouds42@users.noreply.github.com> --- .../gserv/fabrikommander/commands/TpaCommand.kt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt index 44b829f..ad65a47 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt @@ -28,7 +28,20 @@ class TpaCommand(val dispatcher: Dispatcher) { val request = TeleportRequest(source = source, target = target, inverted = false) request.notifyTargetOfRequest() context.source.sendFeedback( - aqua("Teleport request sent to ") + target.displayName, + aqua("Teleport request sent to ") + target.displayName + + reset(" [") + hover( + click( + red("Cancel"), + ClickEvent( + ClickEvent.Action.RUN_COMMAND, + "/tpcancel " + target.entityName // There can be multiple active requests + ) + ), + HoverEvent( + HoverEvent.Action.SHOW_TEXT, + red("Click here to cancel the request.") + ) + ) + reset("]"), true ) return 1 From 0d7a47ac9a81e8ae7620b75d1585f00dbd905cc6 Mon Sep 17 00:00:00 2001 From: YTG123 <54103478+YTG1234@users.noreply.github.com> Date: Wed, 16 Dec 2020 18:44:22 +0200 Subject: [PATCH 15/19] Update src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt Co-authored-by: SpaceClouds42 <71787666+SpaceClouds42@users.noreply.github.com> --- .../kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt index 1bc4f43..26ae846 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt @@ -5,6 +5,10 @@ import me.gserv.fabrikommander.utils.Context import me.gserv.fabrikommander.utils.Dispatcher import me.gserv.fabrikommander.utils.aqua import me.gserv.fabrikommander.utils.plus +import me.gserv.fabrikommander.utils.red +import me.gserv.fabrikommander.utils.hover +import me.gserv.fabrikommander.utils.click +import me.gserv.fabrikommander.utils.reset import net.minecraft.command.argument.EntityArgumentType import net.minecraft.server.command.CommandManager.argument import net.minecraft.server.command.CommandManager.literal From 441fb0dee4913588ff9271e2782f426022727712 Mon Sep 17 00:00:00 2001 From: YTG123 <54103478+YTG1234@users.noreply.github.com> Date: Wed, 16 Dec 2020 18:44:31 +0200 Subject: [PATCH 16/19] Update src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt Co-authored-by: SpaceClouds42 <71787666+SpaceClouds42@users.noreply.github.com> --- .../fabrikommander/commands/TpaHereCommand.kt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt index 26ae846..22907d9 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt @@ -28,7 +28,20 @@ class TpaHereCommand(val dispatcher: Dispatcher) { val request = TeleportRequest(source = source, target = target, inverted = true) request.notifyTargetOfRequest() context.source.sendFeedback( - aqua("Teleport request sent to ") + target.displayName, + aqua("Teleport request sent to ") + target.displayName + + reset(" [") + hover( + click( + red("Cancel"), + ClickEvent( + ClickEvent.Action.RUN_COMMAND, + "/tpcancel " + target.entityName // There can be multiple active requests + ) + ), + HoverEvent( + HoverEvent.Action.SHOW_TEXT, + red("Click here to cancel the request.") + ) + ) + reset("]"), true ) return 1 From 72f7a03071a69241b7b42afce8d096dcf86cea0d Mon Sep 17 00:00:00 2001 From: YTG123 <54103478+YTG1234@users.noreply.github.com> Date: Wed, 16 Dec 2020 18:51:23 +0200 Subject: [PATCH 17/19] Update src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt Co-authored-by: SpaceClouds42 <71787666+SpaceClouds42@users.noreply.github.com> --- src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt index ad65a47..8aa5cc2 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaCommand.kt @@ -11,6 +11,8 @@ import me.gserv.fabrikommander.utils.click import me.gserv.fabrikommander.utils.reset import net.minecraft.command.argument.EntityArgumentType import net.minecraft.server.command.CommandManager.argument +import net.minecraft.text.ClickEvent +import net.minecraft.text.HoverEvent import net.minecraft.server.command.CommandManager.literal class TpaCommand(val dispatcher: Dispatcher) { From 243f450512b246deecc6e3a9e35d4d7e65868096 Mon Sep 17 00:00:00 2001 From: YTG123 <54103478+YTG1234@users.noreply.github.com> Date: Wed, 16 Dec 2020 18:51:31 +0200 Subject: [PATCH 18/19] Update src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt Co-authored-by: SpaceClouds42 <71787666+SpaceClouds42@users.noreply.github.com> --- .../kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt index 22907d9..121a99c 100644 --- a/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt +++ b/src/main/kotlin/me/gserv/fabrikommander/commands/TpaHereCommand.kt @@ -11,6 +11,8 @@ import me.gserv.fabrikommander.utils.click import me.gserv.fabrikommander.utils.reset import net.minecraft.command.argument.EntityArgumentType import net.minecraft.server.command.CommandManager.argument +import net.minecraft.text.ClickEvent +import net.minecraft.text.HoverEvent import net.minecraft.server.command.CommandManager.literal class TpaHereCommand(val dispatcher: Dispatcher) { From 5d9cd14c5d8240074b45b36c7af18efe000610be Mon Sep 17 00:00:00 2001 From: YTG123 <54103478+YTG1234@users.noreply.github.com> Date: Sun, 20 Dec 2020 08:59:28 +0200 Subject: [PATCH 19/19] update the fapi --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 8314c60..cb73de4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G loader_version=0.10.8 #Fabric api - fabric_version=0.28.1+1.16 + fabric_version=0.28.3+1.16 loom_version=0.5-SNAPSHOT