diff --git a/src/main/java/appeng/me/cache/SecurityCache.java b/src/main/java/appeng/me/cache/SecurityCache.java index 7ff92367a..4d61725cd 100644 --- a/src/main/java/appeng/me/cache/SecurityCache.java +++ b/src/main/java/appeng/me/cache/SecurityCache.java @@ -81,8 +81,11 @@ public class SecurityCache implements ISecurityGrid { private void updateSecurityKey() { final long lastCode = this.securityKey; + int newOwner = -1; if (this.securityProvider.size() == 1) { this.securityKey = this.securityProvider.get(0).getSecurityKey(); + ISecurityProvider securityProvider = this.securityProvider.get(0); + newOwner = securityProvider.getOwner(); } else { this.securityKey = -1; } @@ -91,6 +94,9 @@ public class SecurityCache implements ISecurityGrid { this.getGrid().postEvent(new MENetworkSecurityChange()); for (final IGridNode n : this.getGrid().getNodes()) { ((GridNode) n).setLastSecurityKey(this.securityKey); + if (n.getPlayerID() != newOwner) { + n.setPlayerID(newOwner); + } } } }