A simple little mod that adds one command: /xpshare.
Use it to give xp to your friends! Most of the time you'll want this: /xpshare levels <playername> <levels>
, and their level number should go up by that much, with the appropriate amount of xp being subtracted from your own.
NOTE: this does NOT mean your levels will go down by the same number, due to the weird and needlessly logarithmic nature of levels in minecraft. If you wish to give a certain number of your levels, use /xpshare my-levels <playername> <levels>
intead. You can also use the points
subcommand to give an exact amount of xp if you're doing more technical stuff for some reason.
This mod requires Fabric API and can be run exclusively on the server. (Running it on the client shouldn't break anything, though. Just won't do anything.)