mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-26 20:16:22 +01:00
Add javadocs
This commit is contained in:
parent
8fd9dfa6e0
commit
31f517c436
@ -3,24 +3,74 @@ package com.craftaro.ultimatestacker.api.stack.spawner;
|
||||
import com.craftaro.core.database.Data;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Block;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Represents a manager for SpawnerStacks
|
||||
*/
|
||||
public interface SpawnerStackManager {
|
||||
|
||||
/**
|
||||
* Add a list of spawners to the manager
|
||||
* @param spawners The list of spawners to add
|
||||
*/
|
||||
void addSpawners(List<SpawnerStack> spawners);
|
||||
|
||||
/**
|
||||
* Add a spawner to the manager
|
||||
* @param spawnerStack The spawner to add
|
||||
* @return The added spawner
|
||||
*/
|
||||
SpawnerStack addSpawner(SpawnerStack spawnerStack);
|
||||
|
||||
/**
|
||||
* Get the spawner for the given block
|
||||
* @param block The block to get the spawner for
|
||||
* @return The spawner for the given block
|
||||
*/
|
||||
SpawnerStack getSpawner(Block block);
|
||||
|
||||
/**
|
||||
* Get the spawner for the given location
|
||||
* @param location The location to get the spawner for
|
||||
* @return The spawner for the given location
|
||||
*/
|
||||
SpawnerStack getSpawner(Location location);
|
||||
|
||||
/**
|
||||
* Check if the given block is a SpawnerStack
|
||||
* @param block The block to check
|
||||
* @return True if the given block is a SpawnerStack
|
||||
*/
|
||||
boolean isSpawner(Block block);
|
||||
|
||||
/**
|
||||
* Check if the given block is a SpawnerStack
|
||||
* @param location The block to check
|
||||
* @return True if the given block is a SpawnerStack
|
||||
*/
|
||||
boolean isSpawner(Location location);
|
||||
|
||||
SpawnerStack removeSpawner(Location location);
|
||||
/**
|
||||
* Remove a spawner from the manager
|
||||
* @param location The location of the spawner to remove
|
||||
* @return The removed spawner
|
||||
*/
|
||||
@Nullable SpawnerStack removeSpawner(Location location);
|
||||
|
||||
Collection<SpawnerStack> getStacks();
|
||||
/**
|
||||
* Get all the SpawnerStack in the manager
|
||||
* @return All SpawnerStack in the manager
|
||||
*/
|
||||
@NotNull Collection<SpawnerStack> getStacks();
|
||||
|
||||
Collection<Data> getStacksData();
|
||||
/**
|
||||
* Get all the SpawnerStack as Data in the manager
|
||||
* @return All SpawnerStack as Data in the manager
|
||||
*/
|
||||
@NotNull Collection<Data> getStacksData();
|
||||
}
|
||||
|
@ -2,15 +2,38 @@ package com.craftaro.ultimatestacker.api.utils;
|
||||
|
||||
import org.bukkit.Location;
|
||||
|
||||
/**
|
||||
* Represents an object which can have a hologram
|
||||
*/
|
||||
public interface Hologramable {
|
||||
|
||||
Location getLocation();
|
||||
|
||||
/**
|
||||
* Gets the name of the hologram
|
||||
* @return The name of the hologram
|
||||
*/
|
||||
String getHologramName();
|
||||
|
||||
/**
|
||||
* Checks if the hologram is enabled
|
||||
* @return True if the hologram is enabled, otherwise false
|
||||
*/
|
||||
boolean areHologramsEnabled();
|
||||
|
||||
/**
|
||||
* Checks if the hologram holder is valid
|
||||
* @return True if the hologram holder is valid, otherwise false
|
||||
*/
|
||||
boolean isValid();
|
||||
|
||||
/**
|
||||
* Gets the id of the hologram
|
||||
* @return The id of the hologram
|
||||
*/
|
||||
String getHologramId();
|
||||
|
||||
/**
|
||||
* Gets the location of the stack which has the hologram
|
||||
* @return The location
|
||||
*/
|
||||
Location getLocation();
|
||||
}
|
||||
|
@ -1,15 +1,45 @@
|
||||
package com.craftaro.ultimatestacker.api.utils;
|
||||
|
||||
import org.bukkit.Location;
|
||||
|
||||
/**
|
||||
* Represents an object that can be stacked
|
||||
*/
|
||||
public interface Stackable {
|
||||
|
||||
/**
|
||||
* Get the amount of the stack
|
||||
* @return The amount of the stack
|
||||
*/
|
||||
int getAmount();
|
||||
|
||||
/**
|
||||
* Set the amount of the stack
|
||||
* @param amount The new amount of the stack
|
||||
*/
|
||||
void setAmount(int amount);
|
||||
|
||||
/**
|
||||
* Add to the amount of the stack
|
||||
* @param amount The amount to add to the stack
|
||||
*/
|
||||
void add(int amount);
|
||||
|
||||
/**
|
||||
* Take from the amount of the stack
|
||||
* @param amount The amount to take from the stack
|
||||
*/
|
||||
void take(int amount);
|
||||
|
||||
/**
|
||||
* Get the location of the stack
|
||||
* @return The location of the stack
|
||||
*/
|
||||
Location getLocation();
|
||||
|
||||
/**
|
||||
* Check if the stack is valid
|
||||
* @return True if the stack is valid
|
||||
*/
|
||||
boolean isValid();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user