Package be.seeseemelk.mockbukkit.entity
Class PlayerMockFactory
java.lang.Object
be.seeseemelk.mockbukkit.entity.PlayerMockFactory
Used to construct random
PlayerMocks and OfflinePlayerMocks.-
Constructor Summary
ConstructorsConstructorDescriptionPlayerMockFactory(@NotNull ServerMock server) Constructs a newPlayerMockFactoryfor the providedServerMock. -
Method Summary
Modifier and TypeMethodDescription@NotNull OfflinePlayerMockcreateOfflinePlayer(@NotNull UUID uuid) Create a randomOfflinePlayerMockobject with a unique name and the given id.@NotNull OfflinePlayerMockCreate a randomOfflinePlayerMockobject with a unique name.@NotNull PlayerMockCreate a random player mock object with a unique name.
-
Constructor Details
-
PlayerMockFactory
Constructs a newPlayerMockFactoryfor the providedServerMock.- Parameters:
server- The server to create the factory for.
-
-
Method Details
-
createRandomPlayer
Create a random player mock object with a unique name.- Returns:
- A newly created player mock object.
-
createRandomOfflinePlayer
Create a randomOfflinePlayerMockobject with a unique name. It will not however contain a UUID.- Returns:
- A newly created player mock object.
-
createOfflinePlayer
Create a randomOfflinePlayerMockobject with a unique name and the given id.- Parameters:
uuid- the id of the offline player- Returns:
- A newly created offline player mock object.
-