mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Check config values for exp & item sharing.
This commit is contained in:
parent
bbc2091b77
commit
56056797bc
@ -5,6 +5,7 @@ import org.bukkit.command.CommandExecutor;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.party.Party;
|
import com.gmail.nossr50.party.Party;
|
||||||
import com.gmail.nossr50.party.ShareHandler;
|
import com.gmail.nossr50.party.ShareHandler;
|
||||||
@ -18,6 +19,11 @@ public class PartyExpShareCommand implements CommandExecutor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
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")) {
|
if (!Permissions.hasPermission(sender, "mcmmo.commands.party.expshare")) {
|
||||||
sender.sendMessage(command.getPermissionMessage());
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
return true;
|
return true;
|
||||||
|
@ -5,6 +5,7 @@ import org.bukkit.command.CommandExecutor;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.party.Party;
|
import com.gmail.nossr50.party.Party;
|
||||||
import com.gmail.nossr50.party.ShareHandler;
|
import com.gmail.nossr50.party.ShareHandler;
|
||||||
@ -18,6 +19,11 @@ public class PartyItemShareCommand implements CommandExecutor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
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")) {
|
if (!Permissions.hasPermission(sender, "mcmmo.commands.party.itemshare")) {
|
||||||
sender.sendMessage(command.getPermissionMessage());
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
return true;
|
return true;
|
||||||
|
@ -554,6 +554,8 @@ Party.ShareType.Item=ITEM
|
|||||||
Party.ShareMode.None=NONE
|
Party.ShareMode.None=NONE
|
||||||
Party.ShareMode.Equal=EQUAL
|
Party.ShareMode.Equal=EQUAL
|
||||||
Party.ShareMode.Random=RANDOM
|
Party.ShareMode.Random=RANDOM
|
||||||
|
Party.ExpShare.Disabled=[[RED]]Party experience sharing is disabled.
|
||||||
|
Party.ItemShare.Disabled=[[RED]]Party item sharing is disabled.
|
||||||
|
|
||||||
##xp
|
##xp
|
||||||
Commands.XPGain.Acrobatics=Falling
|
Commands.XPGain.Acrobatics=Falling
|
||||||
|
Loading…
Reference in New Issue
Block a user