mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Added party levels
Parties now have XP and Levels. Party features such as party teleport and party chat have to be unlocked before they can be used by the party members
This commit is contained in:
@ -9,6 +9,8 @@ import org.bukkit.command.TabExecutor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.chat.ChatManager;
|
||||
import com.gmail.nossr50.chat.ChatManagerFactory;
|
||||
@ -111,6 +113,11 @@ public abstract class ChatCommand implements TabExecutor {
|
||||
return;
|
||||
}
|
||||
|
||||
if (chatMode == ChatMode.PARTY && (mcMMOPlayer.getParty().getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.CHAT))) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.1"));
|
||||
return;
|
||||
}
|
||||
|
||||
mcMMOPlayer.enableChat(chatMode);
|
||||
sender.sendMessage(chatMode.getEnabledMessage());
|
||||
}
|
||||
|
Reference in New Issue
Block a user