mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-29 18:27:36 +02:00
Fix console support for cracked/premium commands (Fixes# 62)
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
|
||||
* Fix third-party not premium player detection
|
||||
* Fix ProtocolSupport BungeeCord
|
||||
* Fix duplicate logins for BungeeAuth users
|
||||
|
||||
######1.7.1
|
||||
|
||||
|
@ -2,6 +2,7 @@ package com.github.games647.fastlogin.bukkit.commands;
|
||||
|
||||
import com.github.games647.fastlogin.bukkit.FastLoginBukkit;
|
||||
import com.github.games647.fastlogin.core.PlayerProfile;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.io.ByteArrayDataOutput;
|
||||
import com.google.common.io.ByteStreams;
|
||||
|
||||
@ -99,10 +100,13 @@ public class CrackedCommand implements CommandExecutor {
|
||||
if (sender instanceof Player) {
|
||||
notifiyBungeeCord((Player) sender, target);
|
||||
} else {
|
||||
plugin.getLogger().info("No player online to send a plugin message to the proxy");
|
||||
//todo: add console support
|
||||
// Player firstPlayer = Iterables.getFirst(Bukkit.getOnlinePlayers(), null);
|
||||
// notifiyBungeeCord(firstPlayer, target);
|
||||
Player firstPlayer = Iterables.getFirst(Bukkit.getOnlinePlayers(), null);
|
||||
if (firstPlayer == null) {
|
||||
plugin.getLogger().info("No player online to send a plugin message to the proxy");
|
||||
return;
|
||||
}
|
||||
|
||||
notifiyBungeeCord(firstPlayer, target);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package com.github.games647.fastlogin.bukkit.commands;
|
||||
|
||||
import com.github.games647.fastlogin.bukkit.FastLoginBukkit;
|
||||
import com.github.games647.fastlogin.core.PlayerProfile;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.io.ByteArrayDataOutput;
|
||||
import com.google.common.io.ByteStreams;
|
||||
|
||||
@ -117,10 +118,13 @@ public class PremiumCommand implements CommandExecutor {
|
||||
if (sender instanceof Player) {
|
||||
notifiyBungeeCord((Player) sender, target);
|
||||
} else {
|
||||
plugin.getLogger().info("No player online to send a plugin message to the proxy");
|
||||
//todo: add console support
|
||||
// Player firstPlayer = Iterables.getFirst(Bukkit.getOnlinePlayers(), null);
|
||||
// notifiyBungeeCord(firstPlayer, target);
|
||||
Player firstPlayer = Iterables.getFirst(Bukkit.getOnlinePlayers(), null);
|
||||
if (firstPlayer == null) {
|
||||
plugin.getLogger().info("No player online to send a plugin message to the proxy");
|
||||
return;
|
||||
}
|
||||
|
||||
notifiyBungeeCord(firstPlayer, target);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user