Package net.minestom.server.thread
Interface ThreadProvider<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Defines how often chunks thread should be refreshed. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> @NotNull ThreadProvider
<T> counter()
int
findThread
(T partition) Performs a server tick for all chunks based on their linked thread.default @NotNull ThreadProvider.RefreshType
Defines how often chunks thread should be updated.
-
Method Details
-
counter
-
findThread
Performs a server tick for all chunks based on their linked thread.- Parameters:
partition
- the partition
-
refreshType
Defines how often chunks thread should be updated.- Returns:
- the refresh type
-