mirror of
https://github.com/songoda/EpicFarming.git
synced 2025-02-12 18:41:52 +01:00
Added console support for the givefarmitem command. Not sure why this wasn't a thing.
This commit is contained in:
parent
f2aaafd06a
commit
bd1824426b
@ -47,7 +47,6 @@ public class CommandHandler implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
if (args.length >= 1) {
|
||||
if (!(sender instanceof Player)) return true;
|
||||
|
||||
Level level = instance.getLevelManager().getLowestLevel();
|
||||
Player player;
|
||||
@ -55,6 +54,10 @@ public class CommandHandler implements CommandExecutor {
|
||||
sender.sendMessage(instance.references.getPrefix() + Arconix.pl().getApi().format().formatText("&cThat player does not exist or is currently offline."));
|
||||
return true;
|
||||
} else if (args.length == 1) {
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage(instance.references.getPrefix() + Arconix.pl().getApi().format().formatText("&cYou need to be a player to give a farm item to yourself."));
|
||||
return true;
|
||||
}
|
||||
player = (Player)sender;
|
||||
} else {
|
||||
player = Bukkit.getPlayer(args[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user