mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Introduction of new Alchemy skill!
This commit is contained in:
@ -0,0 +1,37 @@
|
||||
package com.gmail.nossr50.events.skills.alchemy;
|
||||
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BrewingStand;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.events.skills.McMMOPlayerSkillEvent;
|
||||
|
||||
public class McMMOPlayerBrewEvent extends McMMOPlayerSkillEvent implements Cancellable {
|
||||
private Block brewingStand;
|
||||
|
||||
private boolean cancelled;
|
||||
|
||||
public McMMOPlayerBrewEvent(Player player, Block brewingStand) {
|
||||
super(player, SkillType.ALCHEMY);
|
||||
this.brewingStand = brewingStand;
|
||||
cancelled = false;
|
||||
}
|
||||
|
||||
public boolean isCancelled() {
|
||||
return cancelled;
|
||||
}
|
||||
|
||||
public void setCancelled(boolean newValue) {
|
||||
this.cancelled = newValue;
|
||||
}
|
||||
|
||||
public Block getBrewingStandBlock() {
|
||||
return brewingStand;
|
||||
}
|
||||
|
||||
public BrewingStand getBrewingStand() {
|
||||
return brewingStand.getState() instanceof BrewingStand ? (BrewingStand) brewingStand.getState() : null;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.gmail.nossr50.events.skills.alchemy;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.events.skills.McMMOPlayerSkillEvent;
|
||||
|
||||
public class McMMOPlayerCatalysisEvent extends McMMOPlayerSkillEvent implements Cancellable {
|
||||
private double speed;
|
||||
|
||||
private boolean cancelled;
|
||||
|
||||
public McMMOPlayerCatalysisEvent(Player player, double speed) {
|
||||
super(player, SkillType.ALCHEMY);
|
||||
this.speed = speed;
|
||||
cancelled = false;
|
||||
}
|
||||
|
||||
public boolean isCancelled() {
|
||||
return cancelled;
|
||||
}
|
||||
|
||||
public void setCancelled(boolean newValue) {
|
||||
this.cancelled = newValue;
|
||||
}
|
||||
|
||||
public double getSpeed() {
|
||||
return speed;
|
||||
}
|
||||
|
||||
public void setSpeed(double speed) {
|
||||
this.speed = speed;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user