Created
August 8, 2015 15:25
-
-
Save zyuiop/4e129c12c49c411048fc 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
Mes yeux pleurent devant cette indentation 😿