Added teleport for map parser
Fixed new method in UtilFirework always being BALL_LARGE Updated lazer
This commit is contained in:
parent
92d9fc4ca0
commit
7dbba0a1f9
@ -60,8 +60,8 @@ public class UtilFirework
|
||||
firework.remove();
|
||||
}
|
||||
|
||||
public static void playFirework(Location loc, Type ballLarge, Color color, boolean flicker, boolean trail)
|
||||
public static void playFirework(Location loc, Type type, Color color, boolean flicker, boolean trail)
|
||||
{
|
||||
playFirework(loc, FireworkEffect.builder().flicker(false).withColor(color).with(Type.BALL_LARGE).trail(false).build());
|
||||
playFirework(loc, FireworkEffect.builder().flicker(false).withColor(color).with(type).trail(false).build());
|
||||
}
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.Callback;
|
||||
import mineplex.core.common.util.F;
|
||||
@ -525,41 +526,30 @@ public class MapParser extends JavaPlugin implements Listener
|
||||
{
|
||||
event.setQuitMessage(F.sys("Player Quit", event.getPlayer().getName()));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void damage(EntityDamageByEntityEvent event)
|
||||
{
|
||||
Entity ent = UtilEvent.GetDamagerEntity(event, false);
|
||||
if (ent != null && ent instanceof Player)
|
||||
System.out.println("DAMAGE");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void interactent(PlayerInteractEntityEvent event)
|
||||
{
|
||||
System.out.println("ENT INTERACT");
|
||||
|
||||
System.out.println(event.getPlayer().getTargetBlock(null, 0));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void interact(PlayerInteractEvent event)
|
||||
{
|
||||
System.out.println("INTERACT");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void debug(PlayerCommandPreprocessEvent event)
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void TeleportCommand(PlayerCommandPreprocessEvent event)
|
||||
{
|
||||
if (!event.getMessage().toLowerCase().startsWith("/tp"))
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
String[] tokens = event.getMessage().split(" ");
|
||||
|
||||
if (event.getMessage().contains("sheep"))
|
||||
if (tokens.length != 2)
|
||||
{
|
||||
player.setPassenger(player.getWorld().spawn(player.getLocation(), Sheep.class));
|
||||
UtilPlayer.message(player, F.main("Game", "Invalid Input. " + F.elem("/tp <Name>") + "."));
|
||||
return;
|
||||
}
|
||||
if (event.getMessage().contains("drop"))
|
||||
|
||||
Player target = UtilPlayer.searchOnline(player, tokens[1], true);
|
||||
if (target != null)
|
||||
{
|
||||
player.eject();
|
||||
UtilPlayer.message(player, F.main("Game", "You teleported to " + F.name(target.getName()) + "."));
|
||||
player.teleport(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ public class PerkLazer extends Perk
|
||||
|
||||
if (player.isBlocking())
|
||||
{
|
||||
player.setExp(Math.min(0.999f, player.getExp() + 0.03f));
|
||||
player.setExp(Math.min(0.999f, player.getExp() + 0.035f));
|
||||
|
||||
player.getWorld().playSound(player.getLocation(), Sound.FIZZ, 0.25f + player.getExp(), 0.75f + player.getExp());
|
||||
|
||||
@ -183,7 +183,7 @@ public class PerkLazer extends Perk
|
||||
UtilParticle.PlayParticle(ParticleType.EXPLODE, target, 0, 0, 0, 0, 1);
|
||||
|
||||
//Firework
|
||||
UtilFirework.playFirework(player.getEyeLocation(), Type.BALL, Color.YELLOW, false, false);
|
||||
UtilFirework.playFirework(player.getLocation().add(player.getLocation().getDirection().multiply(Math.max(0, curRange - 0.6))), Type.BURST, Color.YELLOW, false, false);
|
||||
|
||||
for (LivingEntity other : UtilEnt.getInRadius(target, 5).keySet())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user