Added party alliances

Adds the following commands:
`/party alliance`
`/party alliance invite <target>`
`/party alliance accept`

Allies will share party chat and will not be able to harm eachother.
Item and XP sharing is limitied to a single party. Allowing two parties
to team up without sharing resources and XP.

Closes #1009
This commit is contained in:
TfT_02
2013-10-28 14:01:44 +01:00
parent e6e90954a9
commit c729297615
37 changed files with 607 additions and 40 deletions

View File

@ -10,6 +10,7 @@ import org.bukkit.plugin.Plugin;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.party.Party;
import com.gmail.nossr50.events.chat.McMMOPartyChatEvent;
import com.gmail.nossr50.locale.LocaleLoader;
public class PartyChatManager extends ChatManager {
private Party party;
@ -37,6 +38,13 @@ public class PartyChatManager extends ChatManager {
member.sendMessage(message);
}
if (party.getAlly() != null) {
for (Player member : party.getAlly().getOnlineMembers()) {
String allyPrefix = LocaleLoader.formatString(Config.getInstance().getPartyChatPrefixAlly());
member.sendMessage(allyPrefix + message);
}
}
plugin.getLogger().info("[P]<" + party.getName() + ">" + message);
}
}