dev.polymodloader.api.event.player
이 페이지는 소스의 Javadoc에서 ./gradlew apiReference로 만든 것입니다. 설명은 코드에 적힌 영어 그대로입니다. 직접 고치지 말고 소스의 주석을 고친 뒤 다시 만드세요.
| 형식 | 종류 | 설명 |
|---|---|---|
LoginCheckListener | 함수형 인터페이스 | Listener for PlayerEvents.LOGIN_CHECK. |
PlayerCopyListener | 함수형 인터페이스 | Listener for PlayerEvents.COPY. |
PlayerEvents | 클래스 | Player connection and respawn events, fired on the server thread of every server kind. |
PlayerJoinedListener | 함수형 인터페이스 | Listener for PlayerEvents.JOINED. |
PlayerLeavingListener | 함수형 인터페이스 | Listener for PlayerEvents.LEAVING. |
PlayerRespawnedListener | 함수형 인터페이스 | Listener for PlayerEvents.RESPAWNED. |
LoginCheckListener
함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface LoginCheckListener
Listener for PlayerEvents.LOGIN_CHECK.
checkLogin(UUID, String)
Optional<String> checkLogin(UUID playerId, String playerName)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Returns a reason to refuse the player, shown on their disconnect screen, or empty to let them in. Runs after the game's own ban and whitelist checks passed, before the player exists.
| 인자 | 타입 | 설명 |
|---|---|---|
playerId | UUID | — |
playerName | String | — |
반환 Optional<String>
PlayerCopyListener
함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface PlayerCopyListener
Listener for PlayerEvents.COPY.
onPlayerCopy(PlayerView, PlayerView, boolean)
void onPlayerCopy(PlayerView oldPlayer, PlayerView newPlayer, boolean returnedFromEnd)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Called on the server thread while the game builds the new player object for a respawn, after the game copied what it keeps (inventory with keepInventory, everything when returning from the End) and after Poly Mod Loader copied EntityDataKey data. Copy anything else the mod keeps per player object here.
| 인자 | 타입 | 설명 |
|---|---|---|
oldPlayer | PlayerView | the player object being replaced; valid only during the call |
newPlayer | PlayerView | the new player object, not yet in a world; valid only during the call |
returnedFromEnd | boolean | true when leaving the End (alive), false after death |
PlayerEvents
클래스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public final class PlayerEvents
Player connection and respawn events, fired on the server thread of every server kind.
| 상수·필드 | 타입 | 설명 |
|---|---|---|
COPY | EventKey<PlayerCopyListener> | The game is building the new player object for a respawn (after death or when leaving the End) and copying data from the old one. Fabric API: ServerPlayerEvents.COPY_FROM; NeoForge: PlayerEvent.Clone. |
RESPAWNED | EventKey<PlayerRespawnedListener> | A player respawned and the new player object is in its world. Fabric API: ServerPlayerEvents.AFTER_RESPAWN; NeoForge: PlayerEvent.PlayerRespawnEvent. |
JOINED | EventKey<PlayerJoinedListener> | A player finished joining the server and is in the world. |
LEAVING | EventKey<PlayerLeavingListener> | A player is about to be removed from the server (disconnect or kick). |
LOGIN_CHECK | EventKey<LoginCheckListener> | A player is logging in (after authentication and the game's ban, whitelist, and player-limit checks); any listener may refuse them. Fired on the server thread. |
PlayerJoinedListener
함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface PlayerJoinedListener
Listener for PlayerEvents.JOINED.
onPlayerJoined(PlayerView)
void onPlayerJoined(PlayerView player)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Called on the server thread; player is valid only during the call.
| 인자 | 타입 | 설명 |
|---|---|---|
player | PlayerView | — |
PlayerLeavingListener
함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface PlayerLeavingListener
Listener for PlayerEvents.LEAVING.
onPlayerLeaving(PlayerView)
void onPlayerLeaving(PlayerView player)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Called on the server thread before the player is removed; player is valid only during the call.
| 인자 | 타입 | 설명 |
|---|---|---|
player | PlayerView | — |
PlayerRespawnedListener
함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface PlayerRespawnedListener
Listener for PlayerEvents.RESPAWNED.
onPlayerRespawned(PlayerView, boolean)
void onPlayerRespawned(PlayerView player, boolean returnedFromEnd)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Called on the server thread after the new player object was placed in its world.
| 인자 | 타입 | 설명 |
|---|---|---|
player | PlayerView | the new player; valid only during the call |
returnedFromEnd | boolean | true when the player left the End through the exit portal (alive), false after death |