Configurable Messages

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2013-06-21 19:21:58 +10:00
parent cabf908e4c
commit 55148a3f2c
4 changed files with 42 additions and 7 deletions

View File

@@ -450,7 +450,7 @@
+ event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(ichatmutablecomponent));
+ } else if (!this.isWhiteListed(gameprofile)) {
+ ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted");
+ event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, CraftChatMessage.fromComponent(ichatmutablecomponent));
+ event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot
+ } else if (this.ipBans.isBanned(socketaddress)) {
+ IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
@@ -467,7 +467,7 @@
+ } else {
+ // return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameprofile) ? IChatBaseComponent.translatable("multiplayer.disconnect.server_full") : null;
+ if (this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameprofile)) {
+ event.disallow(PlayerLoginEvent.Result.KICK_FULL, "The server is full");
+ event.disallow(PlayerLoginEvent.Result.KICK_FULL, org.spigotmc.SpigotConfig.serverFullMessage); // Spigot
+ }
}
+