Players need to be in a party to use /ptp

Fixes #1967
This commit is contained in:
TfT_02 2014-04-06 12:43:42 +02:00
parent 10dd7619bf
commit 79a1ef5d3e
2 changed files with 7 additions and 0 deletions

View File

@ -10,6 +10,7 @@ Key:
Version 1.5.01-dev
+ Added support for `MATERIAL|data` format in treasures.yml
= Fixed bug where the Updater was running on the main thread.
= Fixed bug when players would use /ptp without being in a party
! Vanished players no longer get hit by AoE effects
Version 1.5.00

View File

@ -43,6 +43,12 @@ public class PtpCommand implements TabExecutor {
Player player = (Player) sender;
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
if (!mcMMOPlayer.inParty()) {
sender.sendMessage(LocaleLoader.getString("Commands.Party.None"));
return true;
}
Party party = mcMMOPlayer.getParty();
if (party.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.TELEPORT)) {