fixing spawns and monster slowdown.
This commit is contained in:
parent
90c6d0a83f
commit
114ae33d89
@ -49,6 +49,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Giant;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -310,6 +311,13 @@ public class TypeWars extends TeamGame
|
||||
private void initSpawns()
|
||||
{
|
||||
WorldData data = WorldData;
|
||||
|
||||
((CraftWorld) data.World).getHandle().spigotConfig.animalActivationRange = 200;
|
||||
((CraftWorld) data.World).getHandle().spigotConfig.monsterActivationRange = 200;
|
||||
|
||||
((CraftWorld) data.World).getHandle().spigotConfig.animalTrackingRange = 200;
|
||||
((CraftWorld) data.World).getHandle().spigotConfig.monsterTrackingRange = 200;
|
||||
|
||||
_minionSpawns.put(GetTeamList().get(1), (ArrayList<Location>)data.GetDataLocs("RED").clone());
|
||||
_minionSpawns.put(GetTeamList().get(0), (ArrayList<Location>)data.GetDataLocs("LIGHT_BLUE").clone());
|
||||
|
||||
@ -345,12 +353,16 @@ public class TypeWars extends TeamGame
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void tutorialEnd(GameTutorialEndEvent event)
|
||||
public void tutorialEnd(final GameTutorialEndEvent event)
|
||||
{
|
||||
Manager.runSyncLater(new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
int i = 0;
|
||||
for(Player player : event.getTutorial().getPlayers().keySet())
|
||||
{
|
||||
Location location = event.getTutorial().getTeam().GetSpawns().get(i);
|
||||
Location location = player.getLocation().clone();
|
||||
for(GameTeam team : GetTeamList())
|
||||
{
|
||||
if(team != event.getTutorial().getTeam())
|
||||
@ -360,11 +372,10 @@ public class TypeWars extends TeamGame
|
||||
}
|
||||
}
|
||||
player.teleport(location);
|
||||
i++;
|
||||
if(i >= event.getTutorial().getTeam().GetSpawns().size())
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
}, 7);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTutorials()
|
||||
|
@ -21,7 +21,6 @@ public class TutorialTypeWars extends GameTutorial
|
||||
public TutorialTypeWars(ArcadeManager manager)
|
||||
{
|
||||
super(manager, new TutorialPhase[]{new TutorialPhaseTypeWars()});
|
||||
this.TeleportOnEnd = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user