When you have 2147483647 levels of xp and you type /xp 1L and now you have 0 xp levels. Type /xp 1L and now you have 1 xp level
When you have 2147483647 levels of xp and you type /xp 1L and now you have 0 xp levels. Type /xp 1L and now you have 1 xp level
This has to do with a 32-bit integer boundary. A 32-bit signed integer ranges from -2,147,483,648 to 2,147,483,647. Therefore, if you increase by 1 level, you would technically wrap back to -2,147,483,648. But Minecraft is programmed to set it to zero instead of -2,147,483,648, to avoid negative levels. This isn't a bug, it is simply a programming boundary with 32-bit, unless you move to a 64-bit Minecraft version, then it would range from −9,223,372,036,854,775,808 to 9,223,372,036,854,775,807, being a 64-bit signed integer.