ruby - Converting a jRuby script into a Groovy script -
i've been trying convert ruby bootstrap groovy , far i'm bit confused i'm still beginner in ruby.
this plugin system. bootstrap ruby script allows me create multiple scripts server hooks onto button handler can handle button clicking inside ruby script instead. example of plugin script this:
now i'm trying groovy don't know how call parameters[player,slot,param] , handle in example plugin script above
thanks, hope u guys understand problem i'll provide more details if needed.
i'm no ruby guru, afaik, proc similar groovy's closure, guess it'd like:
class procbuttonhandler extends buttonhook { closure proc procbuttonhandler(id, proc) { super(id) this.proc = proc } void handle(player, slot, parameter) { proc player, slot, parameter } }
Comments
Post a Comment