Skip to content

Commit

Permalink
Fix issue #329
Browse files Browse the repository at this point in the history
  • Loading branch information
Thorinwasher committed Feb 18, 2024
1 parent aa11f03 commit 4aa2a7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.sgrewritten.stargate.network;

import org.sgrewritten.stargate.Stargate;
import org.sgrewritten.stargate.api.network.Network;
import org.sgrewritten.stargate.api.network.NetworkRegistry;
import org.sgrewritten.stargate.api.network.portal.Portal;
Expand All @@ -11,6 +12,7 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.logging.Level;
import java.util.stream.Stream;

public class StargateNetworkRegistry implements NetworkRegistry {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ public boolean isOpen() {

@Override
public void open(Player actor) {
if(hasFlag(PortalFlag.ALWAYS_ON) && getCurrentDestination() == null){
return;
}
getGate().open();
if (actor != null) {
this.openFor = actor.getUniqueId();
Expand Down

0 comments on commit 4aa2a7e

Please sign in to comment.