mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 10:36:10 +01:00
Implement cancellable variant
This commit is contained in:
parent
868c7a463d
commit
d9c55b97b0
@ -286,7 +286,7 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
||||
}
|
||||
|
||||
private void loadMavenLibraries() {
|
||||
getLogger().info("Loading external libraries...");
|
||||
getLogger().info("Loading external libraries");
|
||||
|
||||
LibraryManager lib = new BukkitLibraryManager(this);
|
||||
lib.addMavenCentral();
|
||||
@ -324,8 +324,6 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("examination-string").version("1.3.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
|
||||
getLogger().info("Loaded.");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -33,6 +33,8 @@ public class SleepTrait extends Trait {
|
||||
if (sleeping) {
|
||||
if (at == null) {
|
||||
wakeup();
|
||||
} else {
|
||||
npc.teleport(at, TeleportCause.PLUGIN);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -48,7 +50,6 @@ public class SleepTrait extends Trait {
|
||||
SUPPORT_BLOCKDATA = false;
|
||||
}
|
||||
}
|
||||
npc.teleport(at, TeleportCause.PLUGIN);
|
||||
if (npc.getEntity() instanceof Player) {
|
||||
Player player = (Player) npc.getEntity();
|
||||
if ((SUPPORT_BLOCKDATA && at.getBlock().getBlockData() instanceof Bed)
|
||||
|
@ -64,7 +64,9 @@ public class BatController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,7 +61,9 @@ public class BlazeController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -70,7 +70,9 @@ public class CaveSpiderController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -81,7 +81,9 @@ public class ChickenController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -85,7 +85,9 @@ public class CowController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -76,7 +76,9 @@ public class CreeperController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,7 +61,9 @@ public class EnderDragonController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -70,7 +70,9 @@ public class EndermanController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -70,7 +70,9 @@ public class EndermiteController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,7 +47,9 @@ public class GhastController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class GiantController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class GuardianController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -79,7 +79,9 @@ public class HorseController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class IronGolemController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -62,7 +62,9 @@ public class MagmaCubeController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -71,7 +71,9 @@ public class MushroomCowController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -67,7 +67,9 @@ public class OcelotController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -68,7 +68,9 @@ public class PigController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,7 +57,9 @@ public class PigZombieController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -58,7 +58,9 @@ public class PolarBearController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -68,7 +68,9 @@ public class RabbitController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -67,7 +67,9 @@ public class SheepController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,7 +57,9 @@ public class ShulkerController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class SilverfishController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class SkeletonController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -62,7 +62,9 @@ public class SlimeController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class SnowmanController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class SpiderController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class SquidController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -73,7 +73,9 @@ public class VillagerController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class WitchController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,7 +47,9 @@ public class WitherController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -69,7 +69,9 @@ public class WolfController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class ZombieController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -130,7 +130,8 @@ public class PlayerNavigation extends NavigationAbstract {
|
||||
if (d1 * paramDouble1 + d2 * paramDouble2 >= 0.0D) {
|
||||
PathType localPathType = this.e.a(this.b, k, paramInt2 - 1, m, this.a, paramInt4, paramInt5,
|
||||
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;
|
||||
}
|
||||
localPathType = this.e.a(this.b, k, paramInt2, m, this.a, paramInt4, paramInt5, paramInt6, true,
|
||||
|
@ -64,7 +64,9 @@ public class BatController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,7 +61,9 @@ public class BlazeController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -70,7 +70,9 @@ public class CaveSpiderController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -81,7 +81,9 @@ public class ChickenController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -85,7 +85,9 @@ public class CowController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -73,7 +73,9 @@ public class CreeperController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,7 +61,9 @@ public class EnderDragonController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -70,7 +70,9 @@ public class EndermanController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -70,7 +70,9 @@ public class EndermiteController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class EvokerController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,7 +47,9 @@ public class GhastController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class GiantController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class GuardianController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class GuardianElderController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -79,7 +79,9 @@ public class HorseController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -79,7 +79,9 @@ public class HorseDonkeyController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -79,7 +79,9 @@ public class HorseMuleController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -80,7 +80,9 @@ public class HorseSkeletonController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -80,7 +80,9 @@ public class HorseZombieController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class IronGolemController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -79,7 +79,9 @@ public class LlamaController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -62,7 +62,9 @@ public class MagmaCubeController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -70,7 +70,9 @@ public class MushroomCowController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -67,7 +67,9 @@ public class OcelotController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -68,7 +68,9 @@ public class PigController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,7 +57,9 @@ public class PigZombieController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -58,7 +58,9 @@ public class PolarBearController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -68,7 +68,9 @@ public class RabbitController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -67,7 +67,9 @@ public class SheepController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -58,7 +58,9 @@ public class ShulkerController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class SilverfishController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class SkeletonController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class SkeletonStrayController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class SkeletonWitherController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -62,7 +62,9 @@ public class SlimeController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class SnowmanController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class SpiderController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class SquidController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -50,7 +50,9 @@ public class VexController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -75,7 +75,9 @@ public class VillagerController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -67,7 +67,9 @@ public class VindicatorController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class WitchController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,7 +47,9 @@ public class WitherController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -69,7 +69,9 @@ public class WolfController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class ZombieController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class ZombieHuskController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,9 @@ public class ZombieVillagerController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -128,7 +128,8 @@ public class PlayerNavigation extends NavigationAbstract {
|
||||
if (d1 * paramDouble1 + d2 * paramDouble2 >= 0.0D) {
|
||||
PathType localPathType = this.e.a(this.b, k, paramInt2 - 1, m, this.a, paramInt4, paramInt5,
|
||||
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;
|
||||
}
|
||||
localPathType = this.e.a(this.b, k, paramInt2, m, this.a, paramInt4, paramInt5, paramInt6, true,
|
||||
|
@ -65,7 +65,9 @@ public class BatController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -62,7 +62,9 @@ public class BlazeController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -71,7 +71,9 @@ public class CaveSpiderController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -82,7 +82,9 @@ public class ChickenController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -86,7 +86,9 @@ public class CowController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -74,7 +74,9 @@ public class CreeperController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -62,7 +62,9 @@ public class EnderDragonController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -71,7 +71,9 @@ public class EndermanController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -71,7 +71,9 @@ public class EndermiteController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,7 +57,9 @@ public class EvokerController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -48,7 +48,9 @@ public class GhastController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,7 +57,9 @@ public class GiantController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,7 +57,9 @@ public class GuardianController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,7 +57,9 @@ public class GuardianElderController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -86,7 +86,9 @@ public class HorseController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user