mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-17 21:35:13 +00:00
Large Cleanup to Code Imports and Formatting
This commit is contained in:
1 parent
64fe8794e7
commit
a6b4a131c8
65 files changed
+606
-409
No files matched your search
@@ -72,15 +72,15 @@ public interface IAction {
|
||||
|
||||
/**
|
||||
* @return the maximum number of ticks this action is allowed to run before auto marking done
|
||||
*
|
||||
* <p>
|
||||
* P.S: If max duration is reached and this IAction's thread (created using {@link #threadify()}) is paused by any of the pausing methods,
|
||||
* the thread is forcibly resumed and finishes the task execution.
|
||||
* the thread is forcibly resumed and finishes the task execution.
|
||||
*/
|
||||
int getMaxDuration();
|
||||
|
||||
/**
|
||||
* @param ticks max duration
|
||||
* default: -1, infinite
|
||||
* default: -1, infinite
|
||||
* @return
|
||||
*/
|
||||
IAction setMaxDuration(int ticks);
|
||||
@@ -171,12 +171,14 @@ public interface IAction {
|
||||
|
||||
/**
|
||||
* Executes task every tick (Sets updateEvery to 1)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IAction everyTick();
|
||||
|
||||
/**
|
||||
* Executes task every second (Sets updateEvery to 20)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IAction everySecond();
|
||||
@@ -206,7 +208,7 @@ public interface IAction {
|
||||
* Must call {@link #threadify()} before using, else throws exception.
|
||||
* Pauses IAction's thread until the supplied condition is satisfied or {@link #resume()} is called.
|
||||
*/
|
||||
void pauseUntil(Function<IAction,Boolean> until);
|
||||
void pauseUntil(Function<IAction, Boolean> until);
|
||||
|
||||
/**
|
||||
* Resumes thread that was previously paused by {@link #pause()}, {@link #pauseUntil(Function)}, {@link #pauseFor(int)} or {@link #pauseFor(long)}
|
||||
@@ -306,17 +308,17 @@ public interface IAction {
|
||||
|
||||
void conditional(IConditionalAction... actions);
|
||||
|
||||
IConditionalAction conditional(Function<IAction,Boolean> condition, Consumer<IAction> task);
|
||||
IConditionalAction conditional(Function<IAction, Boolean> condition, Consumer<IAction> task);
|
||||
|
||||
IConditionalAction conditional(String name, Function<IAction,Boolean> condition, Consumer<IAction> task);
|
||||
IConditionalAction conditional(String name, Function<IAction, Boolean> condition, Consumer<IAction> task);
|
||||
|
||||
IConditionalAction conditional(Function<IAction,Boolean> condition, Consumer<IAction> task, Function<IAction,Boolean> terminate);
|
||||
IConditionalAction conditional(Function<IAction, Boolean> condition, Consumer<IAction> task, Function<IAction, Boolean> terminate);
|
||||
|
||||
IConditionalAction conditional(String name, Function<IAction,Boolean> condition, Consumer<IAction> task, Function<IAction,Boolean> terminate);
|
||||
IConditionalAction conditional(String name, Function<IAction, Boolean> condition, Consumer<IAction> task, Function<IAction, Boolean> terminate);
|
||||
|
||||
IConditionalAction conditional(Function<IAction,Boolean> condition, Consumer<IAction> task, Function<IAction,Boolean> terminateWhen, Consumer<IAction> onTermination);
|
||||
IConditionalAction conditional(Function<IAction, Boolean> condition, Consumer<IAction> task, Function<IAction, Boolean> terminateWhen, Consumer<IAction> onTermination);
|
||||
|
||||
IConditionalAction conditional(String name, Function<IAction,Boolean> condition, Consumer<IAction> task, Function<IAction,Boolean> terminateWhen, Consumer<IAction> onTermination);
|
||||
IConditionalAction conditional(String name, Function<IAction, Boolean> condition, Consumer<IAction> task, Function<IAction, Boolean> terminateWhen, Consumer<IAction> onTermination);
|
||||
|
||||
/**
|
||||
* Enqueue another IAction on the parallel chain which starts firing simultaneously as this.
|
||||
|
||||
@@ -21,8 +21,8 @@ public interface IActionChain {
|
||||
/**
|
||||
*
|
||||
* @param delay ticks between an IAction and another
|
||||
* @param name name of IAction
|
||||
* @param task task of IAction
|
||||
* @param name name of IAction
|
||||
* @param task task of IAction
|
||||
* @return
|
||||
*/
|
||||
IActionChain after(int delay, String name, Consumer<IAction> task);
|
||||
@@ -31,6 +31,7 @@ public interface IActionChain {
|
||||
|
||||
/**
|
||||
* Start IActionManager
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IActionChain start();
|
||||
|
||||
@@ -20,7 +20,8 @@ public interface IAnvilRecipe {
|
||||
|
||||
/**
|
||||
* Checks whether the provided item and repair material match this recipe.
|
||||
* @param itemToRepair the damaged item
|
||||
*
|
||||
* @param itemToRepair the damaged item
|
||||
* @param repairMaterial the material used to repair
|
||||
* @return true if the items match the recipe requirements
|
||||
*/
|
||||
@@ -28,6 +29,7 @@ public interface IAnvilRecipe {
|
||||
|
||||
/**
|
||||
* Returns the repaired item based on the input damaged item.
|
||||
*
|
||||
* @param itemToRepair the input damaged item
|
||||
* @return a copy with reduced damage
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package noppes.npcs.api.handler.data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IDialog {
|
||||
@@ -29,18 +30,23 @@ public interface IDialog {
|
||||
IDialogCategory getCategory();
|
||||
|
||||
void setDarkenScreen(boolean darkenScreen);
|
||||
|
||||
boolean getDarkenScreen();
|
||||
|
||||
void setDisableEsc(boolean disableEsc);
|
||||
|
||||
boolean getDisableEsc();
|
||||
|
||||
void setShowWheel(boolean showWheel);
|
||||
|
||||
boolean getShowWheel();
|
||||
|
||||
void setHideNPC(boolean hideNPC);
|
||||
|
||||
boolean getHideNPC();
|
||||
|
||||
void setSound(String sound);
|
||||
|
||||
String getSound();
|
||||
|
||||
void save();
|
||||
|
||||
@@ -4,38 +4,52 @@ public interface IDialogImage {
|
||||
int getId();
|
||||
|
||||
void setTexture(String texture);
|
||||
|
||||
String getTexture();
|
||||
|
||||
void setPosition(int x, int y);
|
||||
|
||||
int getX();
|
||||
|
||||
int getY();
|
||||
|
||||
void setWidthHeight(int width, int height);
|
||||
|
||||
int getWidth();
|
||||
|
||||
int getHeight();
|
||||
|
||||
void setTextureOffset(int offsetX, int offsetY);
|
||||
|
||||
int getTextureX();
|
||||
|
||||
int getTextureY();
|
||||
|
||||
void setColor(int color);
|
||||
|
||||
int getColor();
|
||||
|
||||
void setSelectedColor(int color);
|
||||
|
||||
int getSelectedColor();
|
||||
|
||||
void setScale(float scale);
|
||||
|
||||
float getScale();
|
||||
|
||||
void setAlpha(float alpha);
|
||||
|
||||
float getAlpha();
|
||||
|
||||
void setRotation(float rotation);
|
||||
|
||||
float getRotation();
|
||||
|
||||
void setImageType(int imageType);
|
||||
|
||||
int getImageType();
|
||||
|
||||
void setAlignment(int alignment);
|
||||
|
||||
int getAlignment();
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package noppes.npcs.api.handler.data;
|
||||
|
||||
public interface IFramePart{
|
||||
public interface IFramePart {
|
||||
|
||||
String getName();
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public interface IMagicCycle {
|
||||
/**
|
||||
* Gets the layout type for the cycle.
|
||||
* This is typically an integer representation of the layout enum.
|
||||
*
|
||||
* <p>
|
||||
* 0: CIRCULAR
|
||||
* 1: SQUARE
|
||||
* 2: TREE
|
||||
@@ -62,7 +62,7 @@ public interface IMagicCycle {
|
||||
/**
|
||||
* Sets the layout type for the cycle.
|
||||
* The provided integer should correspond to a valid layout type.
|
||||
*
|
||||
* <p>
|
||||
* 0: CIRCULAR
|
||||
* 1: SQUARE
|
||||
* 2: TREE
|
||||
|
||||
@@ -24,9 +24,9 @@ public interface IMagicData {
|
||||
boolean isEmpty();
|
||||
|
||||
/**
|
||||
* @param id The ID of the Magic
|
||||
* @param id The ID of the Magic
|
||||
* @param damage The bonus damage for the Magic
|
||||
* @param split The split of the Magic
|
||||
* @param split The split of the Magic
|
||||
*/
|
||||
void addMagic(int id, float damage, float split);
|
||||
|
||||
|
||||
@@ -18,24 +18,28 @@ public interface IParty {
|
||||
|
||||
/**
|
||||
* Set a quest to the party (this does not validate use validateQuest())
|
||||
*
|
||||
* @param quest Quest Object
|
||||
*/
|
||||
void setQuest(IQuest quest);
|
||||
|
||||
/**
|
||||
* Get the Quest for the Party, can be null
|
||||
*
|
||||
* @return quest
|
||||
*/
|
||||
IQuest getQuest();
|
||||
|
||||
/**
|
||||
* Get the Quest ID for Party | -1 if no quest
|
||||
*
|
||||
* @return quest id
|
||||
*/
|
||||
int getCurrentQuestID();
|
||||
|
||||
/**
|
||||
* Get the Quest Name for Party | BLANK if no quest
|
||||
*
|
||||
* @return quest name
|
||||
*/
|
||||
String getCurrentQuestName();
|
||||
@@ -68,12 +72,14 @@ public interface IParty {
|
||||
|
||||
/**
|
||||
* Check if Player is in Party with IPlayer
|
||||
*
|
||||
* @return true/false if player is in party
|
||||
*/
|
||||
boolean hasPlayer(IPlayer player);
|
||||
|
||||
/**
|
||||
* Check if Player is in Party with Player Name
|
||||
*
|
||||
* @return true/false if player is in party
|
||||
*/
|
||||
boolean hasPlayer(String playerName);
|
||||
@@ -90,7 +96,7 @@ public interface IParty {
|
||||
|
||||
|
||||
/**
|
||||
* @param questID ID for the Quest to Verify
|
||||
* @param questID ID for the Quest to Verify
|
||||
* @param sendLeaderMessages IF true will send ERROR message to Party Leader on why the quest could not be set
|
||||
* @return true/false if the party CAN have the quest set
|
||||
*/
|
||||
|
||||
@@ -12,7 +12,7 @@ public interface IPartyOptions {
|
||||
public void setOnlyParty(boolean onlyParty);
|
||||
|
||||
/**
|
||||
* @return 0:Leader, 1:All, 2:Valid
|
||||
* @return 0:Leader, 1:All, 2:Valid
|
||||
*/
|
||||
public int getPartyRequirements();
|
||||
|
||||
@@ -22,7 +22,7 @@ public interface IPartyOptions {
|
||||
public void setPartyRequirements(int partyRequirements);
|
||||
|
||||
/**
|
||||
* @return 0:Leader, 1:All, 2:Enrolled, 3:Valid
|
||||
* @return 0:Leader, 1:All, 2:Enrolled, 3:Valid
|
||||
*/
|
||||
public int getRewardControl();
|
||||
|
||||
@@ -32,7 +32,7 @@ public interface IPartyOptions {
|
||||
public void setRewardControl(int rewardControl);
|
||||
|
||||
/**
|
||||
* @return 0:Leader, 1:All, 2:Enrolled, 3:Valid
|
||||
* @return 0:Leader, 1:All, 2:Enrolled, 3:Valid
|
||||
*/
|
||||
public int getCompleteFor();
|
||||
|
||||
@@ -42,7 +42,7 @@ public interface IPartyOptions {
|
||||
public void setCompleteFor(int completeFor);
|
||||
|
||||
/**
|
||||
* @return 0:Leader, 1:All, 2:Enrolled, 3:Valid
|
||||
* @return 0:Leader, 1:All, 2:Enrolled, 3:Valid
|
||||
*/
|
||||
int getExecuteCommandFor();
|
||||
|
||||
|
||||
@@ -7,22 +7,22 @@ public interface IProfileOptions {
|
||||
void setProfileOptions(boolean enable);
|
||||
|
||||
/**
|
||||
* @param profileType 0:Individual, 1:Shared
|
||||
* @param profileType 0:Individual, 1:Shared
|
||||
*/
|
||||
void setCooldownControl(int profileType);
|
||||
|
||||
/**
|
||||
* @return 0:Individual, 1:Shared
|
||||
* @return 0:Individual, 1:Shared
|
||||
*/
|
||||
int getCooldownControl();
|
||||
|
||||
/**
|
||||
* @param profileType 0:Individual, 1:Shared
|
||||
* @param profileType 0:Individual, 1:Shared
|
||||
*/
|
||||
void setCompleteControl(int profileType);
|
||||
|
||||
/**
|
||||
* @return 0:Individual, 1:Shared
|
||||
* @return 0:Individual, 1:Shared
|
||||
*/
|
||||
int getCompleteControl();
|
||||
}
|
||||
@@ -2,11 +2,14 @@ package noppes.npcs.api.handler.data;
|
||||
|
||||
public interface IQuestItem extends IQuestInterface {
|
||||
void setLeaveItems(boolean leaveItems);
|
||||
|
||||
boolean getLeaveItems();
|
||||
|
||||
void setIgnoreDamage(boolean ignoreDamage);
|
||||
|
||||
boolean getIgnoreDamage();
|
||||
|
||||
void setIgnoreNbt(boolean ignoreNbt);
|
||||
|
||||
boolean getIgnoreNbt();
|
||||
}
|
||||
@@ -2,5 +2,6 @@ package noppes.npcs.api.handler.data;
|
||||
|
||||
public interface IQuestKill extends IQuestInterface {
|
||||
void setTargetType(int type);
|
||||
|
||||
int getTargetType();
|
||||
}
|
||||
@@ -2,11 +2,14 @@ package noppes.npcs.api.handler.data;
|
||||
|
||||
public interface IQuestLocation extends IQuestInterface {
|
||||
void setLocation1(String loc1);
|
||||
|
||||
String getLocation1();
|
||||
|
||||
void setLocation2(String loc2);
|
||||
|
||||
String getLocation2();
|
||||
|
||||
void setLocation3(String loc3);
|
||||
|
||||
String getLocation3();
|
||||
}
|
||||
@@ -28,7 +28,7 @@ public interface IQuestObjective {
|
||||
* have a party
|
||||
*
|
||||
* @param playerName Name of Player
|
||||
* @param progress Progress Amount
|
||||
* @param progress Progress Amount
|
||||
*/
|
||||
void setPlayerProgress(String playerName, int progress);
|
||||
|
||||
|
||||
@@ -33,12 +33,14 @@ public interface IConditionalAction extends IAction {
|
||||
|
||||
/**
|
||||
* Note: Only for Conditional Actions
|
||||
*
|
||||
* @return how many times this conditional action has tested its condition
|
||||
*/
|
||||
int getCheckCount();
|
||||
|
||||
/**
|
||||
* Note: Only for Conditional Actions
|
||||
*
|
||||
* @return the maximum number of checks before auto-expiring, or -1 if unlimited
|
||||
*/
|
||||
int getMaxChecks();
|
||||
|
||||
Reference in new issue
Block a user