mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Because McMMOPlayerUnarmEvent is a silly name.
This commit is contained in:
parent
0276294569
commit
299c7ff804
@ -11,6 +11,7 @@ Version 1.4.00-dev
|
||||
|
||||
Version 1.3.14
|
||||
+ Added new Hylian Luck skill to Herbalism.
|
||||
+ Added new cancellable McMMOPlayerDisarmEvent for Citizens compatibility - fires whenever a player is disarmed.
|
||||
= Fixed a memory leak involving mob tracking
|
||||
- Removed extra durability loss from Leaf Blower
|
||||
|
||||
|
@ -5,11 +5,11 @@ import org.bukkit.event.Cancellable;
|
||||
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
|
||||
public class McMMOPlayerUnarmEvent extends McMMOPlayerSkillEvent implements Cancellable {
|
||||
public class McMMOPlayerDisarmEvent extends McMMOPlayerSkillEvent implements Cancellable {
|
||||
private boolean cancelled;
|
||||
private Player defender;
|
||||
|
||||
public McMMOPlayerUnarmEvent(Player defender) {
|
||||
public McMMOPlayerDisarmEvent(Player defender) {
|
||||
super(defender, SkillType.UNARMED);
|
||||
this.defender = defender;
|
||||
}
|
@ -5,7 +5,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.events.skills.McMMOPlayerUnarmEvent;
|
||||
import com.gmail.nossr50.events.skills.McMMOPlayerDisarmEvent;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
|
||||
@ -36,7 +36,7 @@ public class DisarmEventHandler {
|
||||
}
|
||||
|
||||
protected void handleDisarm() {
|
||||
McMMOPlayerUnarmEvent event = new McMMOPlayerUnarmEvent(defender);
|
||||
McMMOPlayerDisarmEvent event = new McMMOPlayerDisarmEvent(defender);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
if(!event.isCancelled()) {
|
||||
|
Loading…
Reference in New Issue
Block a user