diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-01-18 22:53:39 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-01-18 22:53:39 +0000 |
commit | c2b08079d7e182cbad0132210ba74003ea5b07fd (patch) | |
tree | 256e40c0d0805d082a5dd41b82637f9ce31b66f9 /EssentialsChat/src/com/earth2me/essentials/chat/ChatStore.java | |
parent | e1b44c28e320b0f7515b1f6f75fed6a5ecc7f189 (diff) | |
download | Essentials-c2b08079d7e182cbad0132210ba74003ea5b07fd.tar Essentials-c2b08079d7e182cbad0132210ba74003ea5b07fd.tar.gz Essentials-c2b08079d7e182cbad0132210ba74003ea5b07fd.tar.lz Essentials-c2b08079d7e182cbad0132210ba74003ea5b07fd.tar.xz Essentials-c2b08079d7e182cbad0132210ba74003ea5b07fd.zip |
Reduce duplicate calls in EssentialsChat
Should cut the time down a little.
Diffstat (limited to 'EssentialsChat/src/com/earth2me/essentials/chat/ChatStore.java')
-rw-r--r-- | EssentialsChat/src/com/earth2me/essentials/chat/ChatStore.java | 51 |
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..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; + } +} |