-
Notifications
You must be signed in to change notification settings - Fork 2
Developers
Ender edited this page Jul 5, 2023
·
4 revisions
To build the plugin, you need to have Java 11 or higher and Maven installed on your computer. Run the following command in the root directory of the project:
mvn clean package
The .jar file will be in the \universal\target
folder.
EnderSS has an API that allows you to interact with the plugin. The jar of the API is downloadable in the GitHub Releases.
Make sure to add the plugin as a dependency in your project.
The API consists in 4 main objects:
-
SsPlayer
to store data about the player -
PlayersManager
to manage players. Every time a player joins or left, they get register or unregistered in the player manager -
ScreenShareManager
to start o stop controls. -
EnderSS
contains all the method to access the other objects
The abstract class SsPlayer
is extended by SpigotPlayer
and ProxyPlayer
which contains other specific data of the player for that specific platform, like the String lastServer
or byte lastGamemode
.
EnderSS api = EnderSSProvider.getApi();
EnderSS API has 3 events for all the 3 platform:
-
SsStartEvent
- Fired when a control starts -
SsEndEvent
- Fired when a control ends -
SsChatEvent
- Fired when a player writes a message in the private chat. Can be cancelled by the user.
api.getScreenShareManager().startScreenShare(staffUUID, suspectUUID);
SsPlayer ssPlayer = api.getPlayersManager().getPlayer(playerUUID);
return ssPlayer.isStaff();
HashMap<UUD, SsPlayer> stafferMap = api.getPlayersManager().getStaffers();
Set<SsPlayer> staffers = stafferMap.keySet();