Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand on the API for restricted servers
- Loading branch information
Showing
17 changed files
with
395 additions
and
62 deletions.
There are no files selected for viewing
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
44 changes: 44 additions & 0 deletions
44
...rs.Bungee/src/net/ME1312/SubServers/Bungee/Network/Packet/PacketOutExUpdateWhitelist.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,44 @@ | ||
package net.ME1312.SubServers.Bungee.Network.Packet; | ||
|
||
import net.ME1312.SubServers.Bungee.Library.Config.YAMLSection; | ||
import net.ME1312.SubServers.Bungee.Library.Util; | ||
import net.ME1312.SubServers.Bungee.Library.Version.Version; | ||
import net.ME1312.SubServers.Bungee.Network.PacketOut; | ||
|
||
import java.util.UUID; | ||
|
||
/** | ||
* Update External Whitelist Packet | ||
*/ | ||
public class PacketOutExUpdateWhitelist implements PacketOut { | ||
private String name; | ||
private boolean mode; | ||
private UUID value; | ||
|
||
/** | ||
* New PacketOutExUpdateWhitelist | ||
* | ||
* @param name Server Name | ||
* @param mode Update Mode (true for add, false for remove) | ||
* @param value Whitelist Value | ||
*/ | ||
public PacketOutExUpdateWhitelist(String name, boolean mode, UUID value) { | ||
if (Util.isNull(name, mode, value)) throw new NullPointerException(); | ||
this.name = name; | ||
this.mode = mode; | ||
this.value = value; | ||
} | ||
|
||
@Override | ||
public YAMLSection generate() { | ||
YAMLSection data = new YAMLSection(); | ||
data.set("server", name); | ||
data.set("mode", mode); | ||
data.set("value", value); | ||
return data; | ||
} | ||
@Override | ||
public Version getVersion() { | ||
return new Version("2.13.2c"); | ||
} | ||
} |
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
Oops, something went wrong.