From cd8cc631134de1ece1aab89c0b01d5a63dda1cfd Mon Sep 17 00:00:00 2001 From: KHobbits Date: Wed, 18 Jan 2012 22:53:39 +0000 Subject: Reduce duplicate calls in EssentialsChat Should cut the time down a little. --- .../com/earth2me/essentials/chat/ChatStore.java | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 EssentialsChat/src/com/earth2me/essentials/chat/ChatStore.java (limited to 'EssentialsChat/src/com/earth2me/essentials/chat/ChatStore.java') diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/ChatStore.java b/EssentialsChat/src/com/earth2me/essentials/chat/ChatStore.java new file mode 100644 index 000000000..38239abfe --- /dev/null +++ b/EssentialsChat/src/com/earth2me/essentials/chat/ChatStore.java @@ -0,0 +1,51 @@ +package com.earth2me.essentials.chat; + +import com.earth2me.essentials.IEssentials; +import com.earth2me.essentials.Trade; +import com.earth2me.essentials.User; + + +public class ChatStore +{ + private final User user; + private final String type; + private final Trade charge; + private long radius; + + ChatStore(final IEssentials ess, final User user, final String type) + { + this.user = user; + this.type = type; + this.charge = new Trade(getLongType(), ess); + } + + public User getUser() + { + return user; + } + + public Trade getCharge() + { + return charge; + } + + public String getType() + { + return type; + } + + public String getLongType() + { + return type.length() > 0 ? "chat" : "chat-" + type; + } + + public long getRadius() + { + return radius; + } + + public void setRadius(long radius) + { + this.radius = radius; + } +} -- cgit v1.2.3