diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/PasteIntoSigns.kt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PasteIntoSigns.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PasteIntoSigns.kt index bdddcc3a7..98a16eb4c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/PasteIntoSigns.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PasteIntoSigns.kt @@ -6,21 +6,23 @@ import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.OSUtils import kotlinx.coroutines.launch import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import org.lwjgl.input.Keyboard class PasteIntoSigns { + private var lastClicked = false @SubscribeEvent fun onTick(event: LorenzTickEvent) { if (!LorenzUtils.onHypixel) return if (!SkyHanniMod.feature.misc.pasteIntoSigns) return - if (LorenzUtils.isControlKeyDown() && OSUtils.isKeyHeld(Keyboard.KEY_V)) { + val currentlyClicked = LorenzUtils.isPastingKeysDown() + if (!lastClicked && currentlyClicked) { SkyHanniMod.coroutineScope.launch { OSUtils.readFromClipboard()?.let { - LorenzUtils.setTextIntoSign(it.take(15)) + LorenzUtils.addTextIntoSign(it.take(15)) } } } + lastClicked = currentlyClicked } }
\ No newline at end of file |