Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 132
    • Issues 132
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Issues
  • #1582

Closed
Open
Created May 04, 2024 by Junhyung Im@entrypointkr

Add Bukkit API SkillCastEvent, SkillTargetEvent

Summary

Please add support Bukkit Events that it will makes developers:

  • SkillCastEvent: to catch a caster(mob or player) and skill name
  • SkillTargetEvent: to catch a targeted entity/location by MythicMobs onHits mechacnis like projectile, skill, totem

Usage

@EventHandler
public void onTarget(SkillTargetEvent e) {
  // catch up
}

@EventHandler
public void onCast(SkillCastEvent e) {
  // catch up
}

My use case is adding cast/target event for Skript and then programmatically give a buff to the target in a specific skill, and also want to cancel the event.

Example skill:

slash:
  Skills:
  - totem{md=2;c=1;oH=damage;hnp=true;hp=true;hR=1;vR=1;i=1} @forward{f=1}
damage:
  Skills:
  - damage{a=4;pkb=false;hnp=true;hp=true}

If I casted slash skill and the onHit damage has met, then SkillTargetEvent will be called before damage.

Value

In context of current MythicMobs, my idea to catch a skill target is create a custom mechanics with id option which calls Bukkit event, and then use it in every MythicMobs skills.yml, then compare the id in Bukkit event handler.

If the Bukkit events will be supported, the process of creating custom mechanic will not be require, many plugins especially Skript can catch up the event and we can do actions programmatically.

Also MythicLib support something like SkillCastEvent, but not SkillTargetEvent.

Priority

Flexible API is more important for closed source software because we can't see and modify the sourcecode

Implementation

Describe how you think your suggestion should be implemented.

@EventHandler
public void onTarget(SkillTargetEvent e) {
  val caster = e.getCaster();
  val skillName = e.getSkillName();
  val target = e.getTarget();
  if (skillName.equals("MySkillInConfigNode") {
    // some BukkitAPI method calls for extra actions
  }
}

Thank you in advance for your support.

Edited Mar 31, 2025 by Brickgard
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking