blob: 7e335c5e5672510774f21caa985d83cd8196898f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package at.hannibal2.skyhanni.features.misc
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.OSUtils
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent
import org.lwjgl.input.Keyboard
class PasteIntoSigns {
@SubscribeEvent
fun onTick(event: TickEvent.ClientTickEvent) {
if (!LorenzUtils.onHypixel) return
if (!SkyHanniMod.feature.misc.pasteIntoSigns) return
if (Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && Keyboard.isKeyDown(Keyboard.KEY_V)) {
val clipboard = OSUtils.readFromClipboard() ?: return
LorenzUtils.setTextIntoSign(clipboard.take(15))
}
}
}
|