mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 18:27:41 +01:00
[Bleeding] Implement ExpBottleEvent; Addresses BUKKIT-888
By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
parent
e1b4d5f3ae
commit
e470617011
@ -46,6 +46,7 @@ import org.bukkit.entity.Pig;
|
|||||||
import org.bukkit.entity.PigZombie;
|
import org.bukkit.entity.PigZombie;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.Projectile;
|
import org.bukkit.entity.Projectile;
|
||||||
|
import org.bukkit.entity.ThrownExpBottle;
|
||||||
import org.bukkit.entity.ThrownPotion;
|
import org.bukkit.entity.ThrownPotion;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.block.*;
|
import org.bukkit.event.block.*;
|
||||||
@ -498,4 +499,11 @@ public class CraftEventFactory {
|
|||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ExpBottleEvent callExpBottleEvent(Entity entity, int exp) {
|
||||||
|
ThrownExpBottle bottle = (ThrownExpBottle) entity.getBukkitEntity();
|
||||||
|
ExpBottleEvent event = new ExpBottleEvent(bottle, exp);
|
||||||
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
|
return event;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user