mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Make /mcnotify match the process of the other commands for getting the
mcMMOPlayer object.
This commit is contained in:
parent
4cd4223ee0
commit
dafa690a09
@ -3,7 +3,6 @@ package com.gmail.nossr50.commands;
|
|||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
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) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 0:
|
case 0:
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer((Player) sender);
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
||||||
|
|
||||||
if (mcMMOPlayer.useChatNotifications()) {
|
if (mcMMOPlayer.useChatNotifications()) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Notifications.Off"));
|
sender.sendMessage(LocaleLoader.getString("Commands.Notifications.Off"));
|
||||||
|
Loading…
Reference in New Issue
Block a user