Merge branch 'clans/beta' of github.com:Mineplex-LLC/Minecraft-PC into clans/beta

This commit is contained in:
phobia 2016-04-01 21:51:51 +11:00
commit 90e336b18e
5 changed files with 30 additions and 4 deletions

View File

@ -785,8 +785,14 @@ public class ClansDataAccessLayer
// Memory
claim.Safe = !claim.Safe;
// Save
_repository.updateTerritoryClaim(claim.Chunk, claim.Safe);
runAsync(new Runnable()
{
@Override
public void run()
{
_repository.updateTerritoryClaim(claim.Chunk, claim.Safe);
}
});
// Log
_manager.log("Safe Zone at [" + claim.Chunk + "] set to [" + claim.Safe + "] by [" + player + "].");
@ -807,7 +813,14 @@ public class ClansDataAccessLayer
public void clanExists(String clanName, Callback<Boolean> callback)
{
_repository.clanExists(clanName, callback);
runAsync(new Runnable()
{
@Override
public void run()
{
_repository.clanExists(clanName, callback);
}
});
}
public ClanRepository getRepository()

View File

@ -91,6 +91,7 @@ public class ClansMainTutorial extends Tutorial
player.teleport(Spawn.getNorthSpawn());
ClansManager.getInstance().getItemMapManager().setMap(player);
ClansManager.getInstance().getPvpTimer().unpause(player);
/*

View File

@ -47,6 +47,7 @@ public class CreateClanGoal extends ObjectiveGoal<ClanObjective>
if (contains(event.getFounder()))
{
finish(event.getFounder());
ClansManager.getInstance().resetLeftTimer(event.getFounder().getUniqueId());
}
}

View File

@ -1,5 +1,6 @@
package mineplex.game.clans.tutorial.tutorials.clans.objective.goals.clan;
import java.util.HashSet;
import java.util.UUID;
import org.bukkit.Bukkit;
@ -17,6 +18,8 @@ import mineplex.game.clans.tutorial.tutorials.clans.objective.ClanObjective;
public class LeaveSpawnGoal extends ObjectiveGoal<ClanObjective>
{
private HashSet<UUID> _removeList = new HashSet<UUID>();
public LeaveSpawnGoal(ClanObjective objective)
{
super(
@ -62,8 +65,15 @@ public class LeaveSpawnGoal extends ObjectiveGoal<ClanObjective>
Player player = Bukkit.getPlayer(uuid);
if (!getObjective().getPlugin().isIn(player, ClansMainTutorial.Bounds.SPAWN))
{
finish(player);
_removeList.add(uuid);
}
}
for (UUID uuid : _removeList)
{
finish(Bukkit.getPlayer(uuid));
}
_removeList.clear();
}
}

View File

@ -51,6 +51,7 @@ public class DisbandClanGoal extends ObjectiveGoal<FinalObjective>
UtilPlayer.message(event.getDisbander(), F.main("Clans", "You have disbanded your Tutorial Clan."));
ClansManager.getInstance().getClanDataAccess().delete(ClansManager.getInstance().getClan(event.getDisbander()), null);
ClansManager.getInstance().resetLeftTimer(event.getDisbander().getUniqueId());
finish(event.getDisbander());
}