dev.polymodloader.api.event.server
이 페이지는 소스의 Javadoc에서 ./gradlew apiReference로 만든 것입니다. 설명은 코드에 적힌 영어 그대로입니다. 직접 고치지 말고 소스의 주석을 고친 뒤 다시 만드세요.
| 형식 | 종류 | 설명 |
|---|---|---|
ServerEvents | 클래스 | Server lifecycle events. |
ServerStartedListener | 함수형 인터페이스 | Called on the server thread once, before the server's first tick. |
ServerStartingListener | 함수형 인터페이스 | Called on the server thread once per server start, after registries and data packs are loaded and before the worlds are created. |
ServerStoppedListener | 함수형 인터페이스 | Called on the server thread once when the server has stopped: players were saved and removed, worlds were saved and closed. |
ServerStoppingListener | 함수형 인터페이스 | Called on the server thread when the server begins to stop, before worlds are saved. |
ServerTickListener | 함수형 인터페이스 | Called on the server thread at the start of every server tick (20 times per second). |
ServerView | 인터페이스 | Read-only view of a running Minecraft server (dedicated, integrated, or game test). |
ServerEvents
클래스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public final class ServerEvents
Server lifecycle events. Fired for dedicated, integrated (single player), and game test servers, in this order: STARTING, STARTED, TICK (repeatedly), STOPPING, STOPPED. Fabric API: ServerLifecycleEvents; NeoForge: ServerStartingEvent and its siblings.
| 상수·필드 | 타입 | 설명 |
|---|---|---|
STARTING | EventKey<ServerStartingListener> | The server is starting: registries and data packs are loaded, worlds are about to be created. |
STARTED | EventKey<ServerStartedListener> | The server finished starting and is about to process its first tick. |
TICK | EventKey<ServerTickListener> | A server tick begins. |
STOPPING | EventKey<ServerStoppingListener> | The server begins to stop. |
STOPPED | EventKey<ServerStoppedListener> | The server stopped: players and worlds were saved and the worlds closed. |
ServerStartedListener
함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface ServerStartedListener
Called on the server thread once, before the server's first tick.
onServerStarted(ServerView)
void onServerStarted(ServerView server)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Handles the event.
| 인자 | 타입 | 설명 |
|---|---|---|
server | ServerView | — |
ServerStartingListener
함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface ServerStartingListener
Called on the server thread once per server start, after registries and data packs are loaded and before the worlds are created. Worlds are not available yet; use WorldEvents.LOADED for them.
onServerStarting(ServerView)
void onServerStarting(ServerView server)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Handles the event.
| 인자 | 타입 | 설명 |
|---|---|---|
server | ServerView | — |
ServerStoppedListener
함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface ServerStoppedListener
Called on the server thread once when the server has stopped: players were saved and removed, worlds were saved and closed. A good moment to release what the mod kept for this server; on the client the next single-player world starts a new server.
onServerStopped(ServerView)
void onServerStopped(ServerView server)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Handles the event.
| 인자 | 타입 | 설명 |
|---|---|---|
server | ServerView | — |
ServerStoppingListener
함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface ServerStoppingListener
Called on the server thread when the server begins to stop, before worlds are saved.
onServerStopping(ServerView)
void onServerStopping(ServerView server)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Handles the event.
| 인자 | 타입 | 설명 |
|---|---|---|
server | ServerView | — |
ServerTickListener
함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface ServerTickListener
Called on the server thread at the start of every server tick (20 times per second). Keep it fast.
onServerTick(ServerView)
void onServerTick(ServerView server)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Handles the event.
| 인자 | 타입 | 설명 |
|---|---|---|
server | ServerView | — |
ServerView
인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface ServerView
Read-only view of a running Minecraft server (dedicated, integrated, or game test). Only valid while the listener that received it runs; do not keep it.
tickCount()
int tickCount()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Ticks processed so far.
반환 int
playerCount()
int playerCount()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Players currently connected.
반환 int
motd()
String motd()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Message of the day shown in the server list.
반환 String
dedicated()
boolean dedicated()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Whether Minecraft reports this server as dedicated. The client's integrated server and Mojang's game test server report false.
반환 boolean