mirror of
https://github.com/kaboomserver/extras.git
synced 2024-10-31 16:59:24 +00:00
Remove custom server ping code
This commit is contained in:
parent
317d930731
commit
2c1cf457a3
|
@ -41,7 +41,6 @@ import pw.kaboom.extras.modules.player.PlayerInteract;
|
|||
import pw.kaboom.extras.modules.player.PlayerRecipe;
|
||||
import pw.kaboom.extras.modules.player.PlayerTeleport;
|
||||
import pw.kaboom.extras.modules.server.ServerCommand;
|
||||
import pw.kaboom.extras.modules.server.ServerPing;
|
||||
import pw.kaboom.extras.modules.server.ServerTick;
|
||||
|
||||
public final class Main extends JavaPlugin {
|
||||
|
@ -113,7 +112,6 @@ public final class Main extends JavaPlugin {
|
|||
|
||||
/* Server-related modules */
|
||||
this.getServer().getPluginManager().registerEvents(new ServerCommand(), this);
|
||||
this.getServer().getPluginManager().registerEvents(new ServerPing(), this);
|
||||
this.getServer().getPluginManager().registerEvents(new ServerTick(), this);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
package pw.kaboom.extras.modules.server;
|
||||
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
|
||||
import com.destroystokyo.paper.event.server.PaperServerListPingEvent;
|
||||
|
||||
public final class ServerPing implements Listener {
|
||||
@EventHandler
|
||||
void onServerListPing(final PaperServerListPingEvent event) {
|
||||
if (event.getClient().getProtocolVersion() == -1) {
|
||||
final int protocol = 754;
|
||||
event.setProtocolVersion(protocol);
|
||||
} else {
|
||||
event.setProtocolVersion(event.getClient().getProtocolVersion());
|
||||
}
|
||||
event.setVersion("1.16.4");
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
name: Extras
|
||||
main: pw.kaboom.extras.Main
|
||||
description: Plugin that adds extra functionality to the server.
|
||||
depend: [ProtocolLib]
|
||||
softdepend: [ProtocolLib]
|
||||
api-version: 1.13
|
||||
version: master
|
||||
|
||||
|
|
Loading…
Reference in a new issue