mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-07 00:32:06 +00:00
Plugins Fixup / Conversion(#511)
* 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
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user