Skip to content

Commit dc69839

Browse files
committed
This is version 2.1
1 parent 1538f48 commit dc69839

File tree

4 files changed

+7
-21
lines changed

4 files changed

+7
-21
lines changed

README.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,4 @@
66
### Build
77
* Clone this repository
88
* Run the appropriate setup script according to your OS
9-
* Build with maven
10-
11-
### Things to do:
12-
- [ ] Create a spigot addon that adds connector signs and placeholders
13-
- [ ] Separate the types of connections in classes instead of being in ConnectionIntent
14-
- [x] Make the plugin API be not so dependent on a instance of PlayerBalancer
15-
- [ ] Separate connection providers in classes instead of being hardcoded in an enum
16-
- [ ] Implement fast connect (dimension change)
17-
- [ ] Implement a way to redirect premium players to a section and cracked ones to other section (not sure how this works)
18-
- [x] Unify the code that loads serverName into a section (duplicated at SectionManager and ServerSection)
19-
- [x] Unify some of the code used in the FallbackCommand and SectionCommand
20-
- [x] Make the section initialization work in stages instead of being hardcoded
9+
* Build with maven

pom.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.jaimemartz</groupId>
88
<artifactId>playerbalancer</artifactId>
9-
<version>2.1-dev</version>
9+
<version>2.1</version>
1010
<name>PlayerBalancer</name>
1111

1212
<properties>
@@ -18,10 +18,6 @@
1818
<id>inventive-repo</id>
1919
<url>https://repo.inventivetalent.org/content/groups/public/</url>
2020
</repository>
21-
<repository>
22-
<id>xephi-repo</id>
23-
<url>http://ci.xephi.fr/plugin/repository/everything/</url>
24-
</repository>
2521
<repository>
2622
<id>bstats-repo</id>
2723
<url>http://repo.bstats.org/content/repositories/releases/</url>

src/main/java/com/jaimemartz/playerbalancer/connection/ConnectionIntent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public ConnectionIntent(PlayerBalancer plugin, ProxiedPlayer player, ProviderTyp
4242
}
4343

4444
if (section.getImplicitProvider() != ProviderType.NONE) {
45-
ServerInfo target = this.fetchServer(plugin, player, section, provider, servers);
45+
ServerInfo target = this.fetchServer(player, section, provider, servers);
4646
if (target != null) {
4747
this.connect(target, (response, throwable) -> {
4848
if (response) { //only if the connect has been executed correctly
@@ -69,7 +69,7 @@ public ConnectionIntent(PlayerBalancer plugin, ProxiedPlayer player, ServerSecti
6969
this(plugin, player, section.getImplicitProvider(), section, servers);
7070
}
7171

72-
private ServerInfo fetchServer(PlayerBalancer plugin, ProxiedPlayer player, ServerSection section, ProviderType provider, List<ServerInfo> servers) {
72+
private ServerInfo fetchServer(ProxiedPlayer player, ServerSection section, ProviderType provider, List<ServerInfo> servers) {
7373
if (plugin.getSectionManager().isReiterative(section)) {
7474
if (ServerAssignRegistry.hasAssignedServer(player, section)) {
7575
ServerInfo target = ServerAssignRegistry.getAssignedServer(player, section);

src/main/resources/default.conf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ general {
2424
# Effectively remove (i.e comment) a message to disable it
2525
# Supported variables are shown in the default messages
2626
messages {
27+
# connecting-server="&aConnecting to a {section} server" # this message is disabled by default!
2728
connected-server="&aConnected to {server}"
28-
connecting-server="&aConnecting to a {section} server"
2929
invalid-input="&cThis is an invalid input type for this command"
3030
misc-failure="&cCould not find a server to get connected to"
3131
player-bypass="&cYou have not been moved because you have the playerbalancer.bypass permission"
@@ -42,6 +42,8 @@ features {
4242
# If a section does not have a provider it will be inherit from the parent
4343
# The best way to understand this is to play around with it
4444
# You can use regex to match a set of servers instead of adding each server
45+
# You can have as many sections as you want, there is no limit here
46+
# When connecting to a server in a section, you get redirected
4547

4648
# Providers you can use:
4749
# NONE: Returns no server (no one will be able to connect to this section)
@@ -63,7 +65,6 @@ features {
6365

6466
general-lobbies {
6567
parent="auth-lobbies"
66-
provider=RANDOM
6768
servers=[
6869
"Lobby1",
6970
"Lobby2",

0 commit comments

Comments
 (0)