Interface WorldGuardPlatform
public interface WorldGuardPlatform
A platform for implementing.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPlatformReports
(com.sk89q.worldedit.util.report.ReportList report) Adds reports specific to this platform.void
broadcastNotification
(com.sk89q.worldedit.util.formatting.text.TextComponent component) Notifies all with the worldguard.notify permission.void
broadcastNotification
(String message) Notifies all with the worldguard.notify permission.com.sk89q.worldguard.util.profile.resolver.ProfileService
createProfileService
(com.sk89q.worldguard.util.profile.cache.ProfileCache profileCache) Internal use.Gets the configuration directory.Gets the handler for debug commands.com.sk89q.worldedit.world.gamemode.GameMode
Gets the servers default game mode.Get the global ConfigurationManager.Gets an instance of the matcher, which handles matching worlds, players, colours, etc from strings.Gets the name of the platform.Gets the version of the platform.Gets a RegionContainer.Gets the session manager.default ProtectedRegion
getSpawnProtection
(com.sk89q.worldedit.world.World world) Get a region that encompasses the Vanilla spawn protection for the given world, if applicable.void
load()
Load the platformvoid
notifyFlagContextCreate
(FlagContext.FlagContextBuilder flagContextBuilder) Notifies the platform when a flag context is created.void
stackPlayerInventory
(LocalPlayer localPlayer) Deprecated, for removal: This API element is subject to removal in a future version.void
unload()
Unload the platform
-
Method Details
-
getPlatformName
String getPlatformName()Gets the name of the platform.- Returns:
- The platform name
-
getPlatformVersion
String getPlatformVersion()Gets the version of the platform.- Returns:
- The platform version
-
notifyFlagContextCreate
Notifies the platform when a flag context is created.- Parameters:
flagContextBuilder
- The flag context
-
getGlobalStateManager
ConfigurationManager getGlobalStateManager()Get the global ConfigurationManager. Use this to access global configuration values and per-world configuration values.- Returns:
- The global ConfigurationManager
-
getMatcher
StringMatcher getMatcher()Gets an instance of the matcher, which handles matching worlds, players, colours, etc from strings.- Returns:
- The matcher
-
getSessionManager
SessionManager getSessionManager()Gets the session manager.- Returns:
- The session manager
-
broadcastNotification
Notifies all with the worldguard.notify permission. This will check both superperms and WEPIF, but makes sure WEPIF checks don't result in duplicate notifications- Parameters:
message
- The notification to broadcast
-
broadcastNotification
void broadcastNotification(com.sk89q.worldedit.util.formatting.text.TextComponent component) Notifies all with the worldguard.notify permission. This will check both superperms and WEPIF, but makes sure WEPIF checks don't result in duplicate notifications- Parameters:
component
- The notification to broadcast
-
load
void load()Load the platform -
unload
void unload()Unload the platform -
getRegionContainer
RegionContainer getRegionContainer()Gets a RegionContainer.- Returns:
- The region container
-
getDebugHandler
DebugHandler getDebugHandler()Gets the handler for debug commands.- Returns:
- The debug handler
-
getDefaultGameMode
com.sk89q.worldedit.world.gamemode.GameMode getDefaultGameMode()Gets the servers default game mode.- Returns:
- The default game mode
-
getConfigDir
Path getConfigDir()Gets the configuration directory.- Returns:
- The config directory
-
stackPlayerInventory
Deprecated, for removal: This API element is subject to removal in a future version.Stack the inventory of the player- Parameters:
localPlayer
- The player
-
addPlatformReports
void addPlatformReports(com.sk89q.worldedit.util.report.ReportList report) Adds reports specific to this platform.- Parameters:
report
- The reportlist
-
createProfileService
com.sk89q.worldguard.util.profile.resolver.ProfileService createProfileService(com.sk89q.worldguard.util.profile.cache.ProfileCache profileCache) Internal use. -
getSpawnProtection
Get a region that encompasses the Vanilla spawn protection for the given world, if applicable.- Parameters:
world
- world to check spawn protection of- Returns:
- a region, or null if not applicable
-