-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There were a couple things in Smart Fallback that seemed short-sighted when it came to use by external plugins. Now you can: -> Make decisions using player data (when available) -> Assign partial points to a confidence score
- Loading branch information
Showing
6 changed files
with
58 additions
and
26 deletions.
There are no files selected for viewing
6 changes: 4 additions & 2 deletions
6
SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Library/Fallback/FallbackInspector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
package net.ME1312.SubServers.Bungee.Library.Fallback; | ||
|
||
import net.md_5.bungee.api.config.ServerInfo; | ||
import net.md_5.bungee.api.connection.ProxiedPlayer; | ||
|
||
/** | ||
* Fallback Server Inspector Layout Class | ||
*/ | ||
public interface FallbackInspector { | ||
|
||
/** | ||
* Inspect a fallback server and modify it's confidence score | ||
* Inspect a fallback server and modify its confidence score | ||
* | ||
* @param player Player that requested (may be null) | ||
* @param server Server to inspect | ||
* @return A Positive Value to add points, a Negative Value to subtract points, a Null Value to invalidate the server, or a Zero Value to do nothing | ||
*/ | ||
Integer inspect(ServerInfo server); | ||
Double inspect(ProxiedPlayer player, ServerInfo server); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
SubServers.Sync/src/net/ME1312/SubServers/Sync/Library/Fallback/FallbackInspector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
package net.ME1312.SubServers.Sync.Library.Fallback; | ||
|
||
import net.md_5.bungee.api.config.ServerInfo; | ||
import net.md_5.bungee.api.connection.ProxiedPlayer; | ||
|
||
/** | ||
* Fallback Server Inspector Layout Class | ||
*/ | ||
public interface FallbackInspector { | ||
|
||
/** | ||
* Inspect a fallback server and modify it's confidence score | ||
* Inspect a fallback server and modify its confidence score | ||
* | ||
* @param player Player that requested (may be null) | ||
* @param server Server to inspect | ||
* @return A Positive Value to add points, a Negative Value to subtract points, a Null Value to invalidate the server, or a Zero Value to do nothing | ||
*/ | ||
Integer inspect(ServerInfo server); | ||
Double inspect(ProxiedPlayer player, ServerInfo server); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters