forked from toolbox4minecraft/amidst
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduced facade interface PlayerInformationProvider
- Loading branch information
1 parent
cf3f7c7
commit bc895dc
Showing
9 changed files
with
72 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/amidst/mojangapi/file/facade/ImmutablePlayerInformationProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package amidst.mojangapi.file.facade; | ||
|
||
import amidst.documentation.Immutable; | ||
import amidst.documentation.NotNull; | ||
import amidst.mojangapi.world.player.PlayerInformation; | ||
|
||
@Immutable | ||
public class ImmutablePlayerInformationProvider implements PlayerInformationProvider { | ||
private final PlayerInformation playerInformation; | ||
|
||
public ImmutablePlayerInformationProvider(PlayerInformation playerInformation) { | ||
this.playerInformation = playerInformation; | ||
} | ||
|
||
@NotNull | ||
@Override | ||
public PlayerInformation getByPlayerUUID(String playerUUID) { | ||
return playerInformation; | ||
} | ||
|
||
@NotNull | ||
@Override | ||
public PlayerInformation getByPlayerName(String playerName) { | ||
return playerInformation; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/java/amidst/mojangapi/file/facade/PlayerInformationProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package amidst.mojangapi.file.facade; | ||
|
||
import amidst.documentation.NotNull; | ||
import amidst.documentation.ThreadSafe; | ||
import amidst.mojangapi.world.player.PlayerInformation; | ||
|
||
@ThreadSafe | ||
public interface PlayerInformationProvider { | ||
@NotNull | ||
PlayerInformation getByPlayerUUID(String playerUUID); | ||
|
||
@NotNull | ||
PlayerInformation getByPlayerName(String playerName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
src/main/java/amidst/mojangapi/world/player/ImmutablePlayerInformationCache.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
src/main/java/amidst/mojangapi/world/player/PlayerInformationCache.java
This file was deleted.
Oops, something went wrong.