Merge branch 'clans-beta' of ssh://184.154.0.242:7999/min/Mineplex into clans-beta

This commit is contained in:
NewGarbo 2015-12-06 19:11:13 +00:00
commit 425463d339
6 changed files with 11 additions and 9 deletions

View File

@ -49,7 +49,7 @@ import net.minecraft.server.v1_8_R3.MinecraftServer;
public class Clans extends JavaPlugin public class Clans extends JavaPlugin
{ {
public static final String VERSION = "0.17"; public static final String VERSION = "0.17b";
private String WEB_CONFIG = "webServer"; private String WEB_CONFIG = "webServer";
// Modules // Modules

View File

@ -656,6 +656,10 @@ public class ClansDataAccessLayer
{ {
final Timestamp currentTime = new Timestamp(System.currentTimeMillis()); final Timestamp currentTime = new Timestamp(System.currentTimeMillis());
final ClanWarData war = new ClanWarData(clanA.getName(), clanB.getName(), score, currentTime, currentTime, 0); final ClanWarData war = new ClanWarData(clanA.getName(), clanB.getName(), score, currentTime, currentTime, 0);
// Memory
clanA.addWar(war);
clanB.addWar(war);
runAsync(new Runnable() runAsync(new Runnable()
{ {
@ -669,10 +673,6 @@ public class ClansDataAccessLayer
@Override @Override
public void run() public void run()
{ {
// Memory
clanA.addWar(war);
clanB.addWar(war);
_manager.log("Initiator war for [" + clanA.getName() + "] against [" + clanB.getName() + "]."); _manager.log("Initiator war for [" + clanA.getName() + "] against [" + clanB.getName() + "].");
if (warCallback != null) warCallback.run(war); if (warCallback != null) warCallback.run(war);

View File

@ -305,7 +305,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
loadClan(token); loadClan(token);
} }
new ClaimVisualizer(plugin, this); // new ClaimVisualizer(plugin, this);
// RedisDataRepository(ConnectionData writeConn, ConnectionData // RedisDataRepository(ConnectionData writeConn, ConnectionData
// readConn, Region region, Class<T> elementType, String elementLabel) // readConn, Region region, Class<T> elementType, String elementLabel)

View File

@ -35,6 +35,7 @@ public class HeavyArrowsAttribute extends ItemAttribute
@Override @Override
public void onAttack(CustomDamageEvent event) public void onAttack(CustomDamageEvent event)
{ {
event.AddKnockback("HeavyAttribute", _knockbackPercent); double knockback = (_knockbackPercent / 100d) * 6;
event.AddKnockback("Heavy Attribute", knockback);
} }
} }

View File

@ -248,7 +248,7 @@ public class Spawn extends MiniPlugin
if (isInSpawn(player)) if (isInSpawn(player))
{ {
UtilPlayer.message(event.GetPlayer(), F.main("Safe Zone", "You cannot use " + F.skill(event.GetSkillName() + " in " + F.elem("Safe Zone") + "."))); UtilPlayer.message(event.GetPlayer(), F.main("Safe Zone", "You cannot use " + F.skill(event.GetSkillName()) + " in " + F.elem("Safe Zone") + "."));
event.SetCancelled(true); event.SetCancelled(true);
} }
} }

View File

@ -33,6 +33,7 @@ public class TaskLeaveSpawn extends TutorialTask<TutorialGettingStarted>
if (player.getLocation().getY() < 100) if (player.getLocation().getY() < 100)
{ {
finishFor(player); finishFor(player);
_inTask.remove(player.getName());
} }
} }
@ -50,7 +51,7 @@ public class TaskLeaveSpawn extends TutorialTask<TutorialGettingStarted>
String playerName = iterator.next(); String playerName = iterator.next();
Player player = UtilPlayer.searchExact(playerName); Player player = UtilPlayer.searchExact(playerName);
if (player.getLocation().getY() < 100 && getClans().getClanUtility().getClaim(player.getLocation()) == null) if (player != null && player.getLocation().getY() < 100 && getClans().getClanUtility().getClaim(player.getLocation()) == null)
{ {
finishFor(player); finishFor(player);
iterator.remove(); iterator.remove();