mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
For some reason the switch statement won't work for all of them, so we need a plugin too
This commit is contained in:
parent
5fad3b5b2f
commit
5c6273036c
2 changed files with 1692 additions and 1626 deletions
27
Server/src/plugin/interaction/object/LookAtOptionPlugin.java
Normal file
27
Server/src/plugin/interaction/object/LookAtOptionPlugin.java
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package plugin.interaction.object;
|
||||
|
||||
import org.crandor.cache.def.impl.ObjectDefinition;
|
||||
import org.crandor.game.interaction.OptionHandler;
|
||||
import org.crandor.game.node.Node;
|
||||
import org.crandor.game.node.entity.player.Player;
|
||||
import org.crandor.plugin.InitializablePlugin;
|
||||
import org.crandor.plugin.Plugin;
|
||||
|
||||
@InitializablePlugin
|
||||
public class LookAtOptionPlugin extends OptionHandler {
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
for (int i = 18877; i <= 18900; i++)
|
||||
{
|
||||
ObjectDefinition.forId(i).getConfigurations().put("option:look at", this);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
player.getPacketDispatch().sendMessage("The " + node.getName().toLowerCase() + " seem to be going south-west.");
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue