Package org.spongepowered.api
Interface Engine
-
- All Superinterfaces:
RegistryHolder
- All Known Subinterfaces:
Client
,LocalServer
,Server
public interface Engine extends RegistryHolder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CauseStackManager
causeStackManager()
Gets theCauseStackManager
for handling the current event cause stack and context information.Game
game()
Gets theGame
that launched this engine;boolean
onMainThread()
Checks if thecurrent thread
is the main thread of the engine.PackRepository
packRepository()
CompletableFuture<Void>
reloadResources()
ResourceManager
resourceManager()
Scheduler
scheduler()
-
Methods inherited from interface org.spongepowered.api.registry.RegistryHolder
findRegistry, registry, streamRegistries
-
-
-
-
Method Detail
-
causeStackManager
CauseStackManager causeStackManager()
Gets theCauseStackManager
for handling the current event cause stack and context information.- Returns:
- The cause stack manager
-
packRepository
PackRepository packRepository()
- Returns:
- The
pack repository
-
resourceManager
ResourceManager resourceManager()
- Returns:
- The
resource manager
-
scheduler
Scheduler scheduler()
- Returns:
- The sync scheduler
-
onMainThread
boolean onMainThread()
Checks if thecurrent thread
is the main thread of the engine.- Returns:
true
if main thread,false
if not
-
reloadResources
CompletableFuture<Void> reloadResources()
Rediscovers allresources
within allpack's
contents
.On the server, the future will always be completed.
- Returns:
- A future that completes when reloading is complete
-
-