mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 11:13:45 +01:00 
			
		
		
		
	Add mappings for pre initialized items
This commit is contained in:
		@@ -13,6 +13,9 @@ public abstract class BlockRegistry<T> {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  public BlockRegistry(@NonNull final Class<T> type, final T... preInitializedItems) {
 | 
					  public BlockRegistry(@NonNull final Class<T> type, final T... preInitializedItems) {
 | 
				
			||||||
    this.type = type;
 | 
					    this.type = type;
 | 
				
			||||||
 | 
					    for (final T preInitializedItem : preInitializedItems) {
 | 
				
			||||||
 | 
					      this.addMapping(getPlotBlock(preInitializedItem), preInitializedItem);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  public final void addMapping(@NonNull final PlotBlock plotBlock, @NonNull final T t) {
 | 
					  public final void addMapping(@NonNull final PlotBlock plotBlock, @NonNull final T t) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user