Fix formatting and break the handler chain in the emote tab plugin.

This commit is contained in:
Major-
2014-08-03 18:10:20 +01:00
parent 107f97c226
commit 6349bc5892
+6 -1
View File
@@ -1,4 +1,5 @@
require 'java' require 'java'
java_import 'org.apollo.game.model.Animation' java_import 'org.apollo.game.model.Animation'
ANIMATIONS = { ANIMATIONS = {
@@ -10,7 +11,11 @@ ANIMATIONS = {
666 => Animation::GLASS_WALL, 168 => Animation::YES, 13383 => Animation::GOBLIN_BOW 666 => Animation::GLASS_WALL, 168 => Animation::YES, 13383 => Animation::GOBLIN_BOW
} }
# Intercept the ButtonEvent
on :event, :button do |ctx, player, event| on :event, :button do |ctx, player, event|
anim = ANIMATIONS[event.widget_id] anim = ANIMATIONS[event.widget_id]
player.play_animation(anim) if anim unless anim == nil
player.play_animation(anim)
ctx.break_handler_chain
end
end end