From 71e09423feaa7714acca1bc8d3fc3f2a3c0e8692 Mon Sep 17 00:00:00 2001 From: GJ Date: Mon, 12 Mar 2012 22:07:35 -0400 Subject: [PATCH] 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. --- Changelog.txt | 1 + .../gmail/nossr50/datatypes/PlayerProfile.java | 17 ++--------------- .../nossr50/listeners/mcPlayerListener.java | 7 +++++++ src/main/resources/locale/locale_de.properties | 3 ++- .../resources/locale/locale_en_us.properties | 3 ++- .../resources/locale/locale_es_es.properties | 3 ++- src/main/resources/locale/locale_fi.properties | 3 ++- src/main/resources/locale/locale_fr.properties | 3 ++- src/main/resources/locale/locale_nl.properties | 3 ++- src/main/resources/locale/locale_pl.properties | 3 ++- .../resources/locale/locale_pt_br.properties | 3 ++- src/main/resources/locale/locale_ru.properties | 3 ++- 12 files changed, 28 insertions(+), 24 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index d4045ef7b..2173decb5 100644 --- a/Changelog.txt +++ b/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 diff --git a/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java b/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java index bfa75bf6c..66e0e0529 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java +++ b/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; diff --git a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java index fb81b9dc0..88a93f21e 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java +++ b/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")); + } + } } /** diff --git a/src/main/resources/locale/locale_de.properties b/src/main/resources/locale/locale_de.properties index 86f74ffdd..3d85eaf8c 100644 --- a/src/main/resources/locale/locale_de.properties +++ b/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** \ No newline at end of file +BlastMining.Boom = [[GRAY]]**BOOM** +Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions) \ No newline at end of file diff --git a/src/main/resources/locale/locale_en_us.properties b/src/main/resources/locale/locale_en_us.properties index db037b516..78e796b37 100644 --- a/src/main/resources/locale/locale_en_us.properties +++ b/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** \ No newline at end of file +BlastMining.Boom = [[GRAY]]**BOOM** +Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions) \ No newline at end of file diff --git a/src/main/resources/locale/locale_es_es.properties b/src/main/resources/locale/locale_es_es.properties index c542a65ad..a72d571ff 100644 --- a/src/main/resources/locale/locale_es_es.properties +++ b/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** \ No newline at end of file +BlastMining.Boom = [[GRAY]]**BOOM** +Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions) \ No newline at end of file diff --git a/src/main/resources/locale/locale_fi.properties b/src/main/resources/locale/locale_fi.properties index 51e6288c3..cd430819a 100644 --- a/src/main/resources/locale/locale_fi.properties +++ b/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** \ No newline at end of file +BlastMining.Boom = [[GRAY]]**BOOM** +Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions) \ No newline at end of file diff --git a/src/main/resources/locale/locale_fr.properties b/src/main/resources/locale/locale_fr.properties index 1616d8956..72a86e900 100644 --- a/src/main/resources/locale/locale_fr.properties +++ b/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** \ No newline at end of file +BlastMining.Boom = [[GRAY]]**BOOM** +Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions) \ No newline at end of file diff --git a/src/main/resources/locale/locale_nl.properties b/src/main/resources/locale/locale_nl.properties index cd59660a4..66ae16f16 100644 --- a/src/main/resources/locale/locale_nl.properties +++ b/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** \ No newline at end of file +BlastMining.Boom = [[GRAY]]**BOOM** +Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions) \ No newline at end of file diff --git a/src/main/resources/locale/locale_pl.properties b/src/main/resources/locale/locale_pl.properties index 252491453..f29adbb8b 100644 --- a/src/main/resources/locale/locale_pl.properties +++ b/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** \ No newline at end of file +BlastMining.Boom = [[GRAY]]**BOOM** +Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions) \ No newline at end of file diff --git a/src/main/resources/locale/locale_pt_br.properties b/src/main/resources/locale/locale_pt_br.properties index bf7bb560f..33dca845f 100644 --- a/src/main/resources/locale/locale_pt_br.properties +++ b/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** \ No newline at end of file +BlastMining.Boom = [[GRAY]]**BOOM** +Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions) \ No newline at end of file diff --git a/src/main/resources/locale/locale_ru.properties b/src/main/resources/locale/locale_ru.properties index 6ae8b41a1..6e911fa88 100644 --- a/src/main/resources/locale/locale_ru.properties +++ b/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** \ No newline at end of file +BlastMining.Boom = [[GRAY]]**BOOM** +Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions) \ No newline at end of file