mirror of
https://github.com/BGHDDevelopment/PlayerBalancer.git
synced 2025-02-20 14:01:29 +01:00
Some more changes
This commit is contained in:
parent
e707d82772
commit
5fadacb8f0
2
pom.xml
2
pom.xml
@ -24,7 +24,7 @@
|
|||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>inventive-repo</id>
|
<id>inventive-repo</id>
|
||||||
<url>http://repo.inventivetalent.org/content/groups/public/</url>
|
<url>https://repo.inventivetalent.org/content/groups/public/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>xephi-repo</id>
|
<id>xephi-repo</id>
|
||||||
|
@ -25,6 +25,8 @@ import org.inventivetalent.update.bungee.BungeeUpdater;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.nio.file.Files;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class PlayerBalancer extends Plugin {
|
public class PlayerBalancer extends Plugin {
|
||||||
@ -41,7 +43,6 @@ public class PlayerBalancer extends Plugin {
|
|||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
Metrics metrics = new Metrics(this);
|
Metrics metrics = new Metrics(this);
|
||||||
metrics.addCustomChart(new Metrics.SingleLineChart("configured_sections", () -> sectionManager.getSections().size()));
|
metrics.addCustomChart(new Metrics.SingleLineChart("configured_sections", () -> sectionManager.getSections().size()));
|
||||||
|
|
||||||
this.enable();
|
this.enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,21 +54,21 @@ public class PlayerBalancer extends Plugin {
|
|||||||
|
|
||||||
if (loader == null) {
|
if (loader == null) {
|
||||||
TypeSerializerCollection serializers = TypeSerializers.getDefaultSerializers().newChild();
|
TypeSerializerCollection serializers = TypeSerializers.getDefaultSerializers().newChild();
|
||||||
//serializers.registerType(TypeToken.of(ServerSection.class), new SectionSerializer());
|
|
||||||
ConfigurationOptions options = ConfigurationOptions.defaults().setSerializers(serializers);
|
ConfigurationOptions options = ConfigurationOptions.defaults().setSerializers(serializers);
|
||||||
loader = HoconConfigurationLoader.builder().setFile(file).setDefaultOptions(options).build();
|
loader = HoconConfigurationLoader.builder().setFile(file).setDefaultOptions(options).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
CommentedConfigurationNode node = loader.load();
|
|
||||||
|
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
mainSettings = new SettingsHolder(); //.__defaults(); todo load defaults from default config
|
try (InputStream in = getResourceAsStream("default.conf")) {
|
||||||
node.setValue(TypeToken.of(SettingsHolder.class), mainSettings);
|
Files.copy(in, file.toPath());
|
||||||
loader.save(node);
|
} catch (IOException e) {
|
||||||
} else {
|
e.printStackTrace();
|
||||||
mainSettings = node.getValue(TypeToken.of(SettingsHolder.class));
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CommentedConfigurationNode node = loader.load();
|
||||||
|
mainSettings = node.getValue(TypeToken.of(SettingsHolder.class));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import com.google.common.base.Strings;
|
|||||||
import com.jaimemartz.playerbalancer.PlayerBalancer;
|
import com.jaimemartz.playerbalancer.PlayerBalancer;
|
||||||
import com.jaimemartz.playerbalancer.connection.ConnectionIntent;
|
import com.jaimemartz.playerbalancer.connection.ConnectionIntent;
|
||||||
import com.jaimemartz.playerbalancer.ping.ServerStatus;
|
import com.jaimemartz.playerbalancer.ping.ServerStatus;
|
||||||
|
import com.jaimemartz.playerbalancer.section.SectionManager;
|
||||||
import com.jaimemartz.playerbalancer.section.ServerSection;
|
import com.jaimemartz.playerbalancer.section.ServerSection;
|
||||||
import com.jaimemartz.playerbalancer.utils.MessageUtils;
|
import com.jaimemartz.playerbalancer.utils.MessageUtils;
|
||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
@ -60,7 +61,9 @@ public class ManageCommand extends Command {
|
|||||||
case "info": {
|
case "info": {
|
||||||
if (args.length == 2) {
|
if (args.length == 2) {
|
||||||
String input = args[1];
|
String input = args[1];
|
||||||
ServerSection section = plugin.getSectionManager().getByName(input);
|
SectionManager manager = plugin.getSectionManager();
|
||||||
|
ServerSection section = manager.getByName(input);
|
||||||
|
|
||||||
if (section != null) {
|
if (section != null) {
|
||||||
sender.sendMessage(new ComponentBuilder(Strings.repeat("-", 53)).strikethrough(true).color(ChatColor.GRAY).create());
|
sender.sendMessage(new ComponentBuilder(Strings.repeat("-", 53)).strikethrough(true).color(ChatColor.GRAY).create());
|
||||||
|
|
||||||
@ -72,8 +75,8 @@ public class ManageCommand extends Command {
|
|||||||
|
|
||||||
sender.sendMessage(new ComponentBuilder("Principal: ")
|
sender.sendMessage(new ComponentBuilder("Principal: ")
|
||||||
.color(ChatColor.GRAY)
|
.color(ChatColor.GRAY)
|
||||||
.append(section.getProps().isPrincipal() ? "yes" : "no")
|
.append(manager.isPrincipal(section) ? "yes" : "no")
|
||||||
.color(section.getProps().isPrincipal() ? ChatColor.GREEN : ChatColor.RED)
|
.color(manager.isPrincipal(section) ? ChatColor.GREEN : ChatColor.RED)
|
||||||
.create());
|
.create());
|
||||||
|
|
||||||
if (section.getParent() != null) {
|
if (section.getParent() != null) {
|
||||||
@ -110,8 +113,8 @@ public class ManageCommand extends Command {
|
|||||||
|
|
||||||
sender.sendMessage(new ComponentBuilder("Dummy: ")
|
sender.sendMessage(new ComponentBuilder("Dummy: ")
|
||||||
.color(ChatColor.GRAY)
|
.color(ChatColor.GRAY)
|
||||||
.append(section.getProps().isDummy() ? "yes" : "no")
|
.append(manager.isDummy(section) ? "yes" : "no")
|
||||||
.color(section.getProps().isDummy() ? ChatColor.GREEN : ChatColor.RED)
|
.color(manager.isDummy(section) ? ChatColor.GREEN : ChatColor.RED)
|
||||||
.create()
|
.create()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ public abstract class ConnectionIntent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private ServerInfo fetchServer(PlayerBalancer plugin, ProxiedPlayer player, ServerSection section, ProviderType provider, List<ServerInfo> servers) {
|
private ServerInfo fetchServer(PlayerBalancer plugin, ProxiedPlayer player, ServerSection section, ProviderType provider, List<ServerInfo> servers) {
|
||||||
if (plugin.getSettings().getGeneralProps().isAssignTargets()) {
|
if (plugin.getSectionManager().isReiterative(section)) {
|
||||||
if (ServerAssignRegistry.hasAssignedServer(player, section)) {
|
if (ServerAssignRegistry.hasAssignedServer(player, section)) {
|
||||||
ServerInfo target = ServerAssignRegistry.getAssignedServer(player, section);
|
ServerInfo target = ServerAssignRegistry.getAssignedServer(player, section);
|
||||||
ServerStatus status = plugin.getStatusManager().getStatus(target);
|
ServerStatus status = plugin.getStatusManager().getStatus(target);
|
||||||
|
@ -21,9 +21,6 @@ public class PlayerDisconnectListener implements Listener {
|
|||||||
ProxiedPlayer player = event.getPlayer();
|
ProxiedPlayer player = event.getPlayer();
|
||||||
PlayerLocker.unlock(player);
|
PlayerLocker.unlock(player);
|
||||||
|
|
||||||
//Delete this if we want to keep assigned groups even when leaving
|
ServerAssignRegistry.clearAsssignedServers(player);
|
||||||
if (plugin.getSettings().getGeneralProps().isAssignTargets()) {
|
|
||||||
ServerAssignRegistry.clearAsssignedServers(player);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ public class ServerConnectListener implements Listener {
|
|||||||
new ConnectionIntent(plugin, player, section) {
|
new ConnectionIntent(plugin, player, section) {
|
||||||
@Override
|
@Override
|
||||||
public void connect(ServerInfo server, Callback<Boolean> callback) {
|
public void connect(ServerInfo server, Callback<Boolean> callback) {
|
||||||
if (plugin.getSettings().getGeneralProps().isAssignTargets()) {
|
if (plugin.getSectionManager().isReiterative(section)) {
|
||||||
ServerAssignRegistry.assignTarget(player, section, server);
|
ServerAssignRegistry.assignTarget(player, section, server);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ public class ServerConnectListener implements Listener {
|
|||||||
|
|
||||||
//Checks only for servers (not the section server)
|
//Checks only for servers (not the section server)
|
||||||
if (section.getMappedServers().contains(target)) {
|
if (section.getMappedServers().contains(target)) {
|
||||||
if (section.getProps().isDummy()) {
|
if (plugin.getSectionManager().isDummy(section)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ public class ServerConnectListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (player.getServer() != null && section.getMappedServers().contains(player.getServer().getInfo())) {
|
if (player.getServer() != null && section.getMappedServers().contains(player.getServer().getInfo())) {
|
||||||
if (plugin.getSettings().getGeneralProps().isAssignTargets()) {
|
if (plugin.getSectionManager().isReiterative(section)) {
|
||||||
ServerAssignRegistry.assignTarget(player, section, target);
|
ServerAssignRegistry.assignTarget(player, section, target);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -116,7 +116,7 @@ public class ServerKickListener implements Listener {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.isRestricted()) {
|
if (props.isRestrictive()) {
|
||||||
if (current.getPosition() >= 0 && target.getPosition() < 0) {
|
if (current.getPosition() >= 0 && target.getPosition() < 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import net.md_5.bungee.api.CommandSender;
|
|||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
public class SectionCommand extends FallbackCommand {
|
public class SectionCommand extends FallbackCommand {
|
||||||
protected final ServerSection section;
|
private final ServerSection section;
|
||||||
|
|
||||||
public SectionCommand(PlayerBalancer plugin, CommandProps props, ServerSection section) {
|
public SectionCommand(PlayerBalancer plugin, CommandProps props, ServerSection section) {
|
||||||
super(plugin, props);
|
super(plugin, props);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.jaimemartz.playerbalancer.section;
|
package com.jaimemartz.playerbalancer.section;
|
||||||
|
|
||||||
import com.jaimemartz.playerbalancer.PlayerBalancer;
|
import com.jaimemartz.playerbalancer.PlayerBalancer;
|
||||||
|
import com.jaimemartz.playerbalancer.settings.props.features.BalancerProps;
|
||||||
import net.md_5.bungee.api.config.ServerInfo;
|
import net.md_5.bungee.api.config.ServerInfo;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.connection.Server;
|
import net.md_5.bungee.api.connection.Server;
|
||||||
@ -26,7 +27,7 @@ public class SectionManager {
|
|||||||
plugin.getLogger().info("Loading sections from the config, this may take a while...");
|
plugin.getLogger().info("Loading sections from the config, this may take a while...");
|
||||||
long starting = System.currentTimeMillis();
|
long starting = System.currentTimeMillis();
|
||||||
|
|
||||||
plugin.getSettings().getSections().forEach((name, prop) -> {
|
plugin.getSettings().getBalancerProps().getSectionProps().forEach((name, prop) -> {
|
||||||
plugin.getLogger().info(String.format("Construction of section with name \"%s\"", name));
|
plugin.getLogger().info(String.format("Construction of section with name \"%s\"", name));
|
||||||
ServerSection object = new ServerSection(name, prop);
|
ServerSection object = new ServerSection(name, prop);
|
||||||
sections.put(name, object);
|
sections.put(name, object);
|
||||||
@ -70,7 +71,7 @@ public class SectionManager {
|
|||||||
|
|
||||||
public void register(ServerInfo server, ServerSection section) {
|
public void register(ServerInfo server, ServerSection section) {
|
||||||
if (servers.containsKey(server)) {
|
if (servers.containsKey(server)) {
|
||||||
if (section.getProps().isDummy()) {
|
if (isDummy(section)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,23 +114,18 @@ public class SectionManager {
|
|||||||
return getByServer(server.getInfo());
|
return getByServer(server.getInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServerSection getPrincipal() {
|
|
||||||
return principal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates the position of a section in relation to other sections
|
* Calculates the position of a section in relation to other sections
|
||||||
* This is supposed to be called on section construction
|
* This is supposed to be called on section construction
|
||||||
* @param section the section we want to get the position of
|
* @param section the section we want to get the position of
|
||||||
* @param principal the principal section
|
|
||||||
* @return the position of {@param section}
|
* @return the position of {@param section}
|
||||||
*/
|
*/
|
||||||
private int calculatePosition(ServerSection section, ServerSection principal) {
|
private int calculatePosition(ServerSection section) {
|
||||||
//Calculate above principal
|
//Calculate above principal
|
||||||
int iterations = 0;
|
int iterations = 0;
|
||||||
ServerSection current = section;
|
ServerSection current = section;
|
||||||
while (current != null) {
|
while (current != null) {
|
||||||
if (current.getProps().isPrincipal()) {
|
if (current == principal) {
|
||||||
return iterations;
|
return iterations;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,6 +150,24 @@ public class SectionManager {
|
|||||||
return iterations;
|
return iterations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ServerSection getPrincipal() {
|
||||||
|
return principal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPrincipal(ServerSection section) {
|
||||||
|
return section.equals(principal);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDummy(ServerSection section) {
|
||||||
|
BalancerProps props = plugin.getSettings().getBalancerProps();
|
||||||
|
return props.getDummySectionNames().contains(section.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isReiterative(ServerSection section) {
|
||||||
|
BalancerProps props = plugin.getSettings().getBalancerProps();
|
||||||
|
return props.getReiterativeSectionNames().contains(section.getName());
|
||||||
|
}
|
||||||
|
|
||||||
public Map<String, ServerSection> getSections() {
|
public Map<String, ServerSection> getSections() {
|
||||||
return sections;
|
return sections;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ public class KickHandlerProps {
|
|||||||
private List<String> excludedSections;
|
private List<String> excludedSections;
|
||||||
|
|
||||||
@Setting
|
@Setting
|
||||||
private boolean restricted;
|
private boolean restrictive;
|
||||||
|
|
||||||
@Setting(value = "force-principal")
|
@Setting(value = "force-principal")
|
||||||
private boolean forcePrincipal;
|
private boolean forcePrincipal;
|
||||||
@ -64,12 +64,12 @@ public class KickHandlerProps {
|
|||||||
this.excludedSections = excludedSections;
|
this.excludedSections = excludedSections;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isRestricted() {
|
public boolean isRestrictive() {
|
||||||
return restricted;
|
return restrictive;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRestricted(boolean restricted) {
|
public void setRestrictive(boolean restrictive) {
|
||||||
this.restricted = restricted;
|
this.restrictive = restrictive;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isForcePrincipal() {
|
public boolean isForcePrincipal() {
|
||||||
@ -103,7 +103,7 @@ public class KickHandlerProps {
|
|||||||
", inverted=" + inverted +
|
", inverted=" + inverted +
|
||||||
", reasons=" + reasons +
|
", reasons=" + reasons +
|
||||||
", excludedSections=" + excludedSections +
|
", excludedSections=" + excludedSections +
|
||||||
", restricted=" + restricted +
|
", restrictive=" + restrictive +
|
||||||
", forcePrincipal=" + forcePrincipal +
|
", forcePrincipal=" + forcePrincipal +
|
||||||
", rules=" + rules +
|
", rules=" + rules +
|
||||||
", debug=" + debug +
|
", debug=" + debug +
|
||||||
|
@ -4,7 +4,6 @@ import net.md_5.bungee.api.ChatColor;
|
|||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
public final class MessageUtils {
|
public final class MessageUtils {
|
||||||
@ -15,10 +14,6 @@ public final class MessageUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void send(CommandSender sender, Optional<String> message) {
|
|
||||||
message.ifPresent(text -> send(sender, text));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void send(CommandSender sender, String text, Function<String, String> postProcess) {
|
public static void send(CommandSender sender, String text, Function<String, String> postProcess) {
|
||||||
if (text != null) {
|
if (text != null) {
|
||||||
text = postProcess.apply(text);
|
text = postProcess.apply(text);
|
||||||
@ -26,8 +21,4 @@ public final class MessageUtils {
|
|||||||
|
|
||||||
send(sender, text);
|
send(sender, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void send(CommandSender sender, Optional<String> message, Function<String, String> postProcess) {
|
|
||||||
message.ifPresent(text -> send(sender, text, postProcess));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -39,22 +39,20 @@ messages {
|
|||||||
|
|
||||||
features {
|
features {
|
||||||
balancer {
|
balancer {
|
||||||
# The principal section is very important for other features
|
# Here you have an example of what you can do with the sections
|
||||||
# Normally set this to the section that has your main lobbies
|
# The plugin will print out info telling you if your config is right or not
|
||||||
principal-section=test
|
# If a section does not have a provider it will be inherit from the parent
|
||||||
|
# The best way to understand this is to play around with it
|
||||||
# When a player is not in any section, the player will go to the principal section
|
# You can use regex to match a set of servers instead of adding each server
|
||||||
# This affects both the fallback command and kick handler features
|
|
||||||
fallback-principal=true
|
|
||||||
|
|
||||||
# Dummy sections can have servers from other non-dummy sections
|
|
||||||
# When a player connects to a dummy section, nothing will happen
|
|
||||||
dummy-sections=[]
|
|
||||||
|
|
||||||
# Reiterative sections remember the server the player connected to previously
|
|
||||||
# The plugin will keep connecting the player to that server until changes
|
|
||||||
reiterative-sections=[]
|
|
||||||
|
|
||||||
|
# Providers you can use:
|
||||||
|
# NONE: Returns no server
|
||||||
|
# DIRECT: Returns the only server in the list
|
||||||
|
# LOCALIZED: Returns the server that matches a region (testing)
|
||||||
|
# LOWEST: Returns the server with the least players online
|
||||||
|
# RANDOM: Returns a random server
|
||||||
|
# PROGRESSIVE: Returns the first server that is not full
|
||||||
|
# FILLER: Returns the server with the most players online that is not full
|
||||||
sections {
|
sections {
|
||||||
auth-lobbies {
|
auth-lobbies {
|
||||||
provider=RANDOM
|
provider=RANDOM
|
||||||
@ -100,12 +98,52 @@ features {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# The principal section is very important for other features
|
||||||
|
# Normally set this to the section that has your main lobbies
|
||||||
|
principal-section=test
|
||||||
|
|
||||||
|
# When a player is not in any section, the player will go to the principal section
|
||||||
|
# This affects both the fallback command and kick handler features
|
||||||
|
fallback-principal=true
|
||||||
|
|
||||||
|
# Dummy sections can have servers from other non-dummy sections
|
||||||
|
# When a player connects to a dummy section, nothing will happen
|
||||||
|
dummy-sections=[]
|
||||||
|
|
||||||
|
# Reiterative sections remember the server the player connected to previously
|
||||||
|
# The plugin will keep connecting the player to that server until changes
|
||||||
|
reiterative-sections=[]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Pings servers to see if they are online or not and if they are accessible
|
||||||
|
server-checker {
|
||||||
|
enabled=true
|
||||||
|
|
||||||
|
# Use either CUSTOM or GENERIC, the first one generally works the best
|
||||||
|
tactic=CUSTOM
|
||||||
|
|
||||||
|
# The attempts before giving up on getting a server for a player
|
||||||
|
attempts=5
|
||||||
|
|
||||||
|
# The interval between every round of checks
|
||||||
|
interval=10000
|
||||||
|
|
||||||
|
# When true, the plugin will print useful info when a server gets checked
|
||||||
|
debug-info=false
|
||||||
|
|
||||||
|
# The descriptions that mark a server as non accessible
|
||||||
|
marker-descs=[
|
||||||
|
"Server is not accessible",
|
||||||
|
"Gamemode has already started"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
# Connects a player to the parent of current section the player is connected to
|
# Connects a player to the parent of current section the player is connected to
|
||||||
fallback-command {
|
fallback-command {
|
||||||
enabled=true
|
enabled=true
|
||||||
|
|
||||||
|
# Leave permission empty for no permission
|
||||||
command {
|
command {
|
||||||
name=fallback
|
name=fallback
|
||||||
permission=""
|
permission=""
|
||||||
@ -119,7 +157,7 @@ features {
|
|||||||
# Add sections here where you do not want this feature to work
|
# Add sections here where you do not want this feature to work
|
||||||
excluded-sections=[]
|
excluded-sections=[]
|
||||||
|
|
||||||
# When true, players will not be able to get to a section
|
# When true, players will not be able to get connected to sections that are parents of the principal section
|
||||||
restrictive=true
|
restrictive=true
|
||||||
|
|
||||||
# You can override the behavior with rules, overriding the parent section
|
# You can override the behavior with rules, overriding the parent section
|
||||||
@ -129,37 +167,25 @@ features {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
server-checker {
|
|
||||||
enabled=true
|
|
||||||
|
|
||||||
tactic=CUSTOM
|
|
||||||
|
|
||||||
attempts=5
|
|
||||||
|
|
||||||
debug-info=false
|
|
||||||
|
|
||||||
interval=10000
|
|
||||||
|
|
||||||
marker-descs=[
|
|
||||||
"Server is not accessible",
|
|
||||||
"Gamemode has already started"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
# Connects a player to other section when kicked
|
# Connects a player to other section when kicked
|
||||||
kick-handler {
|
kick-handler {
|
||||||
enabled=true
|
enabled=true
|
||||||
|
|
||||||
|
# When true, the reasons will work as a blacklist instead of a whitelist
|
||||||
|
# Blacklist: A player must be kicked with a reason that is NOT in the reasons
|
||||||
|
# Whitelist: A player must be kicked with a reason that is in the reasons
|
||||||
inverted=true
|
inverted=true
|
||||||
|
|
||||||
|
# The reasons that determine if a player is reconnected or not, supports regex
|
||||||
reasons=[]
|
reasons=[]
|
||||||
|
|
||||||
|
# When true, players that are kicked while connecting to the proxy will be forced to reconnect to the principal section
|
||||||
force-principal=false
|
force-principal=false
|
||||||
|
|
||||||
# Add sections here where you do not want this feature to work
|
# Add sections here where you do not want this feature to work
|
||||||
excluded-sections=[]
|
excluded-sections=[]
|
||||||
|
|
||||||
|
# When true, players will not be able to get connected to sections that are parents of the principal section
|
||||||
restrictive=true
|
restrictive=true
|
||||||
|
|
||||||
# When true, the plugin will print useful info when a player gets kicked
|
# When true, the plugin will print useful info when a player gets kicked
|
||||||
|
Loading…
Reference in New Issue
Block a user