summaryrefslogtreecommitdiffstats
path: root/EssentialsChat
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsChat')
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/ChatStore.java51
1 files changed, 51 insertions, 0 deletions
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..bd6a9adab
--- /dev/null
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/ChatStore.java
@@ -0,0 +1,51 @@
+package com.earth2me.essentials.chat;
+
+import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.api.IEssentials;
+import com.earth2me.essentials.api.IUser;
+
+
+public class ChatStore
+{
+ private final transient IUser user;
+ private final transient String type;
+ private final transient Trade charge;
+ private long radius;
+
+ ChatStore(final IEssentials ess, final IUser user, final String type)
+ {
+ this.user = user;
+ this.type = type;
+ this.charge = new Trade(getLongType(), ess);
+ }
+
+ public IUser getUser()
+ {
+ return user;
+ }
+
+ public Trade getCharge()
+ {
+ return charge;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public final String getLongType()
+ {
+ return type.length() > 0 ? "chat" : "chat-" + type;
+ }
+
+ public long getRadius()
+ {
+ return radius;
+ }
+
+ public void setRadius(final long radius)
+ {
+ this.radius = radius;
+ }
+}