Skip to content

Commit

Permalink
Fix payload init breaking (#1476)
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Herrera <[email protected]>
  • Loading branch information
Pablete1234 authored Jan 7, 2025
1 parent 625c0f4 commit df87feb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/java/tc/oc/pgm/payload/Payload.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import tc.oc.pgm.api.region.Region;
import tc.oc.pgm.controlpoint.ControlPoint;
import tc.oc.pgm.payload.track.Track;
import tc.oc.pgm.regions.EmptyRegion;

public class Payload extends ControlPoint {

Expand Down Expand Up @@ -64,7 +65,7 @@ private Minecart spawnMinecart() {

@Override
public Region getCaptureRegion() {
return captureRegion;
return captureRegion == null ? EmptyRegion.INSTANCE : captureRegion;
}

public Vector getCenterPoint() {
Expand Down

0 comments on commit df87feb

Please sign in to comment.