Tests
This commit is contained in:
parent
0b2d0d348c
commit
d04e29a473
@ -3,8 +3,10 @@ package mineplex.core.gadget.gadgets.wineffect.rankrooms.rankwineffects;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.Creeper;
|
import org.bukkit.entity.Creeper;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import mineplex.core.common.Rank;
|
import mineplex.core.common.Rank;
|
||||||
|
import mineplex.core.common.util.UtilServer;
|
||||||
import mineplex.core.disguise.disguises.DisguisePlayer;
|
import mineplex.core.disguise.disguises.DisguisePlayer;
|
||||||
import mineplex.core.gadget.GadgetManager;
|
import mineplex.core.gadget.GadgetManager;
|
||||||
import mineplex.core.gadget.gadgets.wineffect.rankrooms.WinEffectRankBased;
|
import mineplex.core.gadget.gadgets.wineffect.rankrooms.WinEffectRankBased;
|
||||||
@ -24,13 +26,19 @@ public class WinEffectRankUltra extends WinEffectRankBased
|
|||||||
public void play()
|
public void play()
|
||||||
{
|
{
|
||||||
Location loc = getBaseLocation();
|
Location loc = getBaseLocation();
|
||||||
loc.setDirection(_player.getLocation().subtract(loc).toVector());
|
|
||||||
|
loc.setDirection(_player.getLocation().subtract(loc).toVector().multiply(-1));
|
||||||
|
|
||||||
_npc = getNPC(getPlayer(), loc);
|
_npc = getNPC(getPlayer(), loc);
|
||||||
|
|
||||||
_creeper = loc.getWorld().spawn(loc.add(loc.getDirection().multiply(-3)), Creeper.class);
|
_creeper = loc.getWorld().spawn(loc.add(loc.getDirection().multiply(-3)), Creeper.class);
|
||||||
_creeper.setPowered(true);
|
_creeper.setPowered(true);
|
||||||
_creeper.setTarget((LivingEntity) _npc.getEntity().getBukkitEntity());
|
_creeper.setTarget((LivingEntity) _npc.getEntity().getBukkitEntity());
|
||||||
|
|
||||||
|
for (Player player : UtilServer.getPlayers())
|
||||||
|
{
|
||||||
|
player.teleport(_npc.getEntity().getBukkitEntity());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -349,7 +349,9 @@ public abstract class WinEffectGadget extends Gadget
|
|||||||
public Schematic pasteScematic(String schematicName) {
|
public Schematic pasteScematic(String schematicName) {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Schematic schematic = UtilSchematic.loadSchematic(new File("../../update/schematic/" + schematicName + ".schematic"));
|
// TODO CHANGE FOLDER
|
||||||
|
//Schematic schematic = UtilSchematic.loadSchematic(new File("../../update/schematic/" + schematicName + ".schematic"));
|
||||||
|
Schematic schematic = UtilSchematic.loadSchematic(new File("../../schematics/" + schematicName + ".schematic"));
|
||||||
if (schematic != null)
|
if (schematic != null)
|
||||||
schematic.paste(getBaseLocation(), false, true);
|
schematic.paste(getBaseLocation(), false, true);
|
||||||
return schematic;
|
return schematic;
|
||||||
|
Loading…
Reference in New Issue
Block a user