mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-03 00:31:51 +00:00
c2f325b4e7
* Server: Ripped PluginService From Astreaus-V2 This Removes The Need For Plugin MetaData * Plugins: Handle Emote Tab Run Buttons * Add Some Settings Button Plugins Brightness Buttons Music Volume Buttons Walk/Run Buttons Toggle SplitPrivate-Chat * Fix Player Still Running With 0 Energy Fixes Players Continuing To Run For The Rest Of Their Current Movement Task Even If They Run Out Of Energy
25 lines
741 B
Kotlin
25 lines
741 B
Kotlin
package plugin.buttons.gameframe
|
|
|
|
import com.rs2.event.SubscribesTo
|
|
import com.rs2.event.impl.ButtonActionEvent
|
|
import com.rs2.game.items.impl.LightSources
|
|
import com.rs2.game.players.Player
|
|
import plugin.buttons.ButtonClick
|
|
|
|
@SubscribesTo(ButtonActionEvent::class)
|
|
class BrightnessButtons : ButtonClick() {
|
|
|
|
override fun execute(player: Player, event: ButtonActionEvent) {
|
|
when (event.button) {
|
|
3138 -> LightSources.brightness1(player)
|
|
3140 -> LightSources.brightness2(player)
|
|
3142 -> LightSources.brightness3(player)
|
|
3144 -> LightSources.brightness4(player)
|
|
}
|
|
}
|
|
|
|
override fun test(event: ButtonActionEvent): Boolean {
|
|
return event.button == 3138 || event.button == 3140 || event.button == 3142 || event.button == 912
|
|
}
|
|
|
|
} |