mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 11:14:44 +02:00
@ -7,7 +7,7 @@ import org.bukkit.event.block.BlockBreakEvent;
|
||||
/**
|
||||
* Called when mcMMO breaks a block due to a special ability.
|
||||
*/
|
||||
public class FakeBlockBreakEvent extends BlockBreakEvent {
|
||||
public class FakeBlockBreakEvent extends BlockBreakEvent implements FakeEvent {
|
||||
public FakeBlockBreakEvent(Block theBlock, Player player) {
|
||||
super(theBlock, player);
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
/**
|
||||
* Called when mcMMO damages a block due to a special ability.
|
||||
*/
|
||||
public class FakeBlockDamageEvent extends BlockDamageEvent {
|
||||
public class FakeBlockDamageEvent extends BlockDamageEvent implements FakeEvent {
|
||||
public FakeBlockDamageEvent(Player player, Block block, ItemStack itemInHand, boolean instaBreak) {
|
||||
super(player, block, itemInHand, instaBreak);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.event.inventory.BrewEvent;
|
||||
import org.bukkit.inventory.BrewerInventory;
|
||||
|
||||
public class FakeBrewEvent extends BrewEvent {
|
||||
public class FakeBrewEvent extends BrewEvent implements FakeEvent {
|
||||
public FakeBrewEvent(Block brewer, BrewerInventory contents, int fuelLevel) {
|
||||
super(brewer, contents, fuelLevel);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import java.util.Map;
|
||||
/**
|
||||
* Called when mcMMO applies damage from an entity due to special abilities.
|
||||
*/
|
||||
public class FakeEntityDamageByEntityEvent extends EntityDamageByEntityEvent {
|
||||
public class FakeEntityDamageByEntityEvent extends EntityDamageByEntityEvent implements FakeEvent {
|
||||
|
||||
public FakeEntityDamageByEntityEvent(Entity damager, Entity damagee, DamageCause cause, final Map<DamageModifier, Double> modifiers) {
|
||||
super(damager, damagee, cause, modifiers, getFunctionModifiers(modifiers));
|
||||
|
@ -11,7 +11,7 @@ import java.util.Map;
|
||||
/**
|
||||
* Called when mcMMO applies damage due to special abilities.
|
||||
*/
|
||||
public class FakeEntityDamageEvent extends EntityDamageEvent {
|
||||
public class FakeEntityDamageEvent extends EntityDamageEvent implements FakeEvent {
|
||||
|
||||
public FakeEntityDamageEvent(Entity damagee, DamageCause cause, final Map<DamageModifier, Double> modifiers) {
|
||||
super(damagee, cause, modifiers, getFunctionModifiers(modifiers));
|
||||
|
@ -7,7 +7,7 @@ import org.bukkit.event.entity.EntityTameEvent;
|
||||
/**
|
||||
* Called when mcMMO tames an animal via Call of the Wild
|
||||
*/
|
||||
public class FakeEntityTameEvent extends EntityTameEvent {
|
||||
public class FakeEntityTameEvent extends EntityTameEvent implements FakeEvent {
|
||||
public FakeEntityTameEvent(LivingEntity entity, AnimalTamer owner) {
|
||||
super(entity, owner);
|
||||
}
|
||||
|
11
src/main/java/com/gmail/nossr50/events/fake/FakeEvent.java
Normal file
11
src/main/java/com/gmail/nossr50/events/fake/FakeEvent.java
Normal file
@ -0,0 +1,11 @@
|
||||
package com.gmail.nossr50.events.fake;
|
||||
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
/**
|
||||
* This interface marks an {@link Event} as "fake".
|
||||
* This is just a handy way of checking if an {@link Event} is fake or not, maybe there
|
||||
* will be methods suitable for this in the future.
|
||||
*
|
||||
*/
|
||||
public interface FakeEvent {}
|
@ -6,7 +6,7 @@ import org.bukkit.event.player.PlayerAnimationEvent;
|
||||
/**
|
||||
* Called when handling extra drops to avoid issues with NoCheat.
|
||||
*/
|
||||
public class FakePlayerAnimationEvent extends PlayerAnimationEvent {
|
||||
public class FakePlayerAnimationEvent extends PlayerAnimationEvent implements FakeEvent {
|
||||
public FakePlayerAnimationEvent(Player player) {
|
||||
super(player);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import org.bukkit.entity.FishHook;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.player.PlayerFishEvent;
|
||||
|
||||
public class FakePlayerFishEvent extends PlayerFishEvent {
|
||||
public class FakePlayerFishEvent extends PlayerFishEvent implements FakeEvent {
|
||||
public FakePlayerFishEvent(Player player, Entity entity, FishHook hookEntity, State state) {
|
||||
super(player, entity, hookEntity, state);
|
||||
}
|
||||
|
Reference in New Issue
Block a user