Quick fixes.
This commit is contained in:
parent
041f24076b
commit
39e7e2c53f
Binary file not shown.
@ -149,20 +149,18 @@ public class EliteMonster {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void retargetInAir() {
|
private void retargetInAir() {
|
||||||
Player p = ChooseRandomTarget();
|
if (Math.random()<=0.2) {
|
||||||
if (p!=null) {
|
Player p = ChooseRandomTarget();
|
||||||
if (Math.random()<=0.2 && !p.isOnGround()) {
|
//p.addPotionEffect(new PotionEffect(PotionEffectType.LEVITATION,20*5,-31));
|
||||||
//p.addPotionEffect(new PotionEffect(PotionEffectType.LEVITATION,20*5,-31));
|
p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP,20*5,-1));
|
||||||
p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP,20*5,-1));
|
p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS,10*1,7));
|
||||||
p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS,10*1,7));
|
m.setTarget(p);
|
||||||
m.setTarget(p);
|
p.setFlying(false);
|
||||||
p.setFlying(false);
|
p.setVelocity(new Vector(0,-1,0));
|
||||||
p.setVelocity(new Vector(0,-1,0));
|
p.removePotionEffect(PotionEffectType.LEVITATION);
|
||||||
p.removePotionEffect(PotionEffectType.LEVITATION);
|
p.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION,(int)(20*2.25),0));
|
||||||
p.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION,(int)(20*2.25),0));
|
p.playSound(p.getLocation(), Sound.BLOCK_ANVIL_FALL, 0.4f, 0.8f);
|
||||||
p.playSound(p.getLocation(), Sound.BLOCK_ANVIL_FALL, 0.4f, 0.8f);
|
p.playSound(p.getLocation(), Sound.ENTITY_MAGMACUBE_SQUISH, 1.0f, 1.0f);
|
||||||
p.playSound(p.getLocation(), Sound.ENTITY_MAGMACUBE_SQUISH, 1.0f, 1.0f);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,6 +128,7 @@ import org.bukkit.event.player.PlayerItemBreakEvent;
|
|||||||
import org.bukkit.event.player.PlayerItemConsumeEvent;
|
import org.bukkit.event.player.PlayerItemConsumeEvent;
|
||||||
import org.bukkit.event.player.PlayerItemHeldEvent;
|
import org.bukkit.event.player.PlayerItemHeldEvent;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
|
import org.bukkit.event.player.PlayerKickEvent;
|
||||||
import org.bukkit.event.player.PlayerMoveEvent;
|
import org.bukkit.event.player.PlayerMoveEvent;
|
||||||
import org.bukkit.event.player.PlayerPickupArrowEvent;
|
import org.bukkit.event.player.PlayerPickupArrowEvent;
|
||||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||||
@ -3303,6 +3304,13 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
|
||||||
|
public void onPlayerKick(PlayerKickEvent ev) {
|
||||||
|
if (DeathManager.deathStructureExists(ev.getPlayer())) {
|
||||||
|
DeathManager.removeDeathStructure(ev.getPlayer());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
|
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
|
||||||
public void onInventoryClick(InventoryClickEvent ev) {
|
public void onInventoryClick(InventoryClickEvent ev) {
|
||||||
@ -3324,7 +3332,8 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
//player.getInventory().addItem(ev.getCurrentItem());
|
//player.getInventory().addItem(ev.getCurrentItem());
|
||||||
if (ev.getCurrentItem()!=null &&
|
if (ev.getCurrentItem()!=null &&
|
||||||
ev.getCurrentItem().getType()!=Material.AIR) {
|
ev.getCurrentItem().getType()!=Material.AIR) {
|
||||||
player.getLocation().getWorld().dropItemNaturally(player.getLocation(), ev.getCurrentItem()).setPickupDelay(0);
|
//player.getLocation().getWorld().dropItemNaturally(player.getLocation(), ev.getCurrentItem()).setPickupDelay(0);
|
||||||
|
GenericFunctions.giveItem(player, ev.getCurrentItem());
|
||||||
ev.setCurrentItem(new ItemStack(Material.AIR));
|
ev.setCurrentItem(new ItemStack(Material.AIR));
|
||||||
|
|
||||||
final DecimalFormat df = new DecimalFormat("0.00");
|
final DecimalFormat df = new DecimalFormat("0.00");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user