Events Reference
Custom Bukkit events fired by ShyamDuels during match setups, player deaths, and round transitions.
Event Listening Setup
Implement the standard Bukkit Listener interface and register it inside your plugin's onEnable block:
javaimport org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import com.shyamstudio.shyamduels.duel.event.DuelStartEvent;
public class MatchListener implements Listener {
@EventHandler
public void onDuelStart(DuelStartEvent event) {
// Event logic here
}
}
Available Custom Events
DuelStartEvent
Class path: com.shyamstudio.shyamduels.duel.event.DuelStartEvent
Fired when a 1v1 or team duel starts, immediately after the countdown finishes and PvP damage is enabled.
getDuel(): Returns the active Duel model.
DuelEndEvent
Class path: com.shyamstudio.shyamduels.duel.event.DuelEndEvent
Fired when a duel match terminates (due to victory conditions, player forfeit, or admin termination commands).
getDuel(): Returns the concluded Duel model. Use the model to check final state, winner teams, and ELO calculations.
FightDeathEvent
Class path: com.shyamstudio.shyamduels.duel.event.FightDeathEvent
Fired when a player dies inside a match arena during a duel round.
getPlayer(): Returns the victim player entity.getKiller(): Returns the killer player entity (returns null if death was caused by environment, fall damage, or potion effect).getDuel(): Returns the active Duel model.isFinalRound(): Returns true if this death concludes the entire match (meaning no further rounds will execute).
RoundStartEvent
Class path: com.shyamstudio.shyamduels.duel.event.RoundStartEvent
Fired at the beginning of a round in multi-round duels (e.g. Best of 3 matches), before the countdown starts.
getDuel(): Returns the active Duel model.
RoundEndEvent
Class path: com.shyamstudio.shyamduels.duel.event.RoundEndEvent
Fired immediately after a round concludes (a player or team dies), before players are reset for the next round.
getDuel(): Returns the active Duel model.
Party Match Events
| Event Class | Trigger Condition | Key Methods |
|---|---|---|
PartyFFAStartEvent |
Fired when a party Free-For-All match begins. | getDuel() |
PartyFFAEndEvent |
Fired when a party Free-For-All match concludes. | getDuel() |
PartySplitStartEvent |
Fired when a party split team battle starts. | getDuel() |
PartySplitEndEvent |
Fired when a party split team battle ends. | getDuel() |
PartyVsPartyStartEvent |
Fired when a vs-party challenge duel starts. | getDuel() |
PartyVsPartyEndEvent |
Fired when a vs-party challenge duel concludes. | getDuel() |