mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-25 06:14:46 +00:00
Fix #1325 Null Pointer Exception from broken mailbox
This commit is contained in:
1 parent
c0a22f4a28
commit
e9809238de
15 files changed
+51
-43
No files matched your search
@@ -23,6 +23,7 @@ import net.minecraft.world.WorldSavedData;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.mail.EnumAddressee;
|
||||
import forestry.api.mail.EnumPostage;
|
||||
import forestry.api.mail.EnumTradeStationState;
|
||||
import forestry.api.mail.ILetter;
|
||||
@@ -64,7 +65,7 @@ public class TradeStation extends WorldSavedData implements ITradeStation, IInve
|
||||
|
||||
public TradeStation(GameProfile owner, IMailAddress address) {
|
||||
super(SAVE_NAME + address);
|
||||
if (!address.isTrader()) {
|
||||
if (address.getType() != EnumAddressee.TRADER) {
|
||||
throw new IllegalArgumentException("TradeStation address must be a trader");
|
||||
}
|
||||
this.owner = owner;
|
||||
|
||||
Reference in new issue
Block a user