IntellectualSites / IntellectualSites/PlotSquared

PlotSquared throws error on World generation because getWorld was null

Open
#4,936 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Requires Testing
Dominant language
Java
Stars
653
Forks
975
Avg merge
2m
Merged PRs (30d)
6

Description

Server Implementation

Paper

Server Version

26.2

Describe the bug

When generating a world using the /ps setup command, the plugin throws an exception with reason Cannot invoke "org.bukkit.World.getSpawnLocation()" because the return value of "com.plotsquared.bukkit.util.BukkitUtil.getWorld(String)" is null

The following /ps setup parameters were used:

  • Generator: PlotSquared
  • World Type: Partial
  • Name: test
  • Minimum Plot ID: 1;1
  • Maximum Plot ID: 100;100
  • Terrain: ALL
  • Plot Height: 300
  • Plot Width: 48
  • Plot Block: stone
  • Top Layer: false
  • Floor Block: grass_block
  • Top Wall Block (Default/Claimed): air/air
  • Road Width: 0
  • Road Height: 62
  • Road Block: quartz_block
  • Wall Filling Block: stone
  • Wall Height: 300
  • Bedrock at bottom: true
  • Component Change changes Bedrock: false
  • World Name: test

Note that the World has been generated, but I simply wasn't teleported to it.

To Reproduce
  1. Create a Plot World with the setup command
  2. Use the values I used(? Not sure if there's a difference)
  3. Encounter error
Expected behaviour

The world generates as expected and you get teleported.

Screenshots / Videos

No response

Error log (if applicable)

https://paste.helpch.at/exogipehod.log

Plot Debugpaste

https://athion.net/ISPaster/paste/view/d0b0fd9621f445c08752785a4046666c

PlotSquared Version

7.6.0-Premium

Checklist
Anything else?

My goal here was to create a naturally generated world with plots right next to each other that players can claim. So no roads would've been a wanted requirement.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the /ps setup values in the issue, then inspect the linked error log and Plot debugpaste for the setup and world-generation entry point. Trace why BukkitUtil.getWorld(String) is null after generation; done means /ps setup creates the world and teleports the player without the exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.