Finishes the changes for parkour arenas, hopefully

This commit is contained in:
2023-04-15 18:29:58 +02:00
parent 12789980c0
commit 904761ba4e
44 changed files with 1413 additions and 292 deletions

View File

@ -1,5 +1,7 @@
package net.knarcraft.minigames.arena;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.jetbrains.annotations.NotNull;
import java.util.UUID;
@ -9,12 +11,19 @@ import java.util.UUID;
*/
public interface Arena {
/**
* Gets the name of this arena
*
* @return <p>The name of this arena</p>
*/
@NotNull String getArenaName();
/**
* Gets the data stored for this arena
*
* @return <p>The stored data</p>
*/
ArenaData getData();
@NotNull ArenaData getData();
/**
* Gets the id of this arena
@ -44,4 +53,34 @@ public interface Arena {
*/
boolean saveData();
/**
* Gets whether standing on the given block should cause a win
*
* @param block <p>The block to check</p>
* @return <p>True if standing on the block will cause a win</p>
*/
boolean willCauseWin(Block block);
/**
* Gets whether standing on the given block should cause a loss
*
* @param block <p>The block to check</p>
* @return <p>True if standing on the block will cause a loss</p>
*/
boolean willCauseLoss(Block block);
/**
* Gets whether the win location is a solid block
*
* @return <p>True if the location is a solid block</p>
*/
boolean winLocationIsSolid();
/**
* Gets the location of this arena's spawn
*
* @return <p>This arena's spawn location</p>
*/
@NotNull Location getSpawnLocation();
}