Skip to content
Nutty101 edited this page Oct 28, 2018 · 2 revisions

//Example class to work events from NPC_Destinations

public class DestinationsAddon { public String getPluginIcon() { return "?"; }

public String getActionName() {
    return "INVALID";
}

public String getQuickDescription() {
    return "The developer forgot to add a description";
}

public String getDestinationHelp(NPC npc, NPCDestinationsTrait npcTrait, Destination_Setting location) {
    return ",{\"text\":\"&a?&e\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"The developer of this plugin didn't design it right.\"}}";
}

public List<String> parseTabItem(String item, String priorArg) {
    return new ArrayList<String>();
}

public String parseLanguageLine(String message, NPCDestinationsTrait npcTrait, Destination_Setting locationSetting, Material blockMaterial, NPC npc, int ident) {
    return message;
}

public boolean isDestinationEnabled(NPC npc, NPCDestinationsTrait npcTrait, Destination_Setting location) {
    return true;
}

public void onLocationLoading(NPC npc, NPCDestinationsTrait npcTrait, Destination_Setting location, DataKey storageKey) {
    return;
}

public void onLocationSaving(NPC npc, NPCDestinationsTrait npcTrait, Destination_Setting location, DataKey storageKey) {
    return;
}

public boolean onNavigationReached(NPC npc, NPCDestinationsTrait npcTrait, Destination_Setting location) {
    return false;
}

public boolean onNewDestination(NPC npc, NPCDestinationsTrait npcTrait, Destination_Setting location) {
    return false;
}

public void onEnableChanged(NPC npc, NPCDestinationsTrait npcTrait, boolean enabled) {
    return;
}

} `

Clone this wiki locally