Gets the world that this location resides in @return World that contains this location, or null if it is not set @throws IllegalArgumentException when world is unloaded @see #isWorldLoaded()
()
| 101 | * @see #isWorldLoaded() |
| 102 | */ |
| 103 | @UndefinedNullability |
| 104 | public World getWorld() { |
| 105 | if (this.world == null) { |
| 106 | return null; |
| 107 | } |
| 108 | |
| 109 | World world = this.world.get(); |
| 110 | Preconditions.checkArgument(world != null, "World unloaded"); |
| 111 | return world; |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * Gets the chunk at the represented location |
no test coverage detected