From 4dd28be3af8766834e7b3934625e5549a637bbc6 Mon Sep 17 00:00:00 2001 From: AlexTheCoder Date: Fri, 8 Dec 2017 06:13:45 -0500 Subject: [PATCH] Fixed merge conflicts --- .../src/mineplex/core/stats/StatsManager.java | 2 - .../core/stats/command/GiveStatCommand.java | 64 ------------------- 2 files changed, 66 deletions(-) delete mode 100644 Plugins/Mineplex.Core/src/mineplex/core/stats/command/GiveStatCommand.java diff --git a/Plugins/Mineplex.Core/src/mineplex/core/stats/StatsManager.java b/Plugins/Mineplex.Core/src/mineplex/core/stats/StatsManager.java index 093f33542..8eee00ccd 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/stats/StatsManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/stats/StatsManager.java @@ -27,7 +27,6 @@ import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTasks; import mineplex.core.leaderboard.LeaderboardManager; -import mineplex.core.stats.command.GiveStatCommand; import mineplex.core.stats.command.SetLevelCommand; import mineplex.core.stats.command.TimeCommand; import mineplex.core.stats.event.StatChangeEvent; @@ -431,7 +430,6 @@ public class StatsManager extends MiniClientPlugin//MiniDbClientPlu public void addCommands() { addCommand(new TimeCommand(this)); - addCommand(new GiveStatCommand(this)); addCommand(new SetLevelCommand(this)); } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/stats/command/GiveStatCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/stats/command/GiveStatCommand.java deleted file mode 100644 index 747259157..000000000 --- a/Plugins/Mineplex.Core/src/mineplex/core/stats/command/GiveStatCommand.java +++ /dev/null @@ -1,64 +0,0 @@ -package mineplex.core.stats.command; - -import org.apache.commons.lang3.StringUtils; -import org.bukkit.entity.Player; - -import mineplex.core.command.CommandBase; -import mineplex.core.common.util.F; -import mineplex.core.common.util.UtilPlayer; -import mineplex.core.stats.StatsManager; - -public class GiveStatCommand extends CommandBase -{ - public GiveStatCommand(StatsManager plugin) - { - super(plugin, StatsManager.Perm.GIVE_STAT_COMMAND, "givestat"); - } - - @Override - public void Execute(final Player caller, final String[] args) - { - if (args.length < 3) - { - UtilPlayer.message(caller, F.main("Stats", "/givestat [player] [amount] [stat name]")); - return; - } - - Player player = UtilPlayer.searchOnline(caller, args[0], true); - - int amount; - - try - { - amount = Integer.parseInt(args[1]); - } - catch (NumberFormatException ex) - { - UtilPlayer.message(caller, F.main("Stats", F.elem(args[1]) + " is not a number")); - return; - } - - String statName = StringUtils.join(args, " ", 2, args.length); - - if (player == null) - { - Plugin.getClientManager().loadClientByName(args[0], client -> - { - if (client != null) - { - Plugin.incrementStat(client.getAccountId(), statName, amount); - UtilPlayer.message(caller, F.main("Stats", "Applied " + F.elem(amount + " " + statName) + " to " + F.elem(args[0]) + ".")); - } - else - { - caller.sendMessage(F.main("Stats", "Couldn't find " + args[0] + "'s account!")); - } - }); - } - else - { - Plugin.incrementStat(player, statName, amount); - UtilPlayer.message(caller, F.main("Stats", "Applied " + F.elem(amount + " " + statName) + " to " + F.elem(player.getName()) + ".")); - } - } -} \ No newline at end of file