mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	Make world settings reloadable
This commit is contained in:
		@@ -25,6 +25,7 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
package com.plotsquared.core.command;
 | 
					package com.plotsquared.core.command;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.google.inject.Guice;
 | 
				
			||||||
import com.google.inject.Inject;
 | 
					import com.google.inject.Inject;
 | 
				
			||||||
import com.plotsquared.core.PlotSquared;
 | 
					import com.plotsquared.core.PlotSquared;
 | 
				
			||||||
import com.plotsquared.core.configuration.ConfigurationSection;
 | 
					import com.plotsquared.core.configuration.ConfigurationSection;
 | 
				
			||||||
@@ -49,8 +50,8 @@ import java.util.Objects;
 | 
				
			|||||||
public class Reload extends SubCommand {
 | 
					public class Reload extends SubCommand {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private final PlotAreaManager plotAreaManager;
 | 
					    private final PlotAreaManager plotAreaManager;
 | 
				
			||||||
    private final YamlConfiguration worldConfiguration;
 | 
					    private YamlConfiguration worldConfiguration;
 | 
				
			||||||
    private final File worldFile;
 | 
					    private File worldFile;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Inject
 | 
					    @Inject
 | 
				
			||||||
    public Reload(
 | 
					    public Reload(
 | 
				
			||||||
@@ -69,6 +70,8 @@ public class Reload extends SubCommand {
 | 
				
			|||||||
            // The following won't affect world generation, as that has to be
 | 
					            // The following won't affect world generation, as that has to be
 | 
				
			||||||
            // loaded during startup unfortunately.
 | 
					            // loaded during startup unfortunately.
 | 
				
			||||||
            PlotSquared.get().setupConfigs();
 | 
					            PlotSquared.get().setupConfigs();
 | 
				
			||||||
 | 
					            this.worldConfiguration = PlotSquared.get().getWorldConfiguration();
 | 
				
			||||||
 | 
					            this.worldFile = PlotSquared.get().getWorldsFile();
 | 
				
			||||||
            PlotSquared.get().loadCaptionMap();
 | 
					            PlotSquared.get().loadCaptionMap();
 | 
				
			||||||
            this.plotAreaManager.forEachPlotArea(area -> {
 | 
					            this.plotAreaManager.forEachPlotArea(area -> {
 | 
				
			||||||
                ConfigurationSection worldSection = this.worldConfiguration
 | 
					                ConfigurationSection worldSection = this.worldConfiguration
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user