mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 11:03:43 +01:00 
			
		
		
		
	Added SubSkillBlockEvent & GreenThumb + ShroomThumb now fire it
This commit is contained in:
		@@ -28,6 +28,7 @@ import com.gmail.nossr50.events.skills.fishing.McMMOPlayerFishingTreasureEvent;
 | 
			
		||||
import com.gmail.nossr50.events.skills.fishing.McMMOPlayerMagicHunterEvent;
 | 
			
		||||
import com.gmail.nossr50.events.skills.repair.McMMOPlayerRepairCheckEvent;
 | 
			
		||||
import com.gmail.nossr50.events.skills.salvage.McMMOPlayerSalvageCheckEvent;
 | 
			
		||||
import com.gmail.nossr50.events.skills.secondaryabilities.SubSkillBlockEvent;
 | 
			
		||||
import com.gmail.nossr50.events.skills.secondaryabilities.SubSkillEvent;
 | 
			
		||||
import com.gmail.nossr50.events.skills.unarmed.McMMOPlayerDisarmEvent;
 | 
			
		||||
import com.gmail.nossr50.locale.LocaleLoader;
 | 
			
		||||
@@ -190,13 +191,28 @@ public final class EventUtils {
 | 
			
		||||
     * @return the event after it has been fired
 | 
			
		||||
     */
 | 
			
		||||
    @Deprecated
 | 
			
		||||
    public static SubSkillEvent callSubSkillEvent(Player player, SubSkillType subSkillType) {
 | 
			
		||||
    public static @NotNull SubSkillEvent callSubSkillEvent(Player player, SubSkillType subSkillType) {
 | 
			
		||||
        SubSkillEvent event = new SubSkillEvent(player, subSkillType);
 | 
			
		||||
        mcMMO.p.getServer().getPluginManager().callEvent(event);
 | 
			
		||||
 | 
			
		||||
        return event;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Calls a new SubSkillBlockEvent for this SubSkill and its related block and then returns it
 | 
			
		||||
     * @param player target player
 | 
			
		||||
     * @param subSkillType target subskill
 | 
			
		||||
     * @param block associated block
 | 
			
		||||
     * @return the event after it has been fired
 | 
			
		||||
     */
 | 
			
		||||
    @Deprecated
 | 
			
		||||
    public static @NotNull SubSkillBlockEvent callSubSkillBlockEvent(@NotNull Player player, @NotNull SubSkillType subSkillType, @NotNull Block block) {
 | 
			
		||||
        SubSkillBlockEvent event = new SubSkillBlockEvent(player, subSkillType, block);
 | 
			
		||||
        mcMMO.p.getServer().getPluginManager().callEvent(event);
 | 
			
		||||
 | 
			
		||||
        return event;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Calls a new SubSkillEvent for this SubSkill and then returns it
 | 
			
		||||
     * @param player target player
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user