mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 03:59:26 +02:00
changed adding a new message to PlayerParser.chats
simple, working way without if
This commit is contained in:
@@ -15,8 +15,7 @@ public class PlayerParser{
|
|||||||
|
|
||||||
public void setEvent() {
|
public void setEvent() {
|
||||||
Events.on(EventType.PlayerChatEvent.class, e -> {
|
Events.on(EventType.PlayerChatEvent.class, e -> {
|
||||||
if(chats.containsKey(e.player)) chats.get(e.player).add(e.message);
|
chats.get(e.player,Seq::new).add(e.message);
|
||||||
else chats.put(e.player, Seq.with(e.message));
|
|
||||||
writeJson(e.player);
|
writeJson(e.player);
|
||||||
save();
|
save();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user