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,8 +64,10 @@ public class BatController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -61,8 +61,10 @@ public class BlazeController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -70,8 +70,10 @@ public class CaveSpiderController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -81,8 +81,10 @@ public class ChickenController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -85,8 +85,10 @@ public class CowController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean a(EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack) {
|
||||
|
@ -76,8 +76,10 @@ public class CreeperController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean a(EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack) {
|
||||
|
@ -61,8 +61,10 @@ public class EnderDragonController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -70,8 +70,10 @@ public class EndermanController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -70,8 +70,10 @@ public class EndermiteController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -47,8 +47,10 @@ public class GhastController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -56,8 +56,10 @@ public class GiantController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -56,8 +56,10 @@ public class GuardianController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -79,8 +79,10 @@ public class HorseController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -56,8 +56,10 @@ public class IronGolemController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -62,8 +62,10 @@ public class MagmaCubeController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -71,8 +71,10 @@ public class MushroomCowController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean a(EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack) {
|
||||
|
@ -67,8 +67,10 @@ public class OcelotController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -68,8 +68,10 @@ public class PigController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -57,8 +57,10 @@ public class PigZombieController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -58,8 +58,10 @@ public class PolarBearController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -68,8 +68,10 @@ public class RabbitController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -67,8 +67,10 @@ public class SheepController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -57,8 +57,10 @@ public class ShulkerController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -56,8 +56,10 @@ public class SilverfishController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -56,8 +56,10 @@ public class SkeletonController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -62,8 +62,10 @@ public class SlimeController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -56,8 +56,10 @@ public class SnowmanController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -56,8 +56,10 @@ public class SpiderController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -56,8 +56,10 @@ public class SquidController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -73,8 +73,10 @@ public class VillagerController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean a(EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack) {
|
||||
|
@ -56,8 +56,10 @@ public class WitchController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -47,8 +47,10 @@ public class WitherController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -69,8 +69,10 @@ public class WolfController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -56,8 +56,10 @@ public class ZombieController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bV() {
|
||||
|
@ -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,8 +64,10 @@ public class BatController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -61,8 +61,10 @@ public class BlazeController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -70,8 +70,10 @@ public class CaveSpiderController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -81,8 +81,10 @@ public class ChickenController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -85,8 +85,10 @@ public class CowController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean a(EntityHuman entityhuman, EnumHand enumhand) {
|
||||
|
@ -73,8 +73,10 @@ public class CreeperController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -61,8 +61,10 @@ public class EnderDragonController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -70,8 +70,10 @@ public class EndermanController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -70,8 +70,10 @@ public class EndermiteController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -56,8 +56,10 @@ public class EvokerController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -47,8 +47,10 @@ public class GhastController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -56,8 +56,10 @@ public class GiantController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -56,8 +56,10 @@ public class GuardianController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -56,8 +56,10 @@ public class GuardianElderController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -79,8 +79,10 @@ public class HorseController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -79,8 +79,10 @@ public class HorseDonkeyController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -79,8 +79,10 @@ public class HorseMuleController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -80,8 +80,10 @@ public class HorseSkeletonController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -80,8 +80,10 @@ public class HorseZombieController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -56,8 +56,10 @@ public class IronGolemController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -79,8 +79,10 @@ public class LlamaController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -62,8 +62,10 @@ public class MagmaCubeController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void A_() {
|
||||
|
@ -70,8 +70,10 @@ public class MushroomCowController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean a(EntityHuman entityhuman, EnumHand enumhand) {
|
||||
|
@ -67,8 +67,10 @@ public class OcelotController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -68,8 +68,10 @@ public class PigController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -57,8 +57,10 @@ public class PigZombieController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -58,8 +58,10 @@ public class PolarBearController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -68,8 +68,10 @@ public class RabbitController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -67,8 +67,10 @@ public class SheepController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -58,8 +58,10 @@ public class ShulkerController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void A_() {
|
||||
|
@ -56,8 +56,10 @@ public class SilverfishController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -56,8 +56,10 @@ public class SkeletonController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -56,8 +56,10 @@ public class SkeletonStrayController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -56,8 +56,10 @@ public class SkeletonWitherController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -62,8 +62,10 @@ public class SlimeController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void A_() {
|
||||
|
@ -56,8 +56,10 @@ public class SnowmanController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -56,8 +56,10 @@ public class SpiderController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -56,8 +56,10 @@ public class SquidController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -50,8 +50,10 @@ public class VexController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -75,8 +75,10 @@ public class VillagerController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean a(EntityHuman entityhuman, EnumHand enumhand) {
|
||||
|
@ -67,8 +67,10 @@ public class VindicatorController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -56,8 +56,10 @@ public class WitchController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -47,8 +47,10 @@ public class WitherController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -69,8 +69,10 @@ public class WolfController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -56,8 +56,10 @@ public class ZombieController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -56,8 +56,10 @@ public class ZombieHuskController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect bW() {
|
||||
|
@ -56,8 +56,10 @@ public class ZombieVillagerController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoundEffect bW() {
|
||||
|
@ -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,8 +65,10 @@ public class BatController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
|
@ -62,8 +62,10 @@ public class BlazeController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
|
@ -71,8 +71,10 @@ public class CaveSpiderController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
|
@ -82,8 +82,10 @@ public class ChickenController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
|
@ -86,8 +86,10 @@ public class CowController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean a(EntityHuman entityhuman, EnumHand enumhand) {
|
||||
|
@ -74,8 +74,10 @@ public class CreeperController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
|
@ -62,8 +62,10 @@ public class EnderDragonController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
|
@ -71,8 +71,10 @@ public class EndermanController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
|
@ -71,8 +71,10 @@ public class EndermiteController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
|
@ -57,8 +57,10 @@ public class EvokerController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
|
@ -48,8 +48,10 @@ public class GhastController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cC() {
|
||||
|
@ -57,8 +57,10 @@ public class GiantController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
|
@ -57,8 +57,10 @@ public class GuardianController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
|
@ -57,8 +57,10 @@ public class GuardianElderController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
|
@ -86,8 +86,10 @@ public class HorseController extends MobEntityController {
|
||||
NPCKnockbackEvent event = new NPCKnockbackEvent(npc, strength, dx, dz);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Vector kb = event.getKnockbackVector();
|
||||
if (!event.isCancelled()) {
|
||||
super.a(entity, (float) event.getStrength(), kb.getX(), kb.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
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
Loading…
Reference in New Issue
Block a user