Initial commit: LoParkour v1.1.0
This commit is contained in:
commit
aecb03ccf8
120 changed files with 9668 additions and 0 deletions
38
src/main/java/dev/loki/loparkour/mode/Mode.java
Normal file
38
src/main/java/dev/loki/loparkour/mode/Mode.java
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
package dev.loki.loparkour.mode;
|
||||
|
||||
import dev.loki.loparkour.leaderboard.Leaderboard;
|
||||
import dev.efnilite.vilib.inventory.item.Item;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Interface for all modes.
|
||||
* Every registered mode needs to inherit this class, because it needs identifying functions.
|
||||
*/
|
||||
public interface Mode {
|
||||
|
||||
/**
|
||||
* Method that gets called when a mode is clicked in the menu or joined using /parkour join.
|
||||
*
|
||||
* @param player The player.
|
||||
*/
|
||||
void create(Player player);
|
||||
|
||||
/**
|
||||
* @param locale The locale of the menu, used to adjust the name.
|
||||
* @return The item used in menus to show this mode. If this item is null, the mode won't be displayed.
|
||||
*/
|
||||
@Nullable Item getItem(String locale);
|
||||
|
||||
/**
|
||||
* @return The {@link Leaderboard} that belongs to this mode
|
||||
*/
|
||||
@Nullable Leaderboard getLeaderboard();
|
||||
|
||||
/**
|
||||
* @return The internal name used for this mode.
|
||||
*/
|
||||
@NotNull String getName();
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue