mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 15:00:13 +01:00
Add Player interface
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
51ec422254
commit
94c43fd0fa
2 changed files with 29 additions and 0 deletions
22
paper-api/src/org/bukkit/Player.java
Normal file
22
paper-api/src/org/bukkit/Player.java
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
package org.bukkit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a player, connected or not
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface Player {
|
||||||
|
/**
|
||||||
|
* Returns the name of this player
|
||||||
|
*
|
||||||
|
* @return Player name
|
||||||
|
*/
|
||||||
|
public String getName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if this player is currently online
|
||||||
|
*
|
||||||
|
* @return true if they are online
|
||||||
|
*/
|
||||||
|
public boolean isOnline();
|
||||||
|
}
|
|
@ -18,4 +18,11 @@ public interface Server {
|
||||||
* @return version of this server implementation
|
* @return version of this server implementation
|
||||||
*/
|
*/
|
||||||
public String getVersion();
|
public String getVersion();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a list of all currently logged in players
|
||||||
|
*
|
||||||
|
* @return An array of Players that are currently online
|
||||||
|
*/
|
||||||
|
public Player[] getOnlinePlayers();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue