2
0
Эх сурвалжийг харах

Players need to be in a party to use /ptp

Fixes #1967
TfT_02 11 жил өмнө
parent
commit
79a1ef5d3e

+ 1 - 0
Changelog.txt

@@ -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

+ 6 - 0
src/main/java/com/gmail/nossr50/commands/party/teleport/PtpCommand.java

@@ -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)) {