mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 03:34:43 +02:00
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:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user