<commit_before>package de.domisum.animulusapi.npc.task;

import de.domisum.auxiliumapi.util.java.annotations.APIUsage;
import de.domisum.auxiliumapi.util.java.annotations.DeserializationNoArgsConstructor;

public abstract class NPCTask
{

	// PROPERTIES
	private boolean runSeparately = false;

	// REFERENCES
	protected TaskNPC npc;

	// STATUS
	private boolean canceled;


	// -------
	// CONSTRUCTOR
	// -------
	@DeserializationNoArgsConstructor
	public NPCTask()
	{

	}

	void initialize(TaskNPC npc)
	{
		this.npc = npc;
	}


	// -------
	// GETTERS
	// -------
	public abstract NPCTaskSlot[] USED_TASK_SLOTS();

	boolean isRunSeparately()
	{
		return this.runSeparately;
	}

	boolean isCanceled()
	{
		return this.canceled;
	}


	// -------
	// SETTERS
	// -------
	@APIUsage
	public NPCTask setRunSeparately(boolean runSeparately)
	{
		this.runSeparately = runSeparately;
		return this;
	}


	// -------
	// EXECUTION
	// -------
	protected abstract void onStart();

	/**
	 * @return true if the task is finished, false if not
	 */
	protected abstract boolean onUpdate();

	protected abstract void onCancel();

	@APIUsage
	public void cancel()
	{
		onCancel();
		this.canceled = true;
	}

}
<commit_msg>Allowed override of isRunSeparately method<commit_after>package de.domisum.animulusapi.npc.task;

import de.domisum.auxiliumapi.util.java.annotations.APIUsage;
import de.domisum.auxiliumapi.util.java.annotations.DeserializationNoArgsConstructor;

public abstract class NPCTask
{

	// PROPERTIES
	private boolean runSeparately = false;

	// REFERENCES
	protected TaskNPC npc;

	// STATUS
	private boolean canceled;


	// -------
	// CONSTRUCTOR
	// -------
	@DeserializationNoArgsConstructor
	public NPCTask()
	{

	}

	void initialize(TaskNPC npc)
	{
		this.npc = npc;
	}


	// -------
	// GETTERS
	// -------
	public abstract NPCTaskSlot[] USED_TASK_SLOTS();

	protected boolean isRunSeparately()
	{
		return this.runSeparately;
	}

	boolean isCanceled()
	{
		return this.canceled;
	}


	// -------
	// SETTERS
	// -------
	@APIUsage
	public NPCTask setRunSeparately(boolean runSeparately)
	{
		this.runSeparately = runSeparately;
		return this;
	}


	// -------
	// EXECUTION
	// -------
	protected abstract void onStart();

	/**
	 * @return true if the task is finished, false if not
	 */
	protected abstract boolean onUpdate();

	protected abstract void onCancel();

	@APIUsage
	public void cancel()
	{
		onCancel();
		this.canceled = true;
	}

}

{'fraction_non_alphanumeric': 0.14628199918732224, 'fraction_numerical': 0.0, 'mean_word_length': 2.799382716049383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2889525', 'n_tokens_mistral': 938, 'n_tokens_neox': 847, 'n_words': 175}