mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	Array out of index fix
This commit is contained in:
		@@ -15,7 +15,8 @@ Version 2.1.133
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    Permission node descriptions had mentions of ability changed to sub-skill and other minor corrections
 | 
					    Permission node descriptions had mentions of ability changed to sub-skill and other minor corrections
 | 
				
			||||||
    Smelting now has a Bonus Drops section in config.yml
 | 
					    Smelting now has a Bonus Drops section in config.yml
 | 
				
			||||||
    Smelting now only doubles smelting results for items which have bonus drop entries in the config
 | 
					    Second Smelt now only doubles smelting results for items which have bonus drop entries in the config
 | 
				
			||||||
 | 
					    Fixed an array out of index bug for inventory click events
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    (These permissions are all included in the mcmmo.defaults node)
 | 
					    (These permissions are all included in the mcmmo.defaults node)
 | 
				
			||||||
    New permission node 'mcmmo.commands.tridents'
 | 
					    New permission node 'mcmmo.commands.tridents'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -438,9 +438,13 @@ public class InventoryListener implements Listener {
 | 
				
			|||||||
        if (event.getAction() == InventoryAction.HOTBAR_SWAP) {
 | 
					        if (event.getAction() == InventoryAction.HOTBAR_SWAP) {
 | 
				
			||||||
            PlayerInventory playerInventory = event.getWhoClicked().getInventory();
 | 
					            PlayerInventory playerInventory = event.getWhoClicked().getInventory();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if(playerInventory.getSize())
 | 
					            //TODO: Is this a spigot bug?
 | 
				
			||||||
            if(event.getWhoClicked().getInventory().getItem(event.getHotbarButton()) != null)
 | 
					            if(playerInventory.getContents().length > event.getHotbarButton())
 | 
				
			||||||
                SkillUtils.removeAbilityBuff(event.getWhoClicked().getInventory().getItem(event.getHotbarButton()));
 | 
					            {
 | 
				
			||||||
 | 
					                if(event.getWhoClicked().getInventory().getItem(event.getHotbarButton()) != null)
 | 
				
			||||||
 | 
					                    SkillUtils.removeAbilityBuff(event.getWhoClicked().getInventory().getItem(event.getHotbarButton()));
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user