diff --git a/src/main/java/com/gmail/nossr50/party/commands/PartyExpShareCommand.java b/src/main/java/com/gmail/nossr50/party/commands/PartyExpShareCommand.java index 68d8a0780..668040483 100644 --- a/src/main/java/com/gmail/nossr50/party/commands/PartyExpShareCommand.java +++ b/src/main/java/com/gmail/nossr50/party/commands/PartyExpShareCommand.java @@ -5,6 +5,7 @@ import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import com.gmail.nossr50.config.Config; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.party.Party; import com.gmail.nossr50.party.ShareHandler; @@ -18,6 +19,11 @@ public class PartyExpShareCommand implements CommandExecutor { @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (!Config.getInstance().getExpShareEnabled()) { + sender.sendMessage(LocaleLoader.getString("Party.ExpShare.Disabled")); + return true; + } + if (!Permissions.hasPermission(sender, "mcmmo.commands.party.expshare")) { sender.sendMessage(command.getPermissionMessage()); return true; diff --git a/src/main/java/com/gmail/nossr50/party/commands/PartyItemShareCommand.java b/src/main/java/com/gmail/nossr50/party/commands/PartyItemShareCommand.java index d204250c3..310b2d60f 100644 --- a/src/main/java/com/gmail/nossr50/party/commands/PartyItemShareCommand.java +++ b/src/main/java/com/gmail/nossr50/party/commands/PartyItemShareCommand.java @@ -5,6 +5,7 @@ import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import com.gmail.nossr50.config.Config; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.party.Party; import com.gmail.nossr50.party.ShareHandler; @@ -18,6 +19,11 @@ public class PartyItemShareCommand implements CommandExecutor { @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (!Config.getInstance().getItemShareEnabled()) { + sender.sendMessage(LocaleLoader.getString("Party.ItemShare.Disabled")); + return true; + } + if (!Permissions.hasPermission(sender, "mcmmo.commands.party.itemshare")) { sender.sendMessage(command.getPermissionMessage()); return true; diff --git a/src/main/resources/locale/locale_en_US.properties b/src/main/resources/locale/locale_en_US.properties index a60ce237b..1f7c11acc 100644 --- a/src/main/resources/locale/locale_en_US.properties +++ b/src/main/resources/locale/locale_en_US.properties @@ -554,6 +554,8 @@ Party.ShareType.Item=ITEM Party.ShareMode.None=NONE Party.ShareMode.Equal=EQUAL Party.ShareMode.Random=RANDOM +Party.ExpShare.Disabled=[[RED]]Party experience sharing is disabled. +Party.ItemShare.Disabled=[[RED]]Party item sharing is disabled. ##xp Commands.XPGain.Acrobatics=Falling