-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to customize ping events priority via handle-motd-order (#108)
Currently, the bungee implementation is using NORMAL priority for the ping event handler, while the velocity implementation is using LAST. Regardless of which choice may be the better one, this is an inconsistency that this patch addresses by using NORMAL as the default for both platforms. Additionally to addressing the inconsistency, this patch adds a new config option `handle-motd-order` which uses velocity's event priority nomenclature to allow configuring the behavior of the MOTD handling on both platforms. In cases where there is a MOTD plugin that incorrectly overrides a player count using the local player count, one may choose to use order LAST to override the value back to the global player count. In cases where there is a MOTD plugin that relies on a player count value from the ping response, one may choose to use order FIRST to make sure the response will have the correct global player count. Fixes #107
- Loading branch information
Showing
6 changed files
with
97 additions
and
7 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
api/src/main/java/com/imaginarycode/minecraft/redisbungee/api/config/HandleMotdOrder.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright (c) 2013-present RedisBungee contributors | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package com.imaginarycode.minecraft.redisbungee.api.config; | ||
|
||
public enum HandleMotdOrder { | ||
FIRST, | ||
NORMAL, | ||
LAST | ||
} |
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
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