There is a bug at the line ShareCommand.java:75 which leads to malfunction of /sharebed command when the receiving player already has registered beds:
receiverBedsData = playerData.get(new NamespacedKey(plugin, "beds"), new BedsDataType());
Here we're trying to get PlayerBedsData of the receiving player by invoking get on playerData which belongs to the owning player actually. Instead we should invoke get on receiverData which really belongs to the receiving player:
receiverBedsData = receiverData.get(new NamespacedKey(plugin, "beds"), new BedsDataType());
There is a bug at the line ShareCommand.java:75 which leads to malfunction of
/sharebed
command when the receiving player already has registered beds:Here we're trying to get
PlayerBedsData
of the receiving player by invokingget
onplayerData
which belongs to the owning player actually. Instead we should invokeget
onreceiverData
which really belongs to the receiving player: