geforkt von SteamWar/BungeeCore
@Player Autocomplete
Dieser Commit ist enthalten in:
Ursprung
92ea2fa5d0
Commit
e07b7362d5
@ -163,7 +163,7 @@ public class ChatListener extends BasicListener {
|
|||||||
for(ProxiedPlayer target : ProxyServer.getInstance().getPlayers()){
|
for(ProxiedPlayer target : ProxyServer.getInstance().getPlayers()){
|
||||||
Subserver targetServer = Subserver.getSubserver(target);
|
Subserver targetServer = Subserver.getSubserver(target);
|
||||||
if(targetServer == null || targetServer.getType() != Servertype.ARENA || targetServer.getServer() != target.getServer().getInfo()){
|
if(targetServer == null || targetServer.getType() != Servertype.ARENA || targetServer.getServer() != target.getServer().getInfo()){
|
||||||
if(msg.contains("@" + target.getName())) {
|
if(msg.toLowerCase().contains("@" + target.getName().toLowerCase())) {
|
||||||
BungeeCore.send(target, ChatMessageType.CHAT, msg.replace("@" + target.getName(), "§e@" + target.getName() + chatcolor));
|
BungeeCore.send(target, ChatMessageType.CHAT, msg.replace("@" + target.getName(), "§e@" + target.getName() + chatcolor));
|
||||||
}else {
|
}else {
|
||||||
BungeeCore.send(target, ChatMessageType.CHAT, msg);
|
BungeeCore.send(target, ChatMessageType.CHAT, msg);
|
||||||
@ -208,7 +208,7 @@ public class ChatListener extends BasicListener {
|
|||||||
else
|
else
|
||||||
last = "";
|
last = "";
|
||||||
for(ProxiedPlayer player : ProxyServer.getInstance().getPlayers()){
|
for(ProxiedPlayer player : ProxyServer.getInstance().getPlayers()){
|
||||||
String name = player.getName();
|
String name = player.getName().replace("@", "");
|
||||||
if(last.isEmpty() || name.startsWith(last)){
|
if(last.isEmpty() || name.startsWith(last)){
|
||||||
suggestions.add(name);
|
suggestions.add(name);
|
||||||
}
|
}
|
||||||
@ -221,6 +221,7 @@ public class ChatListener extends BasicListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren