mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-08 08:02:13 -07:00
Added OfflinePlayer.getPlayer() for getting the online Player object
By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
@@ -2,6 +2,7 @@ package org.bukkit;
|
|||||||
|
|
||||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||||
import org.bukkit.entity.AnimalTamer;
|
import org.bukkit.entity.AnimalTamer;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.permissions.ServerOperator;
|
import org.bukkit.permissions.ServerOperator;
|
||||||
|
|
||||||
public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable {
|
public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable {
|
||||||
@@ -46,4 +47,14 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
|||||||
* @param value true if whitelisted
|
* @param value true if whitelisted
|
||||||
*/
|
*/
|
||||||
public void setWhitelisted(boolean value);
|
public void setWhitelisted(boolean value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a {@link Player} object that this represents, if there is one
|
||||||
|
* <p>
|
||||||
|
* If the player is online, this will return that player. Otherwise,
|
||||||
|
* it will return null.
|
||||||
|
*
|
||||||
|
* @return Online player
|
||||||
|
*/
|
||||||
|
public Player getPlayer();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user