Răsfoiți Sursa

Made it so you leave your party if you enter a world where you don't
have party permissions. Also removed some unused stuff from
PlayerProfile.

GJ 13 ani în urmă
părinte
comite
71e09423fe

+ 1 - 0
Changelog.txt

@@ -32,6 +32,7 @@ Version 2.0.00-dev
  ! Changed Blast Mining to track based on Entity ID vs. Location
  ! Changed mmoedit to save a profile when used (this will make mctop update)
  ! Changed a few Runnable tasks to have their own classes
+ ! Changed parties so that a player will leave their existing party if they enter a world where they don't have party permissions.
 
 Version 1.3.02
  + Added in game guides for Mining, Excavation, and Acrobatics. Simply type /skillname ? to access them

+ 2 - 15
src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java

@@ -26,8 +26,8 @@ public class PlayerProfile
 	private String party, invite;
 	
 	//TOGGLES
-	private boolean loaded = false, partyhud = true, spoutcraft = false, filling = false, xpbarlocked = false, placedAnvil = false, partyChatMode = false, adminChatMode = false, godMode = false, greenTerraMode, partyChatOnly = false, greenTerraInformed = true, berserkInformed = true, skullSplitterInformed = true, gigaDrillBreakerInformed = true, 
-	superBreakerInformed = true, blastMiningInformed = true, serratedStrikesInformed = true, treeFellerInformed = true, dead, abilityuse = true, treeFellerMode, superBreakerMode, gigaDrillBreakerMode, 
+	private boolean loaded = false, partyhud = true, spoutcraft = false, xpbarlocked = false, placedAnvil = false, partyChatMode = false, adminChatMode = false, godMode = false, greenTerraMode, partyChatOnly = false, greenTerraInformed = true, berserkInformed = true, skullSplitterInformed = true, gigaDrillBreakerInformed = true, 
+	superBreakerInformed = true, blastMiningInformed = true, serratedStrikesInformed = true, treeFellerInformed = true, abilityuse = true, treeFellerMode, superBreakerMode, gigaDrillBreakerMode, 
 	serratedStrikesMode, hoePreparationMode = false, shovelPreparationMode = false, swordsPreparationMode = false, fistsPreparationMode = false, pickaxePreparationMode = false, axePreparationMode = false, skullSplitterMode, berserkMode;
 	
 	//TIMESTAMPS
@@ -532,15 +532,6 @@ public class PlayerProfile
     {
     	spoutcraft = !spoutcraft;
     }
-    
-    public boolean isFilling()
-    {
-    	return filling;
-    }
-    public void toggleFilling()
-    {
-    	filling = !filling;
-    }
     public HUDType getHUDType()
     {
     	return hud;
@@ -1171,10 +1162,6 @@ public class PlayerProfile
     	}
     }
     
-    public boolean isDead(){
-    	return dead;
-    }
-
     public String getPlayerName()
     {
         return playerName;

+ 7 - 0
src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java

@@ -66,6 +66,13 @@ public class mcPlayerListener implements Listener {
                 player.sendMessage(mcLocale.getString("GodMode.Forbidden"));
             }
         }
+
+        if (PP.inParty()) {
+            if (!mcPermissions.getInstance().party(player)) {
+                PP.removeParty();
+                player.sendMessage(mcLocale.getString("Party.Forbidden"));
+            }
+        }
     }
 
     /**

+ 2 - 1
src/main/resources/locale/locale_de.properties

@@ -443,4 +443,5 @@ Guides.Unarmed=Guide coming soon...
 Guides.Woodcutting=Guide coming soon...
 GodMode.Forbidden=[mcMMO] God Mode not permitted on this world (See Permissions)
 XPRate.Event = [[GOLD]]mcMMO is currently in an XP rate event! XP rate is {0}x!
-BlastMining.Boom = [[GRAY]]**BOOM**
+BlastMining.Boom = [[GRAY]]**BOOM**
+Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)

+ 2 - 1
src/main/resources/locale/locale_en_us.properties

@@ -438,4 +438,5 @@ Guides.Unarmed=Guide coming soon...
 Guides.Woodcutting=Guide coming soon...
 GodMode.Forbidden=[mcMMO] God Mode not permitted on this world (See Permissions)
 XPRate.Event = [[GOLD]]mcMMO is currently in an XP rate event! XP rate is {0}x!
-BlastMining.Boom = [[GRAY]]**BOOM**
+BlastMining.Boom = [[GRAY]]**BOOM**
+Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)

+ 2 - 1
src/main/resources/locale/locale_es_es.properties

@@ -436,4 +436,5 @@ Guides.Unarmed=Guide coming soon...
 Guides.Woodcutting=Guide coming soon...
 GodMode.Forbidden=[mcMMO] God Mode not permitted on this world (See Permissions)
 XPRate.Event = [[GOLD]]mcMMO is currently in an XP rate event! XP rate is {0}x!
-BlastMining.Boom = [[GRAY]]**BOOM**
+BlastMining.Boom = [[GRAY]]**BOOM**
+Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)

+ 2 - 1
src/main/resources/locale/locale_fi.properties

@@ -425,4 +425,5 @@ Guides.Unarmed=Guide coming soon...
 Guides.Woodcutting=Guide coming soon...
 GodMode.Forbidden=[mcMMO] God Mode not permitted on this world (See Permissions)
 XPRate.Event = [[GOLD]]mcMMO is currently in an XP rate event! XP rate is {0}x!
-BlastMining.Boom = [[GRAY]]**BOOM**
+BlastMining.Boom = [[GRAY]]**BOOM**
+Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)

+ 2 - 1
src/main/resources/locale/locale_fr.properties

@@ -436,4 +436,5 @@ Guides.Unarmed=Guide coming soon...
 Guides.Woodcutting=Guide coming soon...
 GodMode.Forbidden=[mcMMO] God Mode not permitted on this world (See Permissions)
 XPRate.Event = [[GOLD]]mcMMO is currently in an XP rate event! XP rate is {0}x!
-BlastMining.Boom = [[GRAY]]**BOOM**
+BlastMining.Boom = [[GRAY]]**BOOM**
+Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)

+ 2 - 1
src/main/resources/locale/locale_nl.properties

@@ -442,4 +442,5 @@ Guides.Unarmed=Guide coming soon...
 Guides.Woodcutting=Guide coming soon...
 GodMode.Forbidden=[mcMMO] God Mode not permitted on this world (See Permissions)
 XPRate.Event = [[GOLD]]mcMMO is currently in an XP rate event! XP rate is {0}x!
-BlastMining.Boom = [[GRAY]]**BOOM**
+BlastMining.Boom = [[GRAY]]**BOOM**
+Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)

+ 2 - 1
src/main/resources/locale/locale_pl.properties

@@ -436,4 +436,5 @@ Guides.Unarmed=Guide coming soon...
 Guides.Woodcutting=Guide coming soon...
 GodMode.Forbidden=[mcMMO] God Mode not permitted on this world (See Permissions)
 XPRate.Event = [[GOLD]]mcMMO is currently in an XP rate event! XP rate is {0}x!
-BlastMining.Boom = [[GRAY]]**BOOM**
+BlastMining.Boom = [[GRAY]]**BOOM**
+Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)

+ 2 - 1
src/main/resources/locale/locale_pt_br.properties

@@ -443,4 +443,5 @@ Guides.Unarmed=Guide coming soon...
 Guides.Woodcutting=Guide coming soon...
 GodMode.Forbidden=[mcMMO] God Mode not permitted on this world (See Permissions)
 XPRate.Event = [[GOLD]]mcMMO is currently in an XP rate event! XP rate is {0}x!
-BlastMining.Boom = [[GRAY]]**BOOM**
+BlastMining.Boom = [[GRAY]]**BOOM**
+Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)

+ 2 - 1
src/main/resources/locale/locale_ru.properties

@@ -428,4 +428,5 @@ Guides.Unarmed=Guide coming soon...
 Guides.Woodcutting=Guide coming soon...
 GodMode.Forbidden=[mcMMO] God Mode not permitted on this world (See Permissions)
 XPRate.Event = [[GOLD]]mcMMO is currently in an XP rate event! XP rate is {0}x!
-BlastMining.Boom = [[GRAY]]**BOOM**
+BlastMining.Boom = [[GRAY]]**BOOM**
+Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)