mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-10-31 17:43:44 +01:00 
			
		
		
		
	Compare commits
	
		
			1 Commits
		
	
	
		
			feat/plotB
			...
			fix/4024
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 67d58a6b81 | 
| @@ -25,11 +25,17 @@ import com.plotsquared.core.plot.PlotAreaTerrainType; | |||||||
| import com.plotsquared.core.plot.PlotAreaType; | import com.plotsquared.core.plot.PlotAreaType; | ||||||
| import com.plotsquared.core.plot.PlotId; | import com.plotsquared.core.plot.PlotId; | ||||||
| import com.plotsquared.core.util.SetupUtils; | import com.plotsquared.core.util.SetupUtils; | ||||||
|  | import org.jetbrains.annotations.Contract; | ||||||
|  | import org.jetbrains.annotations.NotNull; | ||||||
|  | import org.jetbrains.annotations.Nullable; | ||||||
|  |  | ||||||
|  | import java.util.Objects; | ||||||
|  |  | ||||||
| public class PlotAreaBuilder { | public class PlotAreaBuilder { | ||||||
|  |  | ||||||
|     private String generatorName; |     private String generatorName; | ||||||
|     private String plotManager; |     private String plotManager; | ||||||
|  |     @Nullable | ||||||
|     private PlotAreaType plotAreaType; |     private PlotAreaType plotAreaType; | ||||||
|     private PlotAreaTerrainType terrainType; |     private PlotAreaTerrainType terrainType; | ||||||
|     private String worldName; |     private String worldName; | ||||||
| @@ -85,8 +91,10 @@ public class PlotAreaBuilder { | |||||||
|         return this.plotManager; |         return this.plotManager; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     @NotNull | ||||||
|  |     @Contract(" -> !null") | ||||||
|     public PlotAreaType plotAreaType() { |     public PlotAreaType plotAreaType() { | ||||||
|         return this.plotAreaType; |         return Objects.requireNonNullElse(this.plotAreaType, PlotAreaType.NORMAL); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public PlotAreaTerrainType terrainType() { |     public PlotAreaTerrainType terrainType() { | ||||||
| @@ -127,7 +135,8 @@ public class PlotAreaBuilder { | |||||||
|         return this; |         return this; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public PlotAreaBuilder plotAreaType(PlotAreaType plotAreaType) { |     public PlotAreaBuilder plotAreaType(@NotNull PlotAreaType plotAreaType) { | ||||||
|  |         Objects.requireNonNull(plotAreaType, "PlotAreaType must not be null"); | ||||||
|         this.plotAreaType = plotAreaType; |         this.plotAreaType = plotAreaType; | ||||||
|         return this; |         return this; | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user