本文整理汇总了Java中org.bukkit.event.entity.EntityUnleashEvent.UnleashReason类的典型用法代码示例。如果您正苦于以下问题:Java UnleashReason类的具体用法?Java UnleashReason怎么用?Java UnleashReason使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UnleashReason类属于org.bukkit.event.entity.EntityUnleashEvent包,在下文中一共展示了UnleashReason类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: updateLeashedState
import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason; //导入依赖的package包/类
protected void updateLeashedState()
{
if (this.field_110170_bx != null)
{
this.recreateLeash();
}
if (this.isLeashed)
{
if (this.leashedToEntity == null || this.leashedToEntity.isDead)
{
this.worldObj.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.HOLDER_GONE)); // CraftBukkit
this.clearLeashed(true, true);
}
}
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:17,代码来源:EntityLiving.java
示例2: cP
import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason; //导入依赖的package包/类
protected void cP() {
if (this.bF != null) {
this.cU();
}
if (this.bD) {
if (!this.isAlive()) {
this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.PLAYER_UNLEASH)); // CraftBukkit
this.unleash(true, true);
}
if (this.leashHolder == null || this.leashHolder.dead) {
this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.HOLDER_GONE)); // CraftBukkit
this.unleash(true, true);
}
}
}
开发者ID:bergerkiller,项目名称:SpigotSource,代码行数:18,代码来源:EntityInsentient.java
示例3: bL
import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason; //导入依赖的package包/类
protected void bL() {
if (this.bx != null) {
this.bP();
}
if (this.bv) {
if (this.bw == null || this.bw.dead) {
this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.HOLDER_GONE)); // CraftBukkit
this.unleash(true, true);
}
}
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:13,代码来源:EntityInsentient.java
示例4: bP
import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason; //导入依赖的package包/类
private void bP() {
if (this.bv && this.bx != null) {
if (this.bx.hasKeyOfType("UUIDMost", 4) && this.bx.hasKeyOfType("UUIDLeast", 4)) {
UUID uuid = new UUID(this.bx.getLong("UUIDMost"), this.bx.getLong("UUIDLeast"));
List list = this.world.a(EntityLiving.class, this.boundingBox.grow(10.0D, 10.0D, 10.0D));
Iterator iterator = list.iterator();
while (iterator.hasNext()) {
EntityLiving entityliving = (EntityLiving) iterator.next();
if (entityliving.getUniqueID().equals(uuid)) {
this.bw = entityliving;
break;
}
}
} else if (this.bx.hasKeyOfType("X", 99) && this.bx.hasKeyOfType("Y", 99) && this.bx.hasKeyOfType("Z", 99)) {
int i = this.bx.getInt("X");
int j = this.bx.getInt("Y");
int k = this.bx.getInt("Z");
EntityLeash entityleash = EntityLeash.b(this.world, i, j, k);
if (entityleash == null) {
entityleash = EntityLeash.a(this.world, i, j, k);
}
this.bw = entityleash;
} else {
this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN)); // CraftBukkit
this.unleash(false, true);
}
}
this.bx = null;
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:35,代码来源:EntityInsentient.java
示例5: bF
import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason; //导入依赖的package包/类
protected void bF() {
if (this.bx != null) {
this.bJ();
}
if (this.bv) {
if (this.bw == null || this.bw.dead) {
this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.HOLDER_GONE)); // CraftBukkit
this.unleash(true, true);
}
}
}
开发者ID:AlmuraDev,项目名称:Almura-Server,代码行数:13,代码来源:EntityInsentient.java
示例6: bJ
import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason; //导入依赖的package包/类
private void bJ() {
if (this.bv && this.bx != null) {
if (this.bx.hasKey("UUIDMost") && this.bx.hasKey("UUIDLeast")) {
UUID uuid = new UUID(this.bx.getLong("UUIDMost"), this.bx.getLong("UUIDLeast"));
List list = this.world.a(EntityLiving.class, this.boundingBox.grow(10.0D, 10.0D, 10.0D));
Iterator iterator = list.iterator();
while (iterator.hasNext()) {
EntityLiving entityliving = (EntityLiving) iterator.next();
if (entityliving.getUniqueID().equals(uuid)) {
this.bw = entityliving;
break;
}
}
} else if (this.bx.hasKey("X") && this.bx.hasKey("Y") && this.bx.hasKey("Z")) {
int i = this.bx.getInt("X");
int j = this.bx.getInt("Y");
int k = this.bx.getInt("Z");
EntityLeash entityleash = EntityLeash.b(this.world, i, j, k);
if (entityleash == null) {
entityleash = EntityLeash.a(this.world, i, j, k);
}
this.bw = entityleash;
} else {
this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN)); // CraftBukkit
this.unleash(false, true);
}
}
this.bx = null;
}
开发者ID:AlmuraDev,项目名称:Almura-Server,代码行数:35,代码来源:EntityInsentient.java
示例7: cU
import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason; //导入依赖的package包/类
private void cU() {
if (this.bD && this.bF != null) {
if (this.bF.b("UUID")) {
UUID uuid = this.bF.a("UUID");
List list = this.world.a(EntityLiving.class, this.getBoundingBox().g(10.0D));
Iterator iterator = list.iterator();
while (iterator.hasNext()) {
EntityLiving entityliving = (EntityLiving) iterator.next();
if (entityliving.getUniqueID().equals(uuid)) {
this.leashHolder = entityliving;
break;
}
}
} else if (this.bF.hasKeyOfType("X", 99) && this.bF.hasKeyOfType("Y", 99) && this.bF.hasKeyOfType("Z", 99)) {
BlockPosition blockposition = new BlockPosition(this.bF.getInt("X"), this.bF.getInt("Y"), this.bF.getInt("Z"));
EntityLeash entityleash = EntityLeash.b(this.world, blockposition);
if (entityleash == null) {
entityleash = EntityLeash.a(this.world, blockposition);
}
this.leashHolder = entityleash;
} else {
this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN)); // CraftBukkit
this.unleash(false, true);
}
}
this.bF = null;
}
开发者ID:bergerkiller,项目名称:SpigotSource,代码行数:33,代码来源:EntityInsentient.java
示例8: recreateLeash
import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason; //导入依赖的package包/类
private void recreateLeash()
{
if (this.isLeashed && this.field_110170_bx != null)
{
if (this.field_110170_bx.hasKey("UUIDMost", 4) && this.field_110170_bx.hasKey("UUIDLeast", 4))
{
UUID uuid = new UUID(this.field_110170_bx.getLong("UUIDMost"), this.field_110170_bx.getLong("UUIDLeast"));
List list = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, this.boundingBox.expand(10.0D, 10.0D, 10.0D));
Iterator iterator = list.iterator();
while (iterator.hasNext())
{
EntityLivingBase entitylivingbase = (EntityLivingBase)iterator.next();
if (entitylivingbase.getUniqueID().equals(uuid))
{
this.leashedToEntity = entitylivingbase;
break;
}
}
}
else if (this.field_110170_bx.hasKey("X", 99) && this.field_110170_bx.hasKey("Y", 99) && this.field_110170_bx.hasKey("Z", 99))
{
int i = this.field_110170_bx.getInteger("X");
int j = this.field_110170_bx.getInteger("Y");
int k = this.field_110170_bx.getInteger("Z");
EntityLeashKnot entityleashknot = EntityLeashKnot.getKnotForBlock(this.worldObj, i, j, k);
if (entityleashknot == null)
{
entityleashknot = EntityLeashKnot.func_110129_a(this.worldObj, i, j, k);
}
this.leashedToEntity = entityleashknot;
}
else
{
this.worldObj.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN)); // CraftBukkit
this.clearLeashed(false, true);
}
}
this.field_110170_bx = null;
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:45,代码来源:EntityLiving.java
示例9: EntityUnleashEvent
import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason; //导入依赖的package包/类
public EntityUnleashEvent(Entity entity, EntityUnleashEvent.UnleashReason reason) {
}
开发者ID:deathcap,项目名称:BedrockAPI,代码行数:3,代码来源:EntityUnleashEvent.java
示例10: getReason
import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason; //导入依赖的package包/类
public EntityUnleashEvent.UnleashReason getReason() {
return null;
}
开发者ID:deathcap,项目名称:BedrockAPI,代码行数:4,代码来源:EntityUnleashEvent.java
示例11: PlayerUnleashEntityEvent
import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason; //导入依赖的package包/类
public PlayerUnleashEntityEvent(Entity entity, Player player) {
super(entity, UnleashReason.PLAYER_UNLEASH);
}
开发者ID:deathcap,项目名称:BedrockAPI,代码行数:4,代码来源:PlayerUnleashEntityEvent.java
注:本文中的org.bukkit.event.entity.EntityUnleashEvent.UnleashReason类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论