mirror of
https://github.com/essentials/Essentials.git
synced 2025-09-26 06:09:15 +02:00
Reduce duplicate calls in EssentialsChat
Should cut the time down a little.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user