mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 05:27:37 +00:00
fix missprint (minutes/minute)
This commit is contained in:
1 parent
ec133ce74c
commit
30714e92a5
1 file changed
+8
-8
@@ -18,11 +18,11 @@ import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
public class GuiMailbox extends GuiNPCInterface implements IGuiData, ICustomScrollListener, GuiYesNoCallback{
|
||||
|
||||
|
||||
private GuiCustomScroll scroll;
|
||||
private PlayerMailData data;
|
||||
private PlayerMail selected;
|
||||
|
||||
|
||||
public GuiMailbox() {
|
||||
super();
|
||||
xSize = 256;
|
||||
@@ -39,7 +39,7 @@ public class GuiMailbox extends GuiNPCInterface implements IGuiData, ICustomScro
|
||||
scroll.guiLeft = guiLeft + 4;
|
||||
scroll.guiTop = guiTop + 4;
|
||||
addScroll(scroll);
|
||||
|
||||
|
||||
String title = StatCollector.translateToLocal("mailbox.name");
|
||||
int x = (xSize - this.fontRendererObj.getStringWidth(title)) / 2;
|
||||
|
||||
@@ -73,7 +73,7 @@ public class GuiMailbox extends GuiNPCInterface implements IGuiData, ICustomScro
|
||||
}
|
||||
int minutes = (int) (selected.timePast / 60000);
|
||||
if(minutes == 1)
|
||||
return minutes + " " + StatCollector.translateToLocal("mailbox.minutes");
|
||||
return minutes + " " + StatCollector.translateToLocal("mailbox.minute");
|
||||
else
|
||||
return minutes + " " + StatCollector.translateToLocal("mailbox.minutes");
|
||||
}
|
||||
@@ -103,7 +103,7 @@ public class GuiMailbox extends GuiNPCInterface implements IGuiData, ICustomScro
|
||||
displayGuiScreen(guiyesno);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int i, int j, int k)
|
||||
{
|
||||
@@ -121,13 +121,13 @@ public class GuiMailbox extends GuiNPCInterface implements IGuiData, ICustomScro
|
||||
@Override
|
||||
public void save() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void setGuiData(NBTTagCompound compound) {
|
||||
PlayerMailData data = new PlayerMailData();
|
||||
data.loadNBTData(compound);
|
||||
|
||||
|
||||
List<String> list = new ArrayList<String>();
|
||||
Collections.sort(data.playermail, new Comparator<PlayerMail>(){
|
||||
public int compare(PlayerMail o1, PlayerMail o2){
|
||||
@@ -150,7 +150,7 @@ public class GuiMailbox extends GuiNPCInterface implements IGuiData, ICustomScro
|
||||
GuiCustomScroll guiCustomScroll) {
|
||||
selected = data.playermail.get(guiCustomScroll.selected);
|
||||
initGui();
|
||||
|
||||
|
||||
if(selected != null && !selected.beenRead){
|
||||
selected.beenRead = true;
|
||||
NoppesUtilPlayer.sendData(EnumPlayerPacket.MailRead, selected.time, selected.sender);
|
||||
|
||||
Reference in new issue
Block a user