Files
2009scape/Server/src/main/content/global/skill/firemaking/LightLogPlugin.java
T
Ceikry a100affda2 Repository reorganisation
Unified kotlin and java into just src/main
Unified the rs09 and core packages
Took all content out of the core package, and placed it into the new content package
Reorganised all source code relating to content to be easier to find and explore
2023-01-26 13:59:28 +00:00

33 lines
838 B
Java

package content.global.skill.firemaking;
import core.cache.def.impl.ItemDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
import core.game.node.item.GroundItem;
import core.game.node.item.Item;
import core.plugin.Initializable;
import core.plugin.Plugin;
/**
* Represents the plugin used to light a log.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class LightLogPlugin extends OptionHandler {
@Override
public boolean handle(Player player, Node node, String option) {
player.getPulseManager().run(new FireMakingPulse(player, ((Item) node), ((GroundItem) node)));
return true;
}
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ItemDefinition.setOptionHandler("light", this);
return this;
}
}