-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e7e6a5c
commit 49ec543
Showing
70 changed files
with
892 additions
and
400 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
api/src/main/java/kor/toxicity/questadder/api/concurrent/LazyRunnable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package kor.toxicity.questadder.api.concurrent; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
public interface LazyRunnable { | ||
LazyRunnable EMPTY = new LazyRunnable() { | ||
@Override | ||
public long getDelay() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public void run() { | ||
|
||
} | ||
}; | ||
static @NotNull LazyRunnable emptyOf(@NotNull Runnable runnable) { | ||
return new LazyRunnable() { | ||
@Override | ||
public long getDelay() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public void run() { | ||
runnable.run(); | ||
} | ||
}; | ||
} | ||
long getDelay(); | ||
void run(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
api/src/main/java/kor/toxicity/questadder/api/mechanic/IActualNPC.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
package kor.toxicity.questadder.api.mechanic; | ||
|
||
import kor.toxicity.questadder.api.npc.WrappedNPC; | ||
import net.citizensnpcs.api.npc.NPC; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public interface IActualNPC extends DialogSender { | ||
@NotNull NPC toCitizensNPC(); | ||
@NotNull WrappedNPC toUsedNPC(); | ||
@NotNull IQuestNPC toQuestNPC(); | ||
} |
5 changes: 5 additions & 0 deletions
5
api/src/main/java/kor/toxicity/questadder/api/npc/CitizensNPC.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package kor.toxicity.questadder.api.npc; | ||
|
||
public interface CitizensNPC extends WrappedNPC { | ||
int getId(); | ||
} |
7 changes: 7 additions & 0 deletions
7
api/src/main/java/kor/toxicity/questadder/api/npc/FancyNpcsNPC.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package kor.toxicity.questadder.api.npc; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
public interface FancyNpcsNPC extends WrappedNPC { | ||
@NotNull String getId(); | ||
} |
18 changes: 18 additions & 0 deletions
18
api/src/main/java/kor/toxicity/questadder/api/npc/WrappedNPC.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package kor.toxicity.questadder.api.npc; | ||
|
||
import org.bukkit.Location; | ||
import org.bukkit.World; | ||
import org.bukkit.entity.Entity; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.UUID; | ||
|
||
public interface WrappedNPC { | ||
@NotNull UUID getUUID(); | ||
@NotNull Object getHandle(); | ||
@Nullable Location getLocation(); | ||
@Nullable World getWorld(); | ||
float getEyeHeight(); | ||
@Nullable Entity getEntity(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.