mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-03 18:53:43 +01:00 
			
		
		
		
	Added a null check for the very unlikely chance that the command isn't found.
This commit is contained in:
		@@ -289,10 +289,12 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
 | 
				
			|||||||
    @Override public void registerCommands() {
 | 
					    @Override public void registerCommands() {
 | 
				
			||||||
        final BukkitCommand bukkitCommand = new BukkitCommand();
 | 
					        final BukkitCommand bukkitCommand = new BukkitCommand();
 | 
				
			||||||
        final PluginCommand plotCommand = getCommand("plots");
 | 
					        final PluginCommand plotCommand = getCommand("plots");
 | 
				
			||||||
 | 
					        if (plotCommand != null) {
 | 
				
			||||||
            plotCommand.setExecutor(bukkitCommand);
 | 
					            plotCommand.setExecutor(bukkitCommand);
 | 
				
			||||||
            plotCommand.setAliases(Arrays.asList("p", "ps", "plotme", "plot"));
 | 
					            plotCommand.setAliases(Arrays.asList("p", "ps", "plotme", "plot"));
 | 
				
			||||||
            plotCommand.setTabCompleter(bukkitCommand);
 | 
					            plotCommand.setTabCompleter(bukkitCommand);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override public File getDirectory() {
 | 
					    @Override public File getDirectory() {
 | 
				
			||||||
        return getDataFolder();
 | 
					        return getDataFolder();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user