3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

SPIGOT-4725: Virtual Merchant GUI crashes server

Dieser Commit ist enthalten in:
md_5 2019-04-24 10:10:41 +10:00
Ursprung c8d1e94209
Commit 6d504c2d4c

Datei anzeigen

@ -31,6 +31,7 @@ public class CraftMerchantCustom extends CraftMerchant {
private final IChatBaseComponent title;
private final MerchantRecipeList trades = new MerchantRecipeList();
private EntityHuman tradingPlayer;
private World tradingWorld;
public MinecraftMerchant(String title) {
Validate.notNull(title, "Title cannot be null");
@ -40,6 +41,9 @@ public class CraftMerchantCustom extends CraftMerchant {
@Override
public void setTradingPlayer(EntityHuman entityhuman) {
this.tradingPlayer = entityhuman;
if (entityhuman != null) {
this.tradingWorld = entityhuman.world;
}
}
@Override
@ -68,7 +72,7 @@ public class CraftMerchantCustom extends CraftMerchant {
@Override
public World getWorld() {
return null;
return this.tradingWorld;
}
@Override