Skip to content

Instantly share code, notes, and snippets.

@cmoore
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmoore/0c1f9b685b42e05b62c0 to your computer and use it in GitHub Desktop.
Save cmoore/0c1f9b685b42e05b62c0 to your computer and use it in GitHub Desktop.
// The listener class for Beton...
package io.ivy.fawkes.beton;
import pl.betoncraft.betonquest.core.QuestEvent;
public class TestEvent extends QuestEvent {
public TestEvent(String playerID, String instructions) {
super(playerID, instructions);
System.out.println("TEST EVENT");
}
}
// The plugin init...
package io.ivy.fawkes;
import io.ivy.fawkes.beton.TestEvent;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
import pl.betoncraft.betonquest.BetonQuest;
public class Fawkes extends JavaPlugin {
private final Events events = new Events(this);
@Override
public void onEnable() {
PluginManager pm = getServer().getPluginManager();
pm.registerEvents(events, this);
BetonQuest.getInstance().registerEvents("testevent", TestEvent.class);
}
@Override
public void onDisable() {
}
}
// Relevant NPC yaml...
//rufus:
// quester: 'Rufus'
// unknown: 'Huh?'
// first: 'start'
// stop: 'false'
// final_events: 'testevent'
// NPC_options:
// 'start':
// text: 'Hey there, %player%.'
// conditions: ''
// events: ''
// pointer: ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment