Beginning work on mcremove

This commit is contained in:
nossr50 2012-02-28 11:05:48 -08:00
parent 26e3403ff4
commit e31aea3492
6 changed files with 62 additions and 1 deletions

View File

@ -19,6 +19,7 @@ Version 1.3.00-dev
+ Added size limit to Tree Feller in config as Tree Feller Threshold + Added size limit to Tree Feller in config as Tree Feller Threshold
+ Added /addlevels command + Added /addlevels command
+ Added config values for XP multipliers for different hostile mobs + Added config values for XP multipliers for different hostile mobs
+ Added mcremove commands
+ Re-added mcMMO reporting damage events + Re-added mcMMO reporting damage events
= Fixed bug where Swords command showed Bleed Length twice instead of Bleed Chance = Fixed bug where Swords command showed Bleed Length twice instead of Bleed Chance
= Fixed bug where Tree Feller wasn't checking for Tree Feller permission = Fixed bug where Tree Feller wasn't checking for Tree Feller permission

View File

@ -0,0 +1,52 @@
package com.gmail.nossr50.commands.mc;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.gmail.nossr50.mcPermissions;
import com.gmail.nossr50.config.LoadProperties;
import com.gmail.nossr50.locale.mcLocale;
public class Mcremove implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
Player player = null;
if (sender instanceof Player) {
player = (Player) sender;
}
if (player != null && !mcPermissions.getInstance().mcremove(player)) {
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
return true;
}
if (!LoadProperties.mcremoveEnable) {
sender.sendMessage("This command is not enabled.");
return true;
}
if (!(sender instanceof Player)) {
sender.sendMessage("This command does not support console useage.");
return true;
}
if(args.length == 1)
{
sender.sendMessage("Correct usage is /mcremove [Player Name]");
}
//If the server is using MySQL
if(LoadProperties.useMySQL)
{
} else {
}
return true;
}
}

View File

@ -42,7 +42,7 @@ public class LoadProperties {
xplockEnable, xpbar, xpicon, partybar, xprateEnable, spoutEnabled, xplockEnable, xpbar, xpicon, partybar, xprateEnable, spoutEnabled,
donateMessage, chimaeraWingEnable, xpGainsMobSpawners, myspawnEnable, donateMessage, chimaeraWingEnable, xpGainsMobSpawners, myspawnEnable,
mccEnable, mcmmoEnable, partyEnable, inviteEnable, acceptEnable, mccEnable, mcmmoEnable, partyEnable, inviteEnable, acceptEnable,
whoisEnable, mcstatsEnable, addxpEnable, ptpEnable, mmoeditEnable, whoisEnable, mcstatsEnable, addxpEnable, ptpEnable, mmoeditEnable, mcremoveEnable,
clearmyspawnEnable, mcgodEnable, mcabilityEnable, mctopEnable, clearmyspawnEnable, mcgodEnable, mcabilityEnable, mctopEnable,
addlevelsEnable, mcrefreshEnable, aEnable, pEnable, enableMotd, enableMySpawn, addlevelsEnable, mcrefreshEnable, aEnable, pEnable, enableMotd, enableMySpawn,
enableCobbleToMossy, useMySQL, toolsLoseDurabilityFromAbilities, enableCobbleToMossy, useMySQL, toolsLoseDurabilityFromAbilities,
@ -409,6 +409,7 @@ public class LoadProperties {
mcgodEnable = readBoolean("Commands.mcgod.Enabled", true); mcgodEnable = readBoolean("Commands.mcgod.Enabled", true);
mcstatsEnable = readBoolean("Commands.mcstats.Enabled", true); mcstatsEnable = readBoolean("Commands.mcstats.Enabled", true);
mmoeditEnable = readBoolean("Commands.mmoedit.Enabled", true); mmoeditEnable = readBoolean("Commands.mmoedit.Enabled", true);
mcremoveEnable = readBoolean("Commands.mcremove.Enable", true);
ptpEnable = readBoolean("Commands.ptp.Enabled", true); ptpEnable = readBoolean("Commands.ptp.Enabled", true);
partyEnable = readBoolean("Commands.party.Enabled", true); partyEnable = readBoolean("Commands.party.Enabled", true);
myspawnEnable = readBoolean("Commands.myspawn.Enabled", true); myspawnEnable = readBoolean("Commands.myspawn.Enabled", true);

View File

@ -31,6 +31,9 @@ public class mcPermissions
public boolean mcrefresh(Player player) { public boolean mcrefresh(Player player) {
return player.hasPermission("mcmmo.tools.mcrefresh"); return player.hasPermission("mcmmo.tools.mcrefresh");
} }
public boolean mcremove(Player player) {
return player.hasPermission("mcmmo.tools.mcremove");
}
public boolean mmoedit(Player player) { public boolean mmoedit(Player player) {
return player.hasPermission("mcmmo.tools.mmoedit"); return player.hasPermission("mcmmo.tools.mmoedit");
} }

View File

@ -1126,6 +1126,8 @@ Commands:
Enabled: true Enabled: true
mcc: mcc:
Enabled: true Enabled: true
mcremove:
Enabled: true
mmoedit: mmoedit:
Enabled: true Enabled: true
accept: accept:

View File

@ -38,6 +38,8 @@ commands:
permission: mcmmo.tools.mcgod permission: mcmmo.tools.mcgod
mcstats: mcstats:
description: Shows your mcMMO stats and xp description: Shows your mcMMO stats and xp
mcremove:
description: Remove a user from the database
mmoedit: mmoedit:
description: Edit the skill values for a user description: Edit the skill values for a user
permission: mcmmo.tools.mmoedit permission: mcmmo.tools.mmoedit