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