mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 11:13:45 +01:00 
			
		
		
		
	fix: add null check for bukkit world ref
This commit is contained in:
		@@ -75,7 +75,7 @@ public class BukkitWorld implements World<org.bukkit.World> {
 | 
				
			|||||||
    public static @NonNull BukkitWorld of(final org.bukkit.World world) {
 | 
					    public static @NonNull BukkitWorld of(final org.bukkit.World world) {
 | 
				
			||||||
        WeakReference<BukkitWorld> bukkitWorldRef = worldMap.get(world.getName());
 | 
					        WeakReference<BukkitWorld> bukkitWorldRef = worldMap.get(world.getName());
 | 
				
			||||||
        BukkitWorld bukkitWorld;
 | 
					        BukkitWorld bukkitWorld;
 | 
				
			||||||
        if ((bukkitWorld = bukkitWorldRef.get()) != null && world.equals(bukkitWorld.world.get())) {
 | 
					        if (bukkitWorldRef != null && (bukkitWorld = bukkitWorldRef.get()) != null && world.equals(bukkitWorld.world.get())) {
 | 
				
			||||||
            return bukkitWorld;
 | 
					            return bukkitWorld;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        bukkitWorld = new BukkitWorld(world);
 | 
					        bukkitWorld = new BukkitWorld(world);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user