Implement cancellable variant

This commit is contained in:
fullwall 2022-11-14 23:53:14 +08:00
parent 868c7a463d
commit d9c55b97b0
651 changed files with 1941 additions and 653 deletions

View File

@ -286,7 +286,7 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
} }
private void loadMavenLibraries() { private void loadMavenLibraries() {
getLogger().info("Loading external libraries..."); getLogger().info("Loading external libraries");
LibraryManager lib = new BukkitLibraryManager(this); LibraryManager lib = new BukkitLibraryManager(this);
lib.addMavenCentral(); lib.addMavenCentral();
@ -324,8 +324,6 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
.relocate("net{}kyori", "clib{}net{}kyori").build()); .relocate("net{}kyori", "clib{}net{}kyori").build());
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("examination-string").version("1.3.0") lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("examination-string").version("1.3.0")
.relocate("net{}kyori", "clib{}net{}kyori").build()); .relocate("net{}kyori", "clib{}net{}kyori").build());
getLogger().info("Loaded.");
} }
@Override @Override

View File

@ -33,6 +33,8 @@ public class SleepTrait extends Trait {
if (sleeping) { if (sleeping) {
if (at == null) { if (at == null) {
wakeup(); wakeup();
} else {
npc.teleport(at, TeleportCause.PLUGIN);
} }
return; return;
} }
@ -48,7 +50,6 @@ public class SleepTrait extends Trait {
SUPPORT_BLOCKDATA = false; SUPPORT_BLOCKDATA = false;
} }
} }
npc.teleport(at, TeleportCause.PLUGIN);
if (npc.getEntity() instanceof Player) { if (npc.getEntity() instanceof Player) {
Player player = (Player) npc.getEntity(); Player player = (Player) npc.getEntity();
if ((SUPPORT_BLOCKDATA && at.getBlock().getBlockData() instanceof Bed) if ((SUPPORT_BLOCKDATA && at.getBlock().getBlockData() instanceof Bed)

View File

@ -64,8 +64,10 @@ public class BatController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -61,8 +61,10 @@ public class BlazeController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -70,8 +70,10 @@ public class CaveSpiderController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -81,8 +81,10 @@ public class ChickenController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -85,8 +85,10 @@ public class CowController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public boolean a(EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack) { public boolean a(EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack) {

View File

@ -76,8 +76,10 @@ public class CreeperController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected boolean a(EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack) { protected boolean a(EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack) {

View File

@ -61,8 +61,10 @@ public class EnderDragonController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -70,8 +70,10 @@ public class EndermanController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -70,8 +70,10 @@ public class EndermiteController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -47,8 +47,10 @@ public class GhastController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -56,8 +56,10 @@ public class GiantController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -56,8 +56,10 @@ public class GuardianController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -79,8 +79,10 @@ public class HorseController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -56,8 +56,10 @@ public class IronGolemController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -62,8 +62,10 @@ public class MagmaCubeController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -71,8 +71,10 @@ public class MushroomCowController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public boolean a(EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack) { public boolean a(EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack) {

View File

@ -67,8 +67,10 @@ public class OcelotController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -68,8 +68,10 @@ public class PigController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -57,8 +57,10 @@ public class PigZombieController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -58,8 +58,10 @@ public class PolarBearController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -68,8 +68,10 @@ public class RabbitController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -67,8 +67,10 @@ public class SheepController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -57,8 +57,10 @@ public class ShulkerController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -56,8 +56,10 @@ public class SilverfishController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -56,8 +56,10 @@ public class SkeletonController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -62,8 +62,10 @@ public class SlimeController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -56,8 +56,10 @@ public class SnowmanController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -56,8 +56,10 @@ public class SpiderController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -56,8 +56,10 @@ public class SquidController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -73,8 +73,10 @@ public class VillagerController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public boolean a(EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack) { public boolean a(EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack) {

View File

@ -56,8 +56,10 @@ public class WitchController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -47,8 +47,10 @@ public class WitherController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -69,8 +69,10 @@ public class WolfController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -56,8 +56,10 @@ public class ZombieController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bV() { protected SoundEffect bV() {

View File

@ -130,7 +130,8 @@ public class PlayerNavigation extends NavigationAbstract {
if (d1 * paramDouble1 + d2 * paramDouble2 >= 0.0D) { if (d1 * paramDouble1 + d2 * paramDouble2 >= 0.0D) {
PathType localPathType = this.e.a(this.b, k, paramInt2 - 1, m, this.a, paramInt4, paramInt5, PathType localPathType = this.e.a(this.b, k, paramInt2 - 1, m, this.a, paramInt4, paramInt5,
paramInt6, true, true); paramInt6, true, true);
if ((localPathType == PathType.WATER) || (localPathType == PathType.LAVA) || (localPathType == PathType.OPEN)) { if ((localPathType == PathType.WATER) || (localPathType == PathType.LAVA)
|| (localPathType == PathType.OPEN)) {
return false; return false;
} }
localPathType = this.e.a(this.b, k, paramInt2, m, this.a, paramInt4, paramInt5, paramInt6, true, localPathType = this.e.a(this.b, k, paramInt2, m, this.a, paramInt4, paramInt5, paramInt6, true,

View File

@ -64,8 +64,10 @@ public class BatController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -61,8 +61,10 @@ public class BlazeController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -70,8 +70,10 @@ public class CaveSpiderController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -81,8 +81,10 @@ public class ChickenController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -85,8 +85,10 @@ public class CowController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public boolean a(EntityHuman entityhuman, EnumHand enumhand) { public boolean a(EntityHuman entityhuman, EnumHand enumhand) {

View File

@ -73,8 +73,10 @@ public class CreeperController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -61,8 +61,10 @@ public class EnderDragonController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -70,8 +70,10 @@ public class EndermanController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -70,8 +70,10 @@ public class EndermiteController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -56,8 +56,10 @@ public class EvokerController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -47,8 +47,10 @@ public class GhastController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -56,8 +56,10 @@ public class GiantController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -56,8 +56,10 @@ public class GuardianController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -56,8 +56,10 @@ public class GuardianElderController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -79,8 +79,10 @@ public class HorseController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -79,8 +79,10 @@ public class HorseDonkeyController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -79,8 +79,10 @@ public class HorseMuleController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -80,8 +80,10 @@ public class HorseSkeletonController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -80,8 +80,10 @@ public class HorseZombieController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -56,8 +56,10 @@ public class IronGolemController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -79,8 +79,10 @@ public class LlamaController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -62,8 +62,10 @@ public class MagmaCubeController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public void A_() { public void A_() {

View File

@ -70,8 +70,10 @@ public class MushroomCowController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public boolean a(EntityHuman entityhuman, EnumHand enumhand) { public boolean a(EntityHuman entityhuman, EnumHand enumhand) {

View File

@ -67,8 +67,10 @@ public class OcelotController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -68,8 +68,10 @@ public class PigController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -57,8 +57,10 @@ public class PigZombieController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -58,8 +58,10 @@ public class PolarBearController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -68,8 +68,10 @@ public class RabbitController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -67,8 +67,10 @@ public class SheepController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -58,8 +58,10 @@ public class ShulkerController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public void A_() { public void A_() {

View File

@ -56,8 +56,10 @@ public class SilverfishController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -56,8 +56,10 @@ public class SkeletonController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -56,8 +56,10 @@ public class SkeletonStrayController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -56,8 +56,10 @@ public class SkeletonWitherController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -62,8 +62,10 @@ public class SlimeController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public void A_() { public void A_() {

View File

@ -56,8 +56,10 @@ public class SnowmanController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -56,8 +56,10 @@ public class SpiderController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -56,8 +56,10 @@ public class SquidController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -50,8 +50,10 @@ public class VexController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -75,8 +75,10 @@ public class VillagerController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public boolean a(EntityHuman entityhuman, EnumHand enumhand) { public boolean a(EntityHuman entityhuman, EnumHand enumhand) {

View File

@ -67,8 +67,10 @@ public class VindicatorController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -56,8 +56,10 @@ public class WitchController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -47,8 +47,10 @@ public class WitherController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -69,8 +69,10 @@ public class WolfController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -56,8 +56,10 @@ public class ZombieController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -56,8 +56,10 @@ public class ZombieHuskController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect bW() { protected SoundEffect bW() {

View File

@ -56,8 +56,10 @@ public class ZombieVillagerController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public SoundEffect bW() { public SoundEffect bW() {

View File

@ -128,7 +128,8 @@ public class PlayerNavigation extends NavigationAbstract {
if (d1 * paramDouble1 + d2 * paramDouble2 >= 0.0D) { if (d1 * paramDouble1 + d2 * paramDouble2 >= 0.0D) {
PathType localPathType = this.e.a(this.b, k, paramInt2 - 1, m, this.a, paramInt4, paramInt5, PathType localPathType = this.e.a(this.b, k, paramInt2 - 1, m, this.a, paramInt4, paramInt5,
paramInt6, true, true); paramInt6, true, true);
if ((localPathType == PathType.WATER) || (localPathType == PathType.LAVA) || (localPathType == PathType.OPEN)) { if ((localPathType == PathType.WATER) || (localPathType == PathType.LAVA)
|| (localPathType == PathType.OPEN)) {
return false; return false;
} }
localPathType = this.e.a(this.b, k, paramInt2, m, this.a, paramInt4, paramInt5, paramInt6, true, localPathType = this.e.a(this.b, k, paramInt2, m, this.a, paramInt4, paramInt5, paramInt6, true,

View File

@ -65,8 +65,10 @@ public class BatController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect cf() { protected SoundEffect cf() {

View File

@ -62,8 +62,10 @@ public class BlazeController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect cf() { protected SoundEffect cf() {

View File

@ -71,8 +71,10 @@ public class CaveSpiderController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public void a(float f, float f1, float f2) { public void a(float f, float f1, float f2) {

View File

@ -82,8 +82,10 @@ public class ChickenController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public void a(float f, float f1, float f2) { public void a(float f, float f1, float f2) {

View File

@ -86,8 +86,10 @@ public class CowController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public boolean a(EntityHuman entityhuman, EnumHand enumhand) { public boolean a(EntityHuman entityhuman, EnumHand enumhand) {

View File

@ -74,8 +74,10 @@ public class CreeperController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public void a(float f, float f1, float f2) { public void a(float f, float f1, float f2) {

View File

@ -62,8 +62,10 @@ public class EnderDragonController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
protected SoundEffect cf() { protected SoundEffect cf() {

View File

@ -71,8 +71,10 @@ public class EndermanController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public void a(float f, float f1, float f2) { public void a(float f, float f1, float f2) {

View File

@ -71,8 +71,10 @@ public class EndermiteController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public void a(float f, float f1, float f2) { public void a(float f, float f1, float f2) {

View File

@ -57,8 +57,10 @@ public class EvokerController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public void a(float f, float f1, float f2) { public void a(float f, float f1, float f2) {

View File

@ -48,8 +48,10 @@ public class GhastController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public boolean cC() { public boolean cC() {

View File

@ -57,8 +57,10 @@ public class GiantController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public void a(float f, float f1, float f2) { public void a(float f, float f1, float f2) {

View File

@ -57,8 +57,10 @@ public class GuardianController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public void a(float f, float f1, float f2) { public void a(float f, float f1, float f2) {

View File

@ -57,8 +57,10 @@ public class GuardianElderController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public void a(float f, float f1, float f2) { public void a(float f, float f1, float f2) {

View File

@ -86,8 +86,10 @@ public class HorseController extends MobEntityController {
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz); NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
Vector kb = event.getKnockbackVector(); Vector kb = event.getKnockbackVector();
if (!event.isCancelled()) {
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ()); super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
} }
}
@Override @Override
public void a(float f, float f1, float f2) { public void a(float f, float f1, float f2) {

Some files were not shown because too many files have changed in this diff Show More