mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-29 04:27:53 +01: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 {
|
public class ChatInfo extends HandlingInfo {
|
||||||
|
|
||||||
private final String nickname;
|
private final String nickname;
|
||||||
private final String message;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param uuid UUID of the player.
|
* @param uuid UUID of the player.
|
||||||
* @param nickname Nickname 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);
|
super(uuid, InfoType.CHAT, 0L);
|
||||||
this.nickname = nickname;
|
this.nickname = nickname;
|
||||||
this.message = message;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -37,7 +37,8 @@ public class PlanChatListener implements Listener {
|
|||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player p = event.getPlayer();
|
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() {
|
public void testProcessNick() {
|
||||||
UserData data = MockUtils.mockUser();
|
UserData data = MockUtils.mockUser();
|
||||||
String expected = "TestNicknameChatInfo";
|
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 succeed", i.process(data));
|
||||||
assertTrue("Didn't add nickname", data.getNicknames().contains(expected));
|
assertTrue("Didn't add nickname", data.getNicknames().contains(expected));
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@ public class ChatInfoTest {
|
|||||||
public void testProcessWrongUUID() {
|
public void testProcessWrongUUID() {
|
||||||
UserData data = MockUtils.mockUser();
|
UserData data = MockUtils.mockUser();
|
||||||
String expected = "TestNicknameChatInfo";
|
String expected = "TestNicknameChatInfo";
|
||||||
ChatInfo i = new ChatInfo(null, expected, "im 18 male");
|
ChatInfo i = new ChatInfo(null, expected);
|
||||||
assertTrue("Succeeded.", !i.process(data));
|
assertTrue("Succeeded.", !i.process(data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user