mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	hybrid
This commit is contained in:
		@@ -22,8 +22,11 @@ package com.intellectualcrafters.plot.commands;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import com.intellectualcrafters.plot.PlotSquared;
 | 
					import com.intellectualcrafters.plot.PlotSquared;
 | 
				
			||||||
import com.intellectualcrafters.plot.config.C;
 | 
					import com.intellectualcrafters.plot.config.C;
 | 
				
			||||||
 | 
					import com.intellectualcrafters.plot.generator.BukkitHybridUtils;
 | 
				
			||||||
import com.intellectualcrafters.plot.generator.HybridPlotManager;
 | 
					import com.intellectualcrafters.plot.generator.HybridPlotManager;
 | 
				
			||||||
import com.intellectualcrafters.plot.generator.HybridPlotWorld;
 | 
					import com.intellectualcrafters.plot.generator.HybridPlotWorld;
 | 
				
			||||||
 | 
					import com.intellectualcrafters.plot.generator.HybridUtils;
 | 
				
			||||||
 | 
					import com.intellectualcrafters.plot.object.Location;
 | 
				
			||||||
import com.intellectualcrafters.plot.object.Plot;
 | 
					import com.intellectualcrafters.plot.object.Plot;
 | 
				
			||||||
import com.intellectualcrafters.plot.object.PlotPlayer;
 | 
					import com.intellectualcrafters.plot.object.PlotPlayer;
 | 
				
			||||||
import com.intellectualcrafters.plot.util.MainUtil;
 | 
					import com.intellectualcrafters.plot.util.MainUtil;
 | 
				
			||||||
@@ -36,18 +39,17 @@ public class CreateRoadSchematic extends SubCommand {
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public boolean execute(final PlotPlayer player, final String... args) {
 | 
					    public boolean execute(final PlotPlayer player, final String... args) {
 | 
				
			||||||
        if (!BukkitPlayerFunctions.isInPlot(player)) {
 | 
					        Location loc = player.getLocation();
 | 
				
			||||||
            MainUtil.sendMessage(BukkitUtil.getPlayer(player), C.NOT_IN_PLOT);
 | 
					        Plot plot = MainUtil.getPlot(loc);
 | 
				
			||||||
            return false;
 | 
					        if (plot == null) {
 | 
				
			||||||
 | 
					            return sendMessage(player, C.NOT_IN_PLOT);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (!(PlotSquared.getPlotWorld(player.getWorld()) instanceof HybridPlotWorld)) {
 | 
					        if (!(PlotSquared.getPlotWorld(loc.getWorld()) instanceof HybridPlotWorld)) {
 | 
				
			||||||
            return sendMessage(player, C.NOT_IN_PLOT_WORLD);
 | 
					            return sendMessage(player, C.NOT_IN_PLOT_WORLD);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        final Plot plot = MainUtil.getPlot(loc);
 | 
					        HybridUtils.manager.setupRoadSchematic(plot);
 | 
				
			||||||
        final HybridPlotManager manager = (HybridPlotManager) PlotSquared.getPlotManager(player.getWorld());
 | 
					        MainUtil.update(loc);
 | 
				
			||||||
        manager.setupRoadSchematic(plot);
 | 
					        MainUtil.sendMessage(player, "&6Saved new road schematic");
 | 
				
			||||||
        MainUtil.update(BukkitUtil.getLocation(entity));
 | 
					 | 
				
			||||||
        MainUtil.sendMessage(BukkitUtil.getPlayer(player), "&6Saved new road schematic");
 | 
					 | 
				
			||||||
        return true;
 | 
					        return true;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user