mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-12 16:27:27 +00:00
Prevent crash with broken server state (#37)
This commit is contained in:
1 parent
2b27b551a3
commit
48bb35140c
1 file changed
+3
-2
@@ -96,11 +96,12 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static int syphonFromNetwork(String ownerName, int damageToBeDone) {
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = MinecraftServer.getServer();
|
||||
if (mcServer == null || mcServer.worldServers.length == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
World world = mcServer.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
|
||||
Reference in new issue
Block a user