Quests
Quests copied to clipboard
API: New task type not working.
Description of Bug
When I use the API to create a new custom task type. The task will not executed.
Steps to Reproduce
TaskType Class:
package me.jacobtims.opkaddon2.tasks;
import com.leonardobishop.quests.bukkit.tasktype.BukkitTaskType;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.BlockBreakEvent;
public final class BlockBreakTaskType extends BukkitTaskType {
public BlockBreakTaskType() {
super("blockbreaktest");
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBlockBreak(BlockBreakEvent event){
event.getPlayer().sendMessage("Block broken!");
}
}
Main Class:
@Override
public void onEnable() {
//Quests plugin tasks
Quests questsPlugin = (Quests) Bukkit.getPluginManager().getPlugin("Quests");
BukkitTaskTypeManager taskTypeManager = (BukkitTaskTypeManager) questsPlugin.getTaskTypeManager();
taskTypeManager.registerTaskType(new BlockBreakTaskType());
}`
Environment
- Minecraft version: 1.16.5
- Server software: Paper
- Quests version: 3.9.1
Agreements
- [X] I am running the latest version of Quests
- [X] I am certain this issue is unique and a similar issue is not currently open
- [X] I am using a version of Minecraft which is supported by Quests
Other
No response
Make sure you task is actually accepted by the plugin, you should be able to see it in /q a types
Yes, it's there.
Make sure you task is actually accepted by the plugin, you should be able to see it in
/q a types
Yes, it's there. What am I doing wrong?
???