-
-
Save AIGLEZMA/09756ac4ffa034195ee7820dbe00c445 to your computer and use it in GitHub Desktop.
Blocking world downloader
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
class Example extends JavaPlugin { | |
public void onEnable() { | |
Bukkit.getMessenger().registerOutgoingPluginChannel(this, "WDL|CONTROL"); | |
Bukkit.getMessenger().registerIncomingPluginChannel(this, "WDL|INIT", (s, player, bytes) -> { | |
ByteArrayDataOutput out = ByteStreams.newDataOutput(); | |
out.writeInt(1); | |
out.writeBoolean(false); | |
out.writeInt(1); | |
out.writeBoolean(false); | |
out.writeBoolean(false); | |
out.writeBoolean(false); | |
out.writeBoolean(false); | |
Bukkit.getLogger().info("Blocking WorldDownloader for " + player.getDisplayName()); | |
player.sendPluginMessage(this, "WDL|CONTROL", out.toByteArray()); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment