CobbleSword / NachoSpigot

NachoSpigot is a fork of TacoSpigot 1.8.9 that offers several enhancements to performance as well as bug fixes.
GNU General Public License v3.0
237 stars 86 forks source link

Gamerule String empty #366

Closed crafter23456 closed 2 years ago

crafter23456 commented 2 years ago

Observed Behavior

image

Expected Behavior

write correct value and rule

Steps To Reproduce

/gamerule (rule)

Plugin List

No response

Server Version

commit 86fb06bc045f81eb1b8d99cda371b18eafa07b87

Other

https://github.com/CobbleSword/NachoSpigot/blob/master/NachoSpigot-API/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java#L42 https://github.com/CobbleSword/NachoSpigot/blob/master/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java#L1393 (https://cdn.discordapp.com/attachments/732023562893787228/947265937525080114/unknown.png) the string rule + value is somehow empty 🤔

Agreements

ghost commented 2 years ago

The gamerule command is handled by CommandGameRule in NMS, which uses "Game rule has been updated", not sure how you got that message. After testing, it works as expected and writes "Game rule has been updated".

crafter23456 commented 2 years ago

I guess that's the Bukkit gameruke command. There should be Gamerule GAMERULE has been updated to FALSE/TRUE

ghost commented 2 years ago

I guess that's the Bukkit gameruke command. There should be Gamerule GAMERULE has been updated to FALSE/TRUE

The Bukkit Minecraft commands are never even registered, not sure why they’re there. Also this issue should be closed.

crafter23456 commented 2 years ago

image First one with /gamerule... and second with /minecraft:gamerule... https://github.com/CobbleSword/NachoSpigot/blob/master/NachoSpigot-API/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java#L42 from bukkit with value and its exactly the same text. https://github.com/CobbleSword/NachoSpigot/blob/master/NachoSpigot-Server/src/main/java/net/minecraft/server/CommandGamerule.java the normal minecraft directory doesnt show an output string. Doesnt bukkit change that?

ghost commented 2 years ago

NMS gamerule uses the lang file which is only “Game rule has been updated”

crafter23456 commented 2 years ago

But why it uses the bukkit string?

ghost commented 2 years ago

On the latest version it is using NMS string, on both client and console image_2022-04-07_165942

ghost commented 2 years ago

The NMS sends the text at line 50 using commands.gamerule.success from the lang file without putting any arguments and in the lang file commands.gamerule.success is "Game rule has been updated"

crafter23456 commented 2 years ago

Sending the command in console image Sending the command in chat image image So the problem is only client side with 1.18.2. I tested it with the vanilla 1.8.9 client and its doing the right thing.

The Bukkit Minecraft commands are never even registered

so we can remove them?

ghost commented 2 years ago

So the problem is only client side with 1.18.2. I tested it with the vanilla 1.8.9 client and its doing the right thing.

Probably because it has a different language file, we could put the proper arguments for it and 1.8 clients would ignore it

so we can remove them?

We could, there’s no use for them.