Make /mcnotify match the process of the other commands for getting the

mcMMOPlayer object.
This commit is contained in:
GJ 2013-03-16 16:14:37 -04:00
parent 4cd4223ee0
commit dafa690a09

View File

@ -3,7 +3,6 @@ package com.gmail.nossr50.commands;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.locale.LocaleLoader;
@ -14,7 +13,7 @@ public class McnotifyCommand implements CommandExecutor {
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
switch (args.length) {
case 0:
McMMOPlayer mcMMOPlayer = UserManager.getPlayer((Player) sender);
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName());
if (mcMMOPlayer.useChatNotifications()) {
sender.sendMessage(LocaleLoader.getString("Commands.Notifications.Off"));