use of org.bukkit.event.entity.CreeperPowerEvent in project WindSpigot by Wind-Development.
the class CraftCreeper method setPowered.
@Override
public void setPowered(boolean powered) {
CraftServer server = this.server;
Creeper entity = (Creeper) this.getHandle().getBukkitEntity();
if (powered) {
CreeperPowerEvent event = new CreeperPowerEvent(entity, CreeperPowerEvent.PowerCause.SET_ON);
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
getHandle().setPowered(true);
}
} else {
CreeperPowerEvent event = new CreeperPowerEvent(entity, CreeperPowerEvent.PowerCause.SET_OFF);
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
getHandle().setPowered(false);
}
}
}
use of org.bukkit.event.entity.CreeperPowerEvent in project Magma by magmafoundation.
the class CraftCreeper method setPowered.
public void setPowered(boolean powered) {
CraftServer server = this.server;
Creeper entity = (Creeper) this.getHandle().getBukkitEntity();
if (powered) {
CreeperPowerEvent event = new CreeperPowerEvent(entity, CreeperPowerEvent.PowerCause.SET_ON);
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
getHandle().setPowered(true);
}
} else {
CreeperPowerEvent event = new CreeperPowerEvent(entity, CreeperPowerEvent.PowerCause.SET_OFF);
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
getHandle().setPowered(false);
}
}
}
use of org.bukkit.event.entity.CreeperPowerEvent in project NachoSpigot by CobbleSword.
the class CraftCreeper method setPowered.
public void setPowered(boolean powered) {
CraftServer server = this.server;
Creeper entity = (Creeper) this.getHandle().getBukkitEntity();
if (powered) {
CreeperPowerEvent event = new CreeperPowerEvent(entity, CreeperPowerEvent.PowerCause.SET_ON);
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
getHandle().setPowered(true);
}
} else {
CreeperPowerEvent event = new CreeperPowerEvent(entity, CreeperPowerEvent.PowerCause.SET_OFF);
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
getHandle().setPowered(false);
}
}
}
use of org.bukkit.event.entity.CreeperPowerEvent in project CumServerPro by MCUmbrella.
the class CraftCreeper method setPowered.
public void setPowered(boolean powered) {
CraftServer server = this.server;
Creeper entity = (Creeper) this.getHandle().getBukkitEntity();
if (powered) {
CreeperPowerEvent event = new CreeperPowerEvent(entity, CreeperPowerEvent.PowerCause.SET_ON);
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
getHandle().setPowered(true);
}
} else {
CreeperPowerEvent event = new CreeperPowerEvent(entity, CreeperPowerEvent.PowerCause.SET_OFF);
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
getHandle().setPowered(false);
}
}
}
use of org.bukkit.event.entity.CreeperPowerEvent in project Magma-1.16.x by magmafoundation.
the class CraftCreeper method setPowered.
@Override
public void setPowered(boolean powered) {
CraftServer server = this.server;
Creeper entity = (Creeper) this.getHandle().getBukkitEntity();
if (powered) {
CreeperPowerEvent event = new CreeperPowerEvent(entity, CreeperPowerEvent.PowerCause.SET_ON);
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
getHandle().setPowered(true);
}
} else {
CreeperPowerEvent event = new CreeperPowerEvent(entity, CreeperPowerEvent.PowerCause.SET_OFF);
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
getHandle().setPowered(false);
}
}
}
Aggregations