mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 08:39:11 +00:00
Fix plugin issues created by breaking changes in previous commit.
This commit is contained in:
@@ -22,6 +22,7 @@ java_import 'org.apollo.game.model.World'
|
||||
java_import 'org.apollo.game.model.entity.Player'
|
||||
java_import 'org.apollo.game.model.setting.PrivilegeLevel'
|
||||
java_import 'org.apollo.game.scheduling.ScheduledTask'
|
||||
java_import 'org.apollo.util.plugin.PluginContext'
|
||||
|
||||
# Alias the privilege levels.
|
||||
RIGHTS_ADMIN = PrivilegeLevel::ADMINISTRATOR
|
||||
@@ -196,17 +197,17 @@ def on_command(args, proc)
|
||||
raise 'Command message must have one or two arguments.' unless (1..2).include?(args.length)
|
||||
|
||||
rights = args.length == 2 ? args[1] : RIGHTS_STANDARD
|
||||
$ctx.add_command_listener(args[0].to_s, ProcCommandListener.new(rights, proc))
|
||||
PluginContext::add_command_listener(args[0].to_s, ProcCommandListener.new(rights, proc))
|
||||
end
|
||||
|
||||
# Defines an action to be taken upon login.
|
||||
def on_login(proc)
|
||||
$ctx.add_login_listener(ProcLoginListener.new(proc))
|
||||
PluginContext::add_login_listener(ProcLoginListener.new(proc))
|
||||
end
|
||||
|
||||
# Defines an action to be taken upon logout.
|
||||
def on_logout(proc)
|
||||
$ctx.add_logout_listener(ProcLogoutListener.new(proc))
|
||||
PluginContext::add_logout_listener(ProcLogoutListener.new(proc))
|
||||
end
|
||||
|
||||
# Ids of in-game skills.
|
||||
|
||||
@@ -11,7 +11,7 @@ class Rune
|
||||
|
||||
def initialize(id, level, experience, multiplier)
|
||||
@id = id
|
||||
@name = ItemDefinition.lookup(id).name.downcase
|
||||
@name = ItemDefinition.lookup(id).name.to_s.downcase
|
||||
@level = level
|
||||
@experience = experience
|
||||
@multiplier = multiplier
|
||||
|
||||
@@ -18,7 +18,7 @@ class Tiara
|
||||
|
||||
def initialize(tiara_id, altar, talisman, bitshift, experience)
|
||||
@tiara_id = tiara_id
|
||||
@name = ItemDefinition.lookup(tiara_id).name.downcase
|
||||
@name = ItemDefinition.lookup(tiara_id).name.to_s.downcase
|
||||
@altar = altar
|
||||
@talisman = talisman
|
||||
@bitshift = bitshift
|
||||
|
||||
Reference in New Issue
Block a user