Merge remote-tracking branch 'origin/clans-beta' into clans-beta

Conflicts:
	Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/WindBlade.java
This commit is contained in:
Shaun Bennett 2015-11-25 23:26:29 -05:00
commit 8f14c8beae
5 changed files with 50 additions and 15 deletions

View File

@ -60,6 +60,7 @@ import mineplex.game.clans.clans.commands.ClanManagementCommand;
import mineplex.game.clans.clans.commands.ClansAllyChatCommand;
import mineplex.game.clans.clans.commands.ClansChatCommand;
import mineplex.game.clans.clans.commands.ClansCommand;
import mineplex.game.clans.clans.commands.KillCommand;
import mineplex.game.clans.clans.commands.MapCommand;
import mineplex.game.clans.clans.commands.RegionsCommand;
import mineplex.game.clans.clans.data.PlayerClan;
@ -212,6 +213,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
_npcManager = new NpcManager(plugin, creature);
_condition = new SkillConditionManager(plugin);
DamageManager damageManager = new DamageManager(plugin, _combatManager, _npcManager, _disguiseManager, _condition);
damageManager.addCommand(new KillCommand(damageManager));
_worldEvent = new WorldEventManager(plugin, this, damageManager, _lootManager, blockRestore, _clanRegions, null);
TaskManager taskManager = new TaskManager(plugin, _clientManager, webServerAddress);
@ -543,9 +545,14 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
ClanInfo clan = _clanUtility.getClanByPlayer(event.getPlayer());
String rank = _clientManager.Get(event.getPlayer()).GetRank().getTag(true, false);
if (!_clientManager.Get(event.getPlayer()).GetRank().has(Rank.MEDIA))
rank = "";
if (client.isClanChat() && clan != null)
{
event.setFormat(C.cAqua + "%1$s " + C.cDAqua + "%2$s");
event.setFormat(rank + " " + C.cAqua + "%1$s " + C.cDAqua + "%2$s");
event.getRecipients().clear();
for (ClansPlayer cur : clan.getMembers().values())
@ -559,7 +566,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
}
else if (client.isAllyChat() && clan != null)
{
event.setFormat(C.cDGreen + clan.getName() + " " + C.cDGreen + "%1$s " + C.cGreen + "%2$s");
event.setFormat(rank + " " + C.cDGreen + clan.getName() + " " + C.cDGreen + "%1$s " + C.cGreen + "%2$s");
event.getRecipients().clear();
for (ClansPlayer cur : clan.getMembers().values())
@ -590,12 +597,12 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
{
if (clan == null)
{
event.setFormat(C.cYellow + "%1$s " + C.cWhite + "%2$s");
event.setFormat(rank + " " + C.cYellow + "%1$s " + C.cWhite + "%2$s");
return;
}
event.getRecipients().clear();
event.setFormat(C.cGold + clan.getName() + " " + C.cYellow + "%1$s " + C.cWhite + "%2$s");
event.setFormat(rank + " " + C.cGold + clan.getName() + " " + C.cYellow + "%1$s " + C.cWhite + "%2$s");
for (Player other : UtilServer.getPlayers())
{
@ -607,18 +614,10 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
}
else
{
String rank = _clientManager.Get(event.getPlayer()).GetRank().getTag(true, false);
if (rank.length() > 0)
rank += " ";
if (!_clientManager.Get(event.getPlayer()).GetRank().has(Rank.MEDIA))
rank = "";
String message = event.getMessage();
message = _chat.getFilteredMessage(event.getPlayer(), message);
ClanRelation rel = _clanUtility.rel(clan, otherClan);
String formatted = rank + rel.getColor(true) + clan.getName() + " " + rel.getColor(false) + event.getPlayer().getName() + " " + C.cWhite + message;
String formatted = rank + " " + rel.getColor(true) + clan.getName() + " " + rel.getColor(false) + event.getPlayer().getName() + " " + C.cWhite + message;
other.sendMessage(formatted);
}
}

View File

@ -0,0 +1,25 @@
package mineplex.game.clans.clans.commands;
import org.bukkit.entity.Player;
import mineplex.core.command.CommandBase;
import mineplex.core.common.Rank;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilPlayer;
import mineplex.minecraft.game.core.damage.DamageManager;
public class KillCommand extends CommandBase<DamageManager>
{
public KillCommand(DamageManager plugin)
{
super(plugin, Rank.ALL, "suicide", "kill");
}
@Override
public void Execute(Player caller, String[] args)
{
UtilPlayer.message(caller, F.main("Clans", "You have imploded."));
caller.setHealth(0D);
}
}

View File

@ -12,7 +12,7 @@ public class GearCommand extends CommandBase<GearManager>
public GearCommand(GearManager plugin)
{
super(plugin, Rank.ADMIN, "gear", "custom-gear");
super(plugin, Rank.ADMIN, new Rank[]{Rank.JNR_DEV}, "gear", "custom-gear");
_gearManager = plugin;
}

View File

@ -46,7 +46,7 @@ public class HyperAxe extends LegendaryItem
event.SetIgnoreRate(true);
// log("Ignoring rate!");
event.AddMod("Hyper Axe", 4);
event.AddMod("Hyper Axe", 1);
}
else
{

View File

@ -8,6 +8,8 @@ import org.bukkit.util.Vector;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilWorld;
import mineplex.game.clans.clans.ClansManager;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
public class MagneticMaul extends LegendaryItem
@ -22,6 +24,15 @@ public class MagneticMaul extends LegendaryItem
@Override
public void update(Player wielder)
{
Location loc = wielder.getLocation();
if (ClansManager.getInstance().getClaimMap().containsKey(UtilWorld.chunkToStr(loc.getChunk())))
{
if (!ClansManager.getInstance().getClaimMap().get(UtilWorld.chunkToStr(loc.getChunk())).Safe)
{
return;
}
}
if (isHoldingRightClick() && canPull())
{
pullEntities(wielder);