Fix permissions and stuff, we are go for master!
This commit is contained in:
parent
a22f57c1f5
commit
cae71552cd
@ -9,6 +9,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
|||||||
import javax.crypto.SecretKey;
|
import javax.crypto.SecretKey;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.md_5.bungee.api.Callback;
|
import net.md_5.bungee.api.Callback;
|
||||||
|
import net.md_5.bungee.api.ChatColor;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.ServerPing;
|
import net.md_5.bungee.api.ServerPing;
|
||||||
import net.md_5.bungee.api.config.ServerInfo;
|
import net.md_5.bungee.api.config.ServerInfo;
|
||||||
@ -101,6 +102,7 @@ public class ServerConnection extends GenericConnection implements Server
|
|||||||
ServerInfo def = ProxyServer.getInstance().getServers().get(user.getPendingConnection().getListener().getDefaultServer());
|
ServerInfo def = ProxyServer.getInstance().getServers().get(user.getPendingConnection().getListener().getDefaultServer());
|
||||||
if (retry && !info.equals(def))
|
if (retry && !info.equals(def))
|
||||||
{
|
{
|
||||||
|
user.sendMessage(ChatColor.RED + "Could not connect to target server, you have been moved to the default server");
|
||||||
return connect(user, def, handshake, false);
|
return connect(user, def, handshake, false);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
@ -61,6 +61,11 @@ public class UserConnection extends GenericConnection implements ProxiedPlayer
|
|||||||
name = handshake.username;
|
name = handshake.username;
|
||||||
displayName = handshake.username;
|
displayName = handshake.username;
|
||||||
this.loginPackets = loginPackets;
|
this.loginPackets = loginPackets;
|
||||||
|
Collection<String> g = ProxyServer.getInstance().getConfigurationAdapter().getGroups(name);
|
||||||
|
for (String s : g)
|
||||||
|
{
|
||||||
|
addGroups(s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -44,7 +44,7 @@ public class CommandServer extends Command
|
|||||||
if (server == null)
|
if (server == null)
|
||||||
{
|
{
|
||||||
player.sendMessage(ChatColor.RED + "The specified server does not exist");
|
player.sendMessage(ChatColor.RED + "The specified server does not exist");
|
||||||
} else if (server == player.getServer())
|
} else if (server.equals(player.getServer().getInfo()))
|
||||||
{
|
{
|
||||||
player.sendMessage(ChatColor.RED + "You are already on this server.");
|
player.sendMessage(ChatColor.RED + "You are already on this server.");
|
||||||
} else
|
} else
|
||||||
|
@ -11,7 +11,6 @@ import java.util.Collection;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import net.md_5.bungee.Util;
|
import net.md_5.bungee.Util;
|
||||||
@ -191,7 +190,10 @@ public class YamlConfig implements ConfigurationAdapter
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public Collection<String> getGroups(String player)
|
public Collection<String> getGroups(String player)
|
||||||
{
|
{
|
||||||
return get("groups." + player, Collections.singleton("default"));
|
Collection<String> groups = get("groups." + player, Collections.EMPTY_LIST);
|
||||||
|
Collection<String> ret = new HashSet<>(groups);
|
||||||
|
ret.add("default");
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user