Use player objects instead of names - should be more efficient and less

buggy.
This commit is contained in:
GJ
2013-05-28 13:33:20 -04:00
parent b0eb4b93a8
commit 0ba4bc25c7
29 changed files with 57 additions and 46 deletions

View File

@ -7,6 +7,7 @@ import java.util.List;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabExecutor;
import org.bukkit.entity.Player;
import org.bukkit.util.StringUtil;
import com.gmail.nossr50.datatypes.MobHealthbarType;
@ -38,7 +39,7 @@ public class MobhealthCommand implements TabExecutor {
switch (args.length) {
case 1:
PlayerProfile playerProfile = UserManager.getPlayer(sender.getName()).getProfile();
PlayerProfile playerProfile = UserManager.getPlayer((Player) sender).getProfile();
try {
MobHealthbarType type = MobHealthbarType.valueOf(args[0].toUpperCase().trim());