blob: b220fb2f5ad736605ddabfdb1ffbc823b44973b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package com.earth2me.essentials.signs;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
import java.util.List;
public class SignMail extends EssentialsSign
{
public SignMail()
{
super("Mail");
}
@Override
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
{
final List<String> mail = player.getMails();
if (mail.isEmpty())
{
player.sendMessage(_("noNewMail"));
return false;
}
for (String s : mail)
{
player.sendMessage(s);
}
player.sendMessage(_("markMailAsRead"));
return true;
}
}
|