mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36: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
|
Version 1.3.14
|
||||||
+ Added new Hylian Luck skill to Herbalism.
|
+ 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
|
= Fixed a memory leak involving mob tracking
|
||||||
- Removed extra durability loss from Leaf Blower
|
- Removed extra durability loss from Leaf Blower
|
||||||
|
|
||||||
|
@ -5,11 +5,11 @@ import org.bukkit.event.Cancellable;
|
|||||||
|
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
import com.gmail.nossr50.datatypes.SkillType;
|
||||||
|
|
||||||
public class McMMOPlayerUnarmEvent extends McMMOPlayerSkillEvent implements Cancellable {
|
public class McMMOPlayerDisarmEvent extends McMMOPlayerSkillEvent implements Cancellable {
|
||||||
private boolean cancelled;
|
private boolean cancelled;
|
||||||
private Player defender;
|
private Player defender;
|
||||||
|
|
||||||
public McMMOPlayerUnarmEvent(Player defender) {
|
public McMMOPlayerDisarmEvent(Player defender) {
|
||||||
super(defender, SkillType.UNARMED);
|
super(defender, SkillType.UNARMED);
|
||||||
this.defender = defender;
|
this.defender = defender;
|
||||||
}
|
}
|
@ -5,7 +5,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
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.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ public class DisarmEventHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void handleDisarm() {
|
protected void handleDisarm() {
|
||||||
McMMOPlayerUnarmEvent event = new McMMOPlayerUnarmEvent(defender);
|
McMMOPlayerDisarmEvent event = new McMMOPlayerDisarmEvent(defender);
|
||||||
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if(!event.isCancelled()) {
|
if(!event.isCancelled()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user