Package com.ranull.graves
Class Graves
java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
com.ranull.graves.Graves
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor,org.bukkit.command.TabCompleter,org.bukkit.command.TabExecutor,org.bukkit.plugin.Plugin
public class Graves
extends org.bukkit.plugin.java.JavaPlugin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompatibilityMessage(String string) Logs a compatibility-related warning message to the console.voiddebugMessage(String string, int level) Sends a debug message usingDebugManager.voiddumpServerInfo(org.bukkit.command.CommandSender commandSender) @NotNull org.bukkit.configuration.file.FileConfigurationorg.bukkit.configuration.ConfigurationSectionDeprecated.org.bukkit.configuration.ConfigurationSectionDeprecated.Will be removed in4.9.12.1.org.bukkit.configuration.ConfigurationSectionDeprecated.Will be removed in4.9.12.1.org.bukkit.configuration.ConfigurationSectionDeprecated.Will be removed in4.9.12.1.org.bukkit.configuration.ConfigurationSectionDeprecated.Will be removed in4.9.12.1.me.croabeast.scheduler.GlobalSchedulerDeprecated, for removal: This API element is subject to removal in a future version.Will be removed in4.9.12.1.getPermissionList(org.bukkit.entity.Entity entity) Deprecated.Will be removed in4.9.12.1.Returns the plugin's current release type.final FileDeprecated, for removal: This API element is subject to removal in a future version.final intbooleanhasGrantedPermission(String permission, org.bukkit.entity.Player player) Deprecated.Will be removed in4.9.12.1.booleanhasGrantedPermission(String permission, org.bukkit.OfflinePlayer offlinePlayer) Deprecated.Will be removed in4.9.12.1.voidinfoMessage(String string) Logs an informational message to the console.voidintegrationMessage(String string) Logs an integration message to the console as an info message by default.voidintegrationMessage(String string, String messageType) Logs an integration message to the console with the specified message level.booleanbooleanbooleanvoidlogInvalidGraveSite(String grave_uuid, org.bukkit.Location affectedGraveLocation, List<String> invalidationReason) Logs information about a grave that has invalid or incomplete data.voidLogs the full stack trace of an exception to the plugin logger.voidLogs the full stack trace of a throwable to the plugin logger.voidvoidonEnable()voidonLoad()voidvoidreload()voidvoidvoidvoidsetPluginDevelopmentBuild(boolean value) Sets whether this is a development build.voidsetPluginOutdatedBuild(boolean value) Sets whether this build is marked as outdated.voidsetPluginUnknownBuild(boolean value) Sets whether this build's status is unknown.voidtestMessage(String string) Logs a test message to the console.voidvoidupdateMessage(String string) Logs an update message to the console.voidwarningMessage(String string) Logs a warning message to the console with a "Warning" prefix.Methods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onTabComplete, saveConfig, saveResource, setEnabled, setNaggable, toStringMethods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCode
-
Constructor Details
-
Graves
public Graves()
-
-
Method Details
-
onLoad
public void onLoad()- Specified by:
onLoadin interfaceorg.bukkit.plugin.Plugin- Overrides:
onLoadin classorg.bukkit.plugin.java.JavaPlugin
-
onEnable
public void onEnable()- Specified by:
onEnablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onEnablein classorg.bukkit.plugin.java.JavaPlugin
-
onDisable
public void onDisable()- Specified by:
onDisablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onDisablein classorg.bukkit.plugin.java.JavaPlugin
-
saveDefaultConfig
public void saveDefaultConfig()- Specified by:
saveDefaultConfigin interfaceorg.bukkit.plugin.Plugin- Overrides:
saveDefaultConfigin classorg.bukkit.plugin.java.JavaPlugin
-
reloadConfig
public void reloadConfig()- Specified by:
reloadConfigin interfaceorg.bukkit.plugin.Plugin- Overrides:
reloadConfigin classorg.bukkit.plugin.java.JavaPlugin
-
getConfig
@NotNull public @NotNull org.bukkit.configuration.file.FileConfiguration getConfig()- Specified by:
getConfigin interfaceorg.bukkit.plugin.Plugin- Overrides:
getConfigin classorg.bukkit.plugin.java.JavaPlugin
-
reload
public void reload() -
saveTextFiles
public void saveTextFiles() -
registerListeners
public void registerListeners() -
unregisterListeners
public void unregisterListeners() -
debugMessage
Sends a debug message usingDebugManager.- Parameters:
string- the messagelevel- 0=Nothing, 1=info, 2=warnings
-
warningMessage
Logs a warning message to the console with a "Warning" prefix.- Parameters:
string- the message to log
-
compatibilityMessage
Logs a compatibility-related warning message to the console.- Parameters:
string- the message to log
-
infoMessage
Logs an informational message to the console.- Parameters:
string- the message to log
-
testMessage
Logs a test message to the console. Used for internal/debug purposes.- Parameters:
string- the message to log
-
updateMessage
Logs an update message to the console.- Parameters:
string- the message to log
-
integrationMessage
Logs an integration message to the console as an info message by default.- Parameters:
string- the message to log
-
integrationMessage
Logs an integration message to the console with the specified message level.- Parameters:
string- the message to logmessageType- the type of message: "info", "warn", or "severe"
-
dumpServerInfo
public void dumpServerInfo(org.bukkit.command.CommandSender commandSender) -
getVersionManager
- Returns:
- the
VersionManagerresponsible for handling Minecraft version compatibility.
-
getIntegrationManager
- Returns:
- the
IntegrationManagerthat manages third-party plugin integrations.
-
getGraveManager
- Returns:
- the
GraveManagerthat handles the creation and management of graves.
-
getHologramManager
- Returns:
- the
HologramManagerfor displaying holographic text or elements above graves.
-
getBlockManager
- Returns:
- the
BlockManagerthat manages custom block-related functionality.
-
getItemStackManager
- Returns:
- the
ItemStackManagerthat handles item serialization and manipulation.
-
getEntityDataManager
- Returns:
- the
EntityDataManagerused for storing and retrieving entity-specific data.
-
getCacheManager
- Returns:
- the
CacheManagerresponsible for caching frequently accessed data.
-
getDataManager
- Returns:
- the
DataManagerthat manages persistent plugin data and file I/O.
-
getImportManager
- Returns:
- the
ImportManagerused for importing data from other plugins or older formats.
-
getGUIManager
- Returns:
- the
GUIManagerthat handles graphical user interfaces shown to players.
-
getRecipeManager
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- the
RecipeManagerresponsible for managing custom recipes.
-
getLocationManager
- Returns:
- the
LocationManagerthat handles location serialization and retrieval.
-
getEntityManager
- Returns:
- the
EntityManagerfor managing in-game entities related to graves.
-
getParticleManager
- Returns:
- the
ParticleManagerthat manages particle effects used by the plugin.
-
getDebugManager
- Returns:
- the
DebugManagerthat manages debugging used by the plugin.
-
getPermissionManager
- Returns:
- the
PermissionManagerthat manages permission handling used by this plugin.
-
getConfigManager
- Returns:
- the
ConfigManagerthat manages Configuration used by this plugin.
-
getChunkManager
- Returns:
- the
ChunkManagerthat manages Chunks used by this plugin.
-
getSchedulerManager
- Returns:
- the
SchedulerManagerthat manages Scheduling used by this plugin.
-
getCompatibility
- Returns:
- the
Compatibilityhandler that ensures functionality across Minecraft versions and server platforms.
-
getGravesXScheduler
@Deprecated(forRemoval=true) @ScheduledForRemoval(inVersion="4.9.12.1") public me.croabeast.scheduler.GlobalScheduler getGravesXScheduler()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- the
GlobalSchedulerused for running asynchronous or scheduled plugin tasks.
-
getPluginReleaseType
Returns the plugin's current release type.- Returns:
- a string indicating whether the build is Development, Outdated, Unknown, or Production.
-
getConfig
@Deprecated(since="4.9.10.1") @ScheduledForRemoval(inVersion="4.9.12.1") public org.bukkit.configuration.ConfigurationSection getConfig(String config, Grave grave) Deprecated.Will be removed in4.9.12.1. UsegetConfigManager()ConfigManager.getConfigSection(String, Grave)instead.Gets a configuration section based on a specific grave.- Parameters:
config- the config key.grave- the grave instance.- Returns:
- the matching configuration section, or default if none match.
-
getConfig
@Deprecated(since="4.9.10.1") @ScheduledForRemoval(inVersion="4.9.12.1") public org.bukkit.configuration.ConfigurationSection getConfig(String config, List<Grave> graveList) Deprecated.Will be removed in4.9.12.1. UsegetConfigManager()ConfigManager.getConfigSection(String, List)instead.Gets a configuration section for a list of graves. Returns the first matching config found, or the default if none match.- Parameters:
config- the config key.graveList- the list of graves.- Returns:
- the matching configuration section, or default if none match.
-
getConfig
@Deprecated(since="4.9.10.1") @ScheduledForRemoval(inVersion="4.9.12.1") public org.bukkit.configuration.ConfigurationSection getConfig(String config, org.bukkit.entity.Entity entity) Deprecated.Will be removed in4.9.12.1. UsegetConfigManager()ConfigManager.getConfigSection(String, Entity)instead.Gets a configuration section based on a specific entity.- Parameters:
config- the config key.entity- the entity.- Returns:
- the matching configuration section, or default if none match.
-
getConfig
@Deprecated(since="4.9.10.1") @ScheduledForRemoval(inVersion="4.9.12.1") public org.bukkit.configuration.ConfigurationSection getConfig(String config, org.bukkit.entity.Entity entity, List<String> permissionList) Deprecated.Will be removed in4.9.12.1. UsegetConfigManager()ConfigManager.getConfigSection(String, Entity, List)instead.Gets a configuration section based on a specific entity and its permission list.- Parameters:
config- the config key.entity- the entity.permissionList- the permissions associated with the entity.- Returns:
- the matching configuration section, or default if none match.
-
getConfig
@Deprecated(since="4.9.10.1") @ScheduledForRemoval(inVersion="4.9.12.1") public org.bukkit.configuration.ConfigurationSection getConfig(String config, org.bukkit.entity.EntityType entityType, List<String> permissionList) Deprecated.Will be removed in4.9.12.1. UsegetConfigManager()ConfigManager.getConfigSection(String, EntityType, java.util.List)instead.Resolves the most appropriate configuration section based on entity type and permissions.- Parameters:
config- the config key.entityType- the type of entity.permissionList- a list of permissions to prioritize.- Returns:
- the best matching configuration section.
-
getPermissionList
@Deprecated(since="4.9.10.1") @ScheduledForRemoval(inVersion="4.9.12.1") public List<String> getPermissionList(org.bukkit.entity.Entity entity) Deprecated.Builds a sorted list of permission keys for a given entity (player).- Parameters:
entity- the entity (usually a Player).- Returns:
- a sorted list of permission keys that match configuration sections.
-
getPluginsFolder
- Returns:
- the parent folder where all plugins are stored.
-
getVersion
- Returns:
- the current version of the Graves plugin from plugin.yml.
-
getLatestVersion
- Returns:
- the latest available version from Spigot update checking.
-
getSpigotID
public final int getSpigotID()- Returns:
- the Spigot plugin resource ID used for update checking.
-
logStackTrace
Logs the full stack trace of an exception to the plugin logger.- Parameters:
e- the exception to log.
-
logStackTrace
Logs the full stack trace of a throwable to the plugin logger.- Parameters:
t- the throwable to log.
-
getModuleManager
-
logInvalidGraveSite
public void logInvalidGraveSite(String grave_uuid, org.bukkit.Location affectedGraveLocation, List<String> invalidationReason) Logs information about a grave that has invalid or incomplete data.- Parameters:
grave_uuid- the UUID of the affected grave.affectedGraveLocation- the location of the grave.invalidationReason- reasons the grave is considered invalid.
-
hasGrantedPermission
@Deprecated(since="4.9.10.1") @ScheduledForRemoval(inVersion="4.9.12.1") public boolean hasGrantedPermission(String permission, org.bukkit.entity.Player player) Deprecated.Will be removed in4.9.12.1. UsegetPermissionManager()PermissionManager.hasGrantedPermission(String, Player)instead.Checks whether the given player has been granted the specified permission.- Parameters:
permission- the permission to checkplayer- the player whose permissions are being checked- Returns:
trueif the player has the permission, otherwisefalse
-
hasGrantedPermission
@Deprecated(since="4.9.10.1") @ScheduledForRemoval(inVersion="4.9.12.1") public boolean hasGrantedPermission(String permission, org.bukkit.OfflinePlayer offlinePlayer) Deprecated.Will be removed in4.9.12.1. UsegetPermissionManager()PermissionManager.hasGrantedPermission(String, OfflinePlayer)instead.Checks whether the given offline player has been granted the specified permission.- Parameters:
permission- the permission to checkofflinePlayer- the offline player whose permissions are being checked- Returns:
trueif the offline player has the permission, otherwisefalse
-
isPluginDevelopmentBuild
public boolean isPluginDevelopmentBuild()- Returns:
- true if this is a development build.
-
isPluginOutdatedBuild
public boolean isPluginOutdatedBuild()- Returns:
- true if this build is marked as outdated.
-
isPluginUnknownBuild
public boolean isPluginUnknownBuild()- Returns:
- true if this build's status is unknown.
-
setPluginDevelopmentBuild
public void setPluginDevelopmentBuild(boolean value) Sets whether this is a development build.- Parameters:
value- true for development build
-
setPluginOutdatedBuild
public void setPluginOutdatedBuild(boolean value) Sets whether this build is marked as outdated.- Parameters:
value- true for outdated build
-
setPluginUnknownBuild
public void setPluginUnknownBuild(boolean value) Sets whether this build's status is unknown.- Parameters:
value- true for unknown build
-
4.9.12.1.