use of com.bergerkiller.generated.net.minecraft.server.level.EntityPlayerHandle in project BKCommonLib by bergerhealer.
the class PortalHandler_1_8 method showEndCredits.
@Override
public void showEndCredits(Player player) {
_ignorePortalEventPlayers.add(player);
_ignorePortalEventPlayersCleanup.start();
EntityPlayerHandle ep = EntityPlayerHandle.fromBukkit(player);
_pta.showEndCredits(HandleConversion.toEntityHandle(player), ep.hasSeenCredits());
ep.setHasSeenCredits(true);
}
use of com.bergerkiller.generated.net.minecraft.server.level.EntityPlayerHandle in project BKCommonLib by bergerhealer.
the class PlayerRespawnPoint method forPlayer.
/**
* Reads the respawn point set for a particular player. Returns {@link #NONE} if none is set.
*
* @param player The player to read the respawn point from
* @return respawn point set for the player
*/
public static PlayerRespawnPoint forPlayer(Player player) {
EntityPlayerHandle handle = EntityPlayerHandle.fromBukkit(player);
World world = handle.getSpawnWorld();
if (world == null) {
return NONE;
}
IntVector3 coord = handle.getSpawnCoord();
if (coord == null) {
return NONE;
}
float angle = handle.getSpawnAngle();
return new PlayerRespawnPoint(world, coord.x, coord.y, coord.z, angle);
}
Aggregations