mirror of
				https://github.com/GeyserMC/Geyser.git
				synced 2024-08-14 23:57:35 +00:00 
			
		
		
		
	Disable the plugin if we failed to load on Spigot (#4960)
This commit is contained in:
		
							parent
							
								
									39b552363b
								
							
						
					
					
						commit
						ee43ef8369
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -175,8 +175,9 @@ public class GeyserSpigotPlugin extends JavaPlugin implements GeyserBootstrap {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void onEnable() {
 | 
					    public void onEnable() {
 | 
				
			||||||
        // Disabling the plugin in onLoad() is not supported; we need to manually stop here
 | 
					        // Disabling the plugin in onLoad() is not supported; we need to manually stop here and disable ourselves
 | 
				
			||||||
        if (geyser == null) {
 | 
					        if (geyser == null) {
 | 
				
			||||||
 | 
					            Bukkit.getPluginManager().disablePlugin(this);
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue