mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-17 21:02:20 +01:00
Added javadoc tags and NonNull/Nullable in GameModeAddon
This commit is contained in:
parent
7d08a0db5a
commit
f381301b25
@ -5,6 +5,9 @@ import java.util.Optional;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
|
|
||||||
|
import org.eclipse.jdt.annotation.NonNull;
|
||||||
|
import org.eclipse.jdt.annotation.Nullable;
|
||||||
|
|
||||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||||
import world.bentobox.bentobox.api.configuration.WorldSettings;
|
import world.bentobox.bentobox.api.configuration.WorldSettings;
|
||||||
import world.bentobox.bentobox.util.Util;
|
import world.bentobox.bentobox.util.Util;
|
||||||
@ -12,21 +15,26 @@ import world.bentobox.bentobox.util.Util;
|
|||||||
/**
|
/**
|
||||||
* Defines the addon as a game mode.
|
* Defines the addon as a game mode.
|
||||||
* A game mode creates worlds, registers world settings and has schems in a jar folder.
|
* A game mode creates worlds, registers world settings and has schems in a jar folder.
|
||||||
* @author tastybento, Postlovitch
|
* @author tastybento, Poslovitch
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public abstract class GameModeAddon extends Addon {
|
public abstract class GameModeAddon extends Addon {
|
||||||
|
|
||||||
protected World islandWorld;
|
protected World islandWorld;
|
||||||
|
@Nullable
|
||||||
protected World netherWorld;
|
protected World netherWorld;
|
||||||
|
@Nullable
|
||||||
protected World endWorld;
|
protected World endWorld;
|
||||||
/**
|
/**
|
||||||
* Main player command. Addons can use this hook to into this command.
|
* Main player command. Addons can use this hook to into this command.
|
||||||
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
|
@Nullable
|
||||||
protected CompositeCommand playerCommand;
|
protected CompositeCommand playerCommand;
|
||||||
/**
|
/**
|
||||||
* Main admin command. Addons can use this hook to into this command.
|
* Main admin command. Addons can use this hook to into this command.
|
||||||
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
|
@Nullable
|
||||||
protected CompositeCommand adminCommand;
|
protected CompositeCommand adminCommand;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -61,6 +69,7 @@ public abstract class GameModeAddon extends Addon {
|
|||||||
/**
|
/**
|
||||||
* @return nether world, or null if it does not exist
|
* @return nether world, or null if it does not exist
|
||||||
*/
|
*/
|
||||||
|
@Nullable
|
||||||
public World getNetherWorld() {
|
public World getNetherWorld() {
|
||||||
return netherWorld;
|
return netherWorld;
|
||||||
}
|
}
|
||||||
@ -68,20 +77,25 @@ public abstract class GameModeAddon extends Addon {
|
|||||||
/**
|
/**
|
||||||
* @return end world, or null if it does not exist
|
* @return end world, or null if it does not exist
|
||||||
*/
|
*/
|
||||||
|
@Nullable
|
||||||
public World getEndWorld() {
|
public World getEndWorld() {
|
||||||
return endWorld;
|
return endWorld;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the main player command for this Game Mode Addon
|
* @return the main player command for this Game Mode Addon
|
||||||
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
|
@NonNull
|
||||||
public Optional<CompositeCommand> getPlayerCommand() {
|
public Optional<CompositeCommand> getPlayerCommand() {
|
||||||
return Optional.ofNullable(playerCommand);
|
return Optional.ofNullable(playerCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the main admin command for this Game Mode Addon
|
* @return the main admin command for this Game Mode Addon
|
||||||
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
|
@NonNull
|
||||||
public Optional<CompositeCommand> getAdminCommand() {
|
public Optional<CompositeCommand> getAdminCommand() {
|
||||||
return Optional.ofNullable(adminCommand);
|
return Optional.ofNullable(adminCommand);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user