mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-27 09:00:28 +08:00
Removes the last remnants of Player Demographics
This commit is contained in:
parent
84217a7839
commit
28489f07c1
@ -14,19 +14,16 @@ import java.util.UUID;
|
||||
public class ChatInfo extends HandlingInfo {
|
||||
|
||||
private final String nickname;
|
||||
private final String message;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param uuid UUID of the player.
|
||||
* @param nickname Nickname of the player.
|
||||
* @param message Message the player sent.
|
||||
*/
|
||||
public ChatInfo(UUID uuid, String nickname, String message) {
|
||||
public ChatInfo(UUID uuid, String nickname) {
|
||||
super(uuid, InfoType.CHAT, 0L);
|
||||
this.nickname = nickname;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -37,7 +37,8 @@ public class PlanChatListener implements Listener {
|
||||
if (event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Player p = event.getPlayer();
|
||||
handler.addToPool(new ChatInfo(p.getUniqueId(), p.getDisplayName(), event.getMessage()));
|
||||
handler.addToPool(new ChatInfo(p.getUniqueId(), p.getDisplayName()));
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ public class ChatInfoTest {
|
||||
public void testProcessNick() {
|
||||
UserData data = MockUtils.mockUser();
|
||||
String expected = "TestNicknameChatInfo";
|
||||
ChatInfo i = new ChatInfo(data.getUuid(), expected, "im 18 male");
|
||||
ChatInfo i = new ChatInfo(data.getUuid(), expected);
|
||||
assertTrue("Didn't succeed", i.process(data));
|
||||
assertTrue("Didn't add nickname", data.getNicknames().contains(expected));
|
||||
}
|
||||
@ -44,7 +44,7 @@ public class ChatInfoTest {
|
||||
public void testProcessWrongUUID() {
|
||||
UserData data = MockUtils.mockUser();
|
||||
String expected = "TestNicknameChatInfo";
|
||||
ChatInfo i = new ChatInfo(null, expected, "im 18 male");
|
||||
ChatInfo i = new ChatInfo(null, expected);
|
||||
assertTrue("Succeeded.", !i.process(data));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user