Region fixes

This commit is contained in:
Shaun Bennett 2016-04-04 17:10:52 +10:00
parent be8ed78caa
commit 23e116f9b5
3 changed files with 27 additions and 36 deletions

View File

@ -357,30 +357,27 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
List<Location> jumpOffHolograms = Arrays.asList(
// West Spawn
new Location(Spawn.getSpawnWorld(), -295.5, 204, 36.5),
new Location(Spawn.getSpawnWorld(), -295.5, 204, -26.5),
new Location(Spawn.getSpawnWorld(), -331.5, 204, 6.5),
new Location(Spawn.getSpawnWorld(), -266.5, 204, 6.5),
new Location(Spawn.getSpawnWorld(), 8, 204, 359),
new Location(Spawn.getSpawnWorld(), 34, 204, 390),
new Location(Spawn.getSpawnWorld(), 8, 204, 418),
new Location(Spawn.getSpawnWorld(), -25, 204, 390),
// East Spawn
new Location(Spawn.getSpawnWorld(), 304.5, 207, -26.5),
new Location(Spawn.getSpawnWorld(), 332.5, 207, 6.5),
new Location(Spawn.getSpawnWorld(), 304.5, 207, 36.5),
new Location(Spawn.getSpawnWorld(), 268.5, 207, 6.5)
new Location(Spawn.getSpawnWorld(), 34, 207, -393),
new Location(Spawn.getSpawnWorld(), 8, 207, -365),
new Location(Spawn.getSpawnWorld(), -25, 207, -393),
new Location(Spawn.getSpawnWorld(), 8, 207, -424)
);
List<Location> welcomeHolograms = Arrays.asList(
// West Spawn
new Location(Spawn.getSpawnWorld(), -304.5, 204, 6.5),
new Location(Spawn.getSpawnWorld(), -295.5, 204, 15.5),
new Location(Spawn.getSpawnWorld(), -286.5, 204, 6.5),
new Location(Spawn.getSpawnWorld(), -295.5, 204, -2.5),
// East Spawn
new Location(Spawn.getSpawnWorld(), 295.5, 207, 6.5),
new Location(Spawn.getSpawnWorld(), 304.5, 207, -2.5),
new Location(Spawn.getSpawnWorld(), 313.5, 207, 6.5),
new Location(Spawn.getSpawnWorld(), 304.5, 207, 15.5)
new Location(Spawn.getSpawnWorld(), 17, 204, 390),
new Location(Spawn.getSpawnWorld(), 8, 204, 399),
new Location(Spawn.getSpawnWorld(), 0, 204, 390),
new Location(Spawn.getSpawnWorld(), 8, 204, 381),
new Location(Spawn.getSpawnWorld(), 8, 207, -384),
new Location(Spawn.getSpawnWorld(), 0, 207, -393),
new Location(Spawn.getSpawnWorld(), 8, 207, -402),
new Location(Spawn.getSpawnWorld(), 17, 207, -393)
);
for (Location location : jumpOffHolograms)

View File

@ -144,21 +144,8 @@ public class ClansRegions extends MiniPlugin
{
final ClanInfo clan = _manager.getClan(clanName);
// Only claim if the clan doesn't have claims. Speeds up startup time
if (clan == null || clan.getClaimSet().size() == 0)
if (clan == null)
{
if (clan != null)
{
for (Location location : locations)
{
claimArea(clan, location, chunkRadius, claimOffset, addNegative, safe);
log(String.format("Initialized %s faction territory and creation!", clanName));
}
debugClan(clanName);
return;
}
_manager.getClanDataAccess().create("ClansRegions", clanName, true, new Callback<ClanInfo>()
{
@Override
@ -171,7 +158,7 @@ public class ClansRegions extends MiniPlugin
claimArea(data, location, chunkRadius, claimOffset, addNegative, safe);
log(String.format("Initialized %s faction territory and creation!", clanName));
}
debugClan(clanName);
}
else
@ -182,6 +169,13 @@ public class ClansRegions extends MiniPlugin
}
});
}
else
{
for (Location location : locations)
{
claimArea(clan, location, chunkRadius, claimOffset, addNegative, safe);
}
}
}
/*private void claimArea(String clanName, int chunkRadius, int claimOffset, boolean safe, Location... locations)

View File

@ -59,9 +59,9 @@ public class TutorialWorldManager extends MiniPlugin
_regionStack = new Stack<>();
// Populate the stack with 100 available tutorial regions
for (int x = 0; x < 4; x++)
for (int x = 0; x < 10; x++)
{
for (int z = 0; z < 4; z++)
for (int z = 0; z < 10; z++)
{
long time = System.currentTimeMillis();
double xLoc = (x) * BLOCKS_BETWEEN_TUTORIALS; // 1000x1000 regions