Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
SPIGOT-4725: Virtual Merchant GUI crashes server
Dieser Commit ist enthalten in:
Ursprung
c8d1e94209
Commit
6d504c2d4c
@ -31,6 +31,7 @@ public class CraftMerchantCustom extends CraftMerchant {
|
|||||||
private final IChatBaseComponent title;
|
private final IChatBaseComponent title;
|
||||||
private final MerchantRecipeList trades = new MerchantRecipeList();
|
private final MerchantRecipeList trades = new MerchantRecipeList();
|
||||||
private EntityHuman tradingPlayer;
|
private EntityHuman tradingPlayer;
|
||||||
|
private World tradingWorld;
|
||||||
|
|
||||||
public MinecraftMerchant(String title) {
|
public MinecraftMerchant(String title) {
|
||||||
Validate.notNull(title, "Title cannot be null");
|
Validate.notNull(title, "Title cannot be null");
|
||||||
@ -40,6 +41,9 @@ public class CraftMerchantCustom extends CraftMerchant {
|
|||||||
@Override
|
@Override
|
||||||
public void setTradingPlayer(EntityHuman entityhuman) {
|
public void setTradingPlayer(EntityHuman entityhuman) {
|
||||||
this.tradingPlayer = entityhuman;
|
this.tradingPlayer = entityhuman;
|
||||||
|
if (entityhuman != null) {
|
||||||
|
this.tradingWorld = entityhuman.world;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -68,7 +72,7 @@ public class CraftMerchantCustom extends CraftMerchant {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public World getWorld() {
|
public World getWorld() {
|
||||||
return null;
|
return this.tradingWorld;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren