From 35c71244514e8c5e3cd545c478a65e5cc0009698 Mon Sep 17 00:00:00 2001 From: ruby Date: Thu, 2 Jan 2025 18:29:04 +1300 Subject: [PATCH] yep --- .../kotlin/com/pobnellion/aoe/ui/PlaceHint.kt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/kotlin/com/pobnellion/aoe/ui/PlaceHint.kt b/src/main/kotlin/com/pobnellion/aoe/ui/PlaceHint.kt index 64aa0eb..d414ef8 100644 --- a/src/main/kotlin/com/pobnellion/aoe/ui/PlaceHint.kt +++ b/src/main/kotlin/com/pobnellion/aoe/ui/PlaceHint.kt @@ -1,4 +1,4 @@ -package com.pobnellion.aoe.ui; +package com.pobnellion.aoe.ui import com.comphenix.protocol.PacketType import com.comphenix.protocol.ProtocolLibrary @@ -30,7 +30,7 @@ import kotlin.math.floor class PlaceHint { companion object : Listener { private const val MAX_TARGET_DISTANCE = 64 - private val playerHints = HashMap(); + private val playerHints = HashMap() fun add( player: Player, @@ -44,7 +44,7 @@ class PlaceHint { createOutlineTeam(player) playerHints[player.uniqueId] = PlaceHint(player, sizeX, sizeY, sizeZ, onConfirm, validate) - val block = player.getTargetBlockExact(MAX_TARGET_DISTANCE); + val block = player.getTargetBlockExact(MAX_TARGET_DISTANCE) playerHints[player.uniqueId]!!.moveTo(block?.location) } @@ -58,7 +58,7 @@ class PlaceHint { createOutlineTeam(player) playerHints[player.uniqueId] = PlaceHint(player, schematicName, onConfirm, validate) - val block = player.getTargetBlockExact(MAX_TARGET_DISTANCE); + val block = player.getTargetBlockExact(MAX_TARGET_DISTANCE) playerHints[player.uniqueId]!!.moveTo(block?.location) } @@ -93,8 +93,8 @@ class PlaceHint { if (!playerHints.containsKey(event.player.uniqueId)) return - val target = event.player.getTargetBlockExact(MAX_TARGET_DISTANCE); - val block = if (target == null) null else event.player.getTargetBlock(MaterialSetTag.REPLACEABLE.values, MAX_TARGET_DISTANCE); + val target = event.player.getTargetBlockExact(MAX_TARGET_DISTANCE) + val block = if (target == null) null else event.player.getTargetBlock(MaterialSetTag.REPLACEABLE.values, MAX_TARGET_DISTANCE) playerHints[event.player.uniqueId]!!.moveTo(block?.location) } @@ -179,7 +179,7 @@ class PlaceHint { private fun show(initialLocation: Location) { initialLocation.add(-floor(sizeX / 2.0), 1.0, -floor(sizeZ / 2.0)) - currentLocation = initialLocation; + currentLocation = initialLocation val spawnMarkerPacket = PacketContainer(PacketType.Play.Server.SPAWN_ENTITY) spawnMarkerPacket.integers.write(0, marker.first) @@ -321,7 +321,7 @@ class PlaceHint { private fun updateColour() { // base val dataPacket = PacketContainer(PacketType.Play.Server.ENTITY_METADATA) - dataPacket.integers.write(0, base.first); + dataPacket.integers.write(0, base.first) val material = if (isValid) Material.LIME_STAINED_GLASS else Material.RED_STAINED_GLASS val blockData = BukkitConverters