-
-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2579 from BentoBoxWorld/develop
Version 3.2.0
- Loading branch information
Showing
40 changed files
with
1,245 additions
and
357 deletions.
There are no files selected for viewing
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
39 changes: 39 additions & 0 deletions
39
src/main/java/world/bentobox/bentobox/api/hooks/NPCHook.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,39 @@ | ||
package world.bentobox.bentobox.api.hooks; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import org.bukkit.Chunk; | ||
import org.bukkit.Location; | ||
import org.bukkit.Material; | ||
import org.bukkit.World; | ||
import org.bukkit.configuration.InvalidConfigurationException; | ||
import org.bukkit.util.Vector; | ||
import org.eclipse.jdt.annotation.NonNull; | ||
import org.eclipse.jdt.annotation.Nullable; | ||
|
||
import world.bentobox.bentobox.blueprints.dataobjects.BlueprintEntity; | ||
|
||
/** | ||
* NPC Hooks | ||
* @author tastybento | ||
* @since 3.2.0 | ||
*/ | ||
public abstract class NPCHook extends Hook { | ||
|
||
protected NPCHook(@NonNull String pluginName, @NonNull Material icon) { | ||
super(pluginName, icon); | ||
} | ||
|
||
public abstract boolean spawnNpc(String yaml, Location pos) throws InvalidConfigurationException; | ||
|
||
public abstract Map<? extends Vector, ? extends List<BlueprintEntity>> getNpcsInArea(World world, | ||
List<Vector> vectorsToCopy, @Nullable Vector origin); | ||
|
||
/** | ||
* Remove all NPCs in chunk | ||
* @param chunk chunk | ||
*/ | ||
public abstract void removeNPCsInChunk(Chunk chunk); | ||
|
||
} |
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.