Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master authored Dec 21, 2024
2 parents 2f75d5a + 80d809d commit 61d04f1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
dependencies {

api("com.github.GTNewHorizons:GTNHLib:0.5.22:dev")
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.6.51-GTNH:dev")
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.7.0-GTNH:dev")
compileOnly("com.github.GTNewHorizons:EnderIO:2.8.22:dev")
compileOnly("com.github.GTNewHorizons:Navigator:1.0.15:dev")
compileOnly('org.jetbrains:annotations:25.0.0')
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/serverutils/client/gui/GuiEditNBT.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,21 @@ public void onCallback(ConfigValue value, boolean set) {
if (set) {
switch (nbt.getId()) {
case Constants.NBT.TAG_BYTE:
nbt = new NBTTagByte((byte) Math.max(Byte.MIN_VALUE, Math.min(Byte.MAX_VALUE, value.getInt())));
break;
case Constants.NBT.TAG_SHORT:
nbt = new NBTTagShort(
(short) Math.max(Short.MIN_VALUE, Math.min(Short.MAX_VALUE, value.getInt())));
break;
case Constants.NBT.TAG_INT:
nbt = new NBTTagInt(value.getInt());
break;
case Constants.NBT.TAG_LONG:
nbt = new NBTTagLong(Long.parseLong(value.getString()));
break;
case Constants.NBT.TAG_FLOAT:
nbt = new NBTTagFloat((float) value.getDouble());
break;
case Constants.NBT.TAG_DOUBLE:
case Constants.NBT.TAG_ANY_NUMERIC:
nbt = new NBTTagDouble(value.getDouble());
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/serverutils/lib/command/CommandTreeBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public List<String> addTabCompletionOptions(ICommandSender sender, String[] args
List<String> keys = new ArrayList<>();

for (ICommand c : getSubCommands()) {
if (c.canCommandSenderUseCommand(sender)) {
if (canUseSubcommand(sender, c)) {
keys.add(c.getCommandName());
}
}
Expand Down Expand Up @@ -122,7 +122,7 @@ public void processCommand(ICommandSender sender, String[] args) throws CommandE
"commands.tree_base.invalid_cmd.list_subcommands",
args[0],
subCommandsString);
} else if (!cmd.canCommandSenderUseCommand(sender)) {
} else if (!canUseSubcommand(sender, cmd)) {
throw new CommandException("commands.generic.permission");
} else {
cmd.processCommand(sender, shiftArgs(args));
Expand Down

0 comments on commit 61d04f1

Please sign in to comment.