mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-31 14:49:35 +01:00
Avoid using mcMMO.p when we can
This commit is contained in:
parent
fd1227b87e
commit
c97be335ee
@ -12,6 +12,11 @@ import com.gmail.nossr50.config.Config;
|
|||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
|
||||||
public class McmmoCommand implements CommandExecutor {
|
public class McmmoCommand implements CommandExecutor {
|
||||||
|
private final mcMMO plugin;
|
||||||
|
|
||||||
|
public McmmoCommand (mcMMO plugin) {
|
||||||
|
this.plugin = plugin;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
@ -20,7 +25,7 @@ public class McmmoCommand implements CommandExecutor {
|
|||||||
sender.sendMessage(mcSplit);
|
sender.sendMessage(mcSplit);
|
||||||
|
|
||||||
if (Config.getInstance().getDonateMessageEnabled()) {
|
if (Config.getInstance().getDonateMessageEnabled()) {
|
||||||
if (mcMMO.p.spoutEnabled && sender instanceof SpoutPlayer) {
|
if (plugin.spoutEnabled && sender instanceof SpoutPlayer) {
|
||||||
SpoutPlayer sPlayer = (SpoutPlayer) sender;
|
SpoutPlayer sPlayer = (SpoutPlayer) sender;
|
||||||
|
|
||||||
sPlayer.sendNotification(ChatColor.YELLOW + "[mcMMO]" + ChatColor.GOLD + " Donate!", ChatColor.GREEN + "mcmmodev@gmail.com", Material.DIAMOND);
|
sPlayer.sendNotification(ChatColor.YELLOW + "[mcMMO]" + ChatColor.GOLD + " Donate!", ChatColor.GREEN + "mcmmodev@gmail.com", Material.DIAMOND);
|
||||||
|
@ -20,6 +20,12 @@ import com.gmail.nossr50.util.Skills;
|
|||||||
import com.gmail.nossr50.util.Users;
|
import com.gmail.nossr50.util.Users;
|
||||||
|
|
||||||
public class XplockCommand implements CommandExecutor {
|
public class XplockCommand implements CommandExecutor {
|
||||||
|
private final mcMMO plugin;
|
||||||
|
|
||||||
|
public XplockCommand (mcMMO plugin) {
|
||||||
|
this.plugin = plugin;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
String usage = ChatColor.RED + "Proper usage is /xplock [skill]";
|
String usage = ChatColor.RED + "Proper usage is /xplock [skill]";
|
||||||
@ -28,7 +34,7 @@ public class XplockCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mcMMO.p.spoutEnabled || !SpoutConfig.getInstance().getXPBarEnabled() || !Config.getInstance().getCommandXPLockEnabled()) {
|
if (!plugin.spoutEnabled || !SpoutConfig.getInstance().getXPBarEnabled() || !Config.getInstance().getCommandXPLockEnabled()) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Disabled"));
|
sender.sendMessage(LocaleLoader.getString("Commands.Disabled"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -351,7 +351,7 @@ public class mcMMO extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (configInstance.getCommandmcMMOEnabled()) {
|
if (configInstance.getCommandmcMMOEnabled()) {
|
||||||
getCommand("mcmmo").setExecutor(new McmmoCommand());
|
getCommand("mcmmo").setExecutor(new McmmoCommand(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (configInstance.getCommandMCRefreshEnabled()) {
|
if (configInstance.getCommandMCRefreshEnabled()) {
|
||||||
@ -416,7 +416,7 @@ public class mcMMO extends JavaPlugin {
|
|||||||
|
|
||||||
//Spout commands
|
//Spout commands
|
||||||
if (configInstance.getCommandXPLockEnabled()) {
|
if (configInstance.getCommandXPLockEnabled()) {
|
||||||
getCommand("xplock").setExecutor(new XplockCommand());
|
getCommand("xplock").setExecutor(new XplockCommand(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
getCommand("mchud").setExecutor(new MchudCommand(this));
|
getCommand("mchud").setExecutor(new MchudCommand(this));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user