Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for PlayersContainer in the API
- Loading branch information
1 parent
26b5547
commit dd40235
Showing
5 changed files
with
59 additions
and
24 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
46 changes: 46 additions & 0 deletions
46
API/src/main/java/com/bgsoftware/superiorskyblock/api/player/container/PlayersContainer.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,46 @@ | ||
package com.bgsoftware.superiorskyblock.api.player.container; | ||
|
||
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer; | ||
|
||
import javax.annotation.Nullable; | ||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
public interface PlayersContainer { | ||
|
||
/** | ||
* Get a player by its name. | ||
* | ||
* @param name The name of the player. | ||
*/ | ||
@Nullable | ||
SuperiorPlayer getSuperiorPlayer(String name); | ||
|
||
/** | ||
* Get a player by its uuid. | ||
* | ||
* @param uuid The uuid of the player. | ||
*/ | ||
@Nullable | ||
SuperiorPlayer getSuperiorPlayer(UUID uuid); | ||
|
||
/** | ||
* Get all the players. | ||
*/ | ||
List<SuperiorPlayer> getAllPlayers(); | ||
|
||
/** | ||
* Add a player to the container. | ||
* | ||
* @param superiorPlayer The player to add. | ||
*/ | ||
void addPlayer(SuperiorPlayer superiorPlayer); | ||
|
||
/** | ||
* Remove a player from the container. | ||
* | ||
* @param superiorPlayer The player to remove. | ||
*/ | ||
void removePlayer(SuperiorPlayer superiorPlayer); | ||
|
||
} |
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
1 change: 1 addition & 0 deletions
1
src/main/java/com/bgsoftware/superiorskyblock/player/container/DefaultPlayersContainer.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
23 changes: 0 additions & 23 deletions
23
src/main/java/com/bgsoftware/superiorskyblock/player/container/PlayersContainer.java
This file was deleted.
Oops, something went wrong.