mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-18 11:19:28 +00:00
fixes for mail system.
This commit is contained in:
1 parent
8bcf3568fe
commit
ec05cdc2c1
25 files changed
+217
-182
No files matched your search
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.mail;
|
||||
|
||||
import forestry.api.mail.MailAddress;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -31,9 +32,12 @@ public class POBox extends WorldSavedData implements IInventory {
|
||||
private GameProfile owner;
|
||||
private final InventoryAdapter letters = new InventoryAdapter(SLOT_SIZE, "Letters");
|
||||
|
||||
public POBox(GameProfile owner, boolean isUser) {
|
||||
super(SAVE_NAME + owner);
|
||||
this.owner = owner;
|
||||
public POBox(MailAddress address, boolean isUser) {
|
||||
super(SAVE_NAME + address);
|
||||
if (!address.isPlayer()) {
|
||||
throw new IllegalArgumentException("POBox address must be a player");
|
||||
}
|
||||
this.owner = (GameProfile)address.getIdentifier();
|
||||
}
|
||||
|
||||
public POBox(String savename) {
|
||||
|
||||
Reference in new issue
Block a user