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()
()
| 93 | * @see #isWorldLoaded() |
| 94 | */ |
| 95 | @Nullable |
| 96 | public World getWorld() { |
| 97 | if (this.world == null) { |
| 98 | return null; |
| 99 | } |
| 100 | |
| 101 | World world = this.world.get(); |
| 102 | Preconditions.checkArgument(world != null, "World unloaded"); |
| 103 | return world; |
| 104 | } |
| 105 | |
| 106 | /** |
| 107 | * Gets the chunk at the represented location |
no test coverage detected