mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 23:47:59 +01:00
Merge branch 'master' into new-block-api
This commit is contained in:
commit
6c4cb66737
@ -254,10 +254,8 @@ public class ArgumentType {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ArgumentLoop
|
||||
* @deprecated brigadier does not support long
|
||||
* @see ArgumentLong
|
||||
*/
|
||||
@Deprecated
|
||||
public static ArgumentLong Long(@NotNull String id) {
|
||||
return new ArgumentLong(id);
|
||||
}
|
||||
|
@ -36,15 +36,13 @@ public class ArgumentLong extends ArgumentNumber<Long> {
|
||||
public void processNodes(@NotNull NodeMaker nodeMaker, boolean executable) {
|
||||
DeclareCommandsPacket.Node argumentNode = simpleArgumentNode(this, executable, false, false);
|
||||
|
||||
// TODO maybe use ArgumentLiteral/ArgumentWord and impose long restriction server side?
|
||||
|
||||
argumentNode.parser = "brigadier:integer";
|
||||
argumentNode.parser = "brigadier:long";
|
||||
argumentNode.properties = BinaryWriter.makeArray(packetWriter -> {
|
||||
packetWriter.writeByte(getNumberProperties());
|
||||
if (this.hasMin())
|
||||
packetWriter.writeInt(this.getMin().intValue());
|
||||
packetWriter.writeLong(this.getMin());
|
||||
if (this.hasMax())
|
||||
packetWriter.writeInt(this.getMax().intValue());
|
||||
packetWriter.writeLong(this.getMax());
|
||||
});
|
||||
|
||||
nodeMaker.addNodes(new DeclareCommandsPacket.Node[]{argumentNode});
|
||||
|
Loading…
Reference in New Issue
Block a user