NotificationManager.java
net.minecraft.server.notifications.NotificationManager
信息
- 全限定名:net.minecraft.server.notifications.NotificationManager
- 类型:public class
- 包:net.minecraft.server.notifications
- 源码路径:src/main/java/net/minecraft/server/notifications/NotificationManager.java
- 起始行号:L12
- 实现:NotificationService
- 职责:
TODO
字段/常量
notificationServices- 类型:
List<NotificationService> - 修饰符:
private final - 源码定位:
L13 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
- 无
方法
下面的方法块按源码顺序生成。
public void registerService(NotificationService notificationService) @ L15
- 方法名:registerService
- 源码定位:L15
- 返回类型:void
- 修饰符:public
参数:
- notificationService: NotificationService
说明:
TODO
public void playerJoined(ServerPlayer player) @ L19
- 方法名:playerJoined
- 源码定位:L19
- 返回类型:void
- 修饰符:public
参数:
- player: ServerPlayer
说明:
TODO
public void playerLeft(ServerPlayer player) @ L24
- 方法名:playerLeft
- 源码定位:L24
- 返回类型:void
- 修饰符:public
参数:
- player: ServerPlayer
说明:
TODO
public void serverStarted() @ L29
- 方法名:serverStarted
- 源码定位:L29
- 返回类型:void
- 修饰符:public
参数:
- 无
说明:
TODO
public void serverShuttingDown() @ L34
- 方法名:serverShuttingDown
- 源码定位:L34
- 返回类型:void
- 修饰符:public
参数:
- 无
说明:
TODO
public void serverSaveStarted() @ L39
- 方法名:serverSaveStarted
- 源码定位:L39
- 返回类型:void
- 修饰符:public
参数:
- 无
说明:
TODO
public void serverSaveCompleted() @ L44
- 方法名:serverSaveCompleted
- 源码定位:L44
- 返回类型:void
- 修饰符:public
参数:
- 无
说明:
TODO
public void serverActivityOccured() @ L49
- 方法名:serverActivityOccured
- 源码定位:L49
- 返回类型:void
- 修饰符:public
参数:
- 无
说明:
TODO
public void playerOped(ServerOpListEntry operator) @ L54
- 方法名:playerOped
- 源码定位:L54
- 返回类型:void
- 修饰符:public
参数:
- operator: ServerOpListEntry
说明:
TODO
public void playerDeoped(ServerOpListEntry operator) @ L59
- 方法名:playerDeoped
- 源码定位:L59
- 返回类型:void
- 修饰符:public
参数:
- operator: ServerOpListEntry
说明:
TODO
public void playerAddedToAllowlist(NameAndId player) @ L64
- 方法名:playerAddedToAllowlist
- 源码定位:L64
- 返回类型:void
- 修饰符:public
参数:
- player: NameAndId
说明:
TODO
public void playerRemovedFromAllowlist(NameAndId player) @ L69
- 方法名:playerRemovedFromAllowlist
- 源码定位:L69
- 返回类型:void
- 修饰符:public
参数:
- player: NameAndId
说明:
TODO
public void ipBanned(IpBanListEntry ban) @ L74
- 方法名:ipBanned
- 源码定位:L74
- 返回类型:void
- 修饰符:public
参数:
- ban: IpBanListEntry
说明:
TODO
public void ipUnbanned(String ip) @ L79
- 方法名:ipUnbanned
- 源码定位:L79
- 返回类型:void
- 修饰符:public
参数:
- ip: String
说明:
TODO
public void playerBanned(UserBanListEntry ban) @ L84
- 方法名:playerBanned
- 源码定位:L84
- 返回类型:void
- 修饰符:public
参数:
- ban: UserBanListEntry
说明:
TODO
public void playerUnbanned(NameAndId player) @ L89
- 方法名:playerUnbanned
- 源码定位:L89
- 返回类型:void
- 修饰符:public
参数:
- player: NameAndId
说明:
TODO
public <T> void onGameRuleChanged(GameRule<T> gameRule, T value) @ L94
- 方法名:onGameRuleChanged
- 源码定位:L94
- 返回类型:
void - 修饰符:public
参数:
- gameRule: GameRule
- value: T
说明:
TODO
public void statusHeartbeat() @ L99
- 方法名:statusHeartbeat
- 源码定位:L99
- 返回类型:void
- 修饰符:public
参数:
- 无
说明:
TODO
代码
public class NotificationManager implements NotificationService {
private final List<NotificationService> notificationServices = Lists.newArrayList();
public void registerService(NotificationService notificationService) {
this.notificationServices.add(notificationService);
}
@Override
public void playerJoined(ServerPlayer player) {
this.notificationServices.forEach(notificationService -> notificationService.playerJoined(player));
}
@Override
public void playerLeft(ServerPlayer player) {
this.notificationServices.forEach(notificationService -> notificationService.playerLeft(player));
}
@Override
public void serverStarted() {
this.notificationServices.forEach(NotificationService::serverStarted);
}
@Override
public void serverShuttingDown() {
this.notificationServices.forEach(NotificationService::serverShuttingDown);
}
@Override
public void serverSaveStarted() {
this.notificationServices.forEach(NotificationService::serverSaveStarted);
}
@Override
public void serverSaveCompleted() {
this.notificationServices.forEach(NotificationService::serverSaveCompleted);
}
@Override
public void serverActivityOccured() {
this.notificationServices.forEach(NotificationService::serverActivityOccured);
}
@Override
public void playerOped(ServerOpListEntry operator) {
this.notificationServices.forEach(notificationService -> notificationService.playerOped(operator));
}
@Override
public void playerDeoped(ServerOpListEntry operator) {
this.notificationServices.forEach(notificationService -> notificationService.playerDeoped(operator));
}
@Override
public void playerAddedToAllowlist(NameAndId player) {
this.notificationServices.forEach(notificationService -> notificationService.playerAddedToAllowlist(player));
}
@Override
public void playerRemovedFromAllowlist(NameAndId player) {
this.notificationServices.forEach(notificationService -> notificationService.playerRemovedFromAllowlist(player));
}
@Override
public void ipBanned(IpBanListEntry ban) {
this.notificationServices.forEach(notificationService -> notificationService.ipBanned(ban));
}
@Override
public void ipUnbanned(String ip) {
this.notificationServices.forEach(notificationService -> notificationService.ipUnbanned(ip));
}
@Override
public void playerBanned(UserBanListEntry ban) {
this.notificationServices.forEach(notificationService -> notificationService.playerBanned(ban));
}
@Override
public void playerUnbanned(NameAndId player) {
this.notificationServices.forEach(notificationService -> notificationService.playerUnbanned(player));
}
@Override
public <T> void onGameRuleChanged(GameRule<T> gameRule, T value) {
this.notificationServices.forEach(notificationService -> notificationService.onGameRuleChanged(gameRule, value));
}
@Override
public void statusHeartbeat() {
this.notificationServices.forEach(NotificationService::statusHeartbeat);
}
}引用的其他类
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数/字段/实现
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数
- 引用位置: