From 28489f07c159eee1b3158af2ce6af025178f2090 Mon Sep 17 00:00:00 2001 From: Fuzzlemann Date: Sun, 30 Jul 2017 00:46:09 +0200 Subject: [PATCH] Removes the last remnants of Player Demographics --- .../com/djrapitops/plan/data/handling/info/ChatInfo.java | 5 +---- .../com/djrapitops/plan/data/listeners/PlanChatListener.java | 3 ++- .../com/djrapitops/plan/data/handling/info/ChatInfoTest.java | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Plan/src/main/java/com/djrapitops/plan/data/handling/info/ChatInfo.java b/Plan/src/main/java/com/djrapitops/plan/data/handling/info/ChatInfo.java index 447d28f95..9225bf5fc 100644 --- a/Plan/src/main/java/com/djrapitops/plan/data/handling/info/ChatInfo.java +++ b/Plan/src/main/java/com/djrapitops/plan/data/handling/info/ChatInfo.java @@ -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 diff --git a/Plan/src/main/java/com/djrapitops/plan/data/listeners/PlanChatListener.java b/Plan/src/main/java/com/djrapitops/plan/data/listeners/PlanChatListener.java index fec2e8c90..2b1567df1 100644 --- a/Plan/src/main/java/com/djrapitops/plan/data/listeners/PlanChatListener.java +++ b/Plan/src/main/java/com/djrapitops/plan/data/listeners/PlanChatListener.java @@ -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())); } } diff --git a/Plan/src/test/java/main/java/com/djrapitops/plan/data/handling/info/ChatInfoTest.java b/Plan/src/test/java/main/java/com/djrapitops/plan/data/handling/info/ChatInfoTest.java index 2de9b435c..6e578e8ad 100644 --- a/Plan/src/test/java/main/java/com/djrapitops/plan/data/handling/info/ChatInfoTest.java +++ b/Plan/src/test/java/main/java/com/djrapitops/plan/data/handling/info/ChatInfoTest.java @@ -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)); } }