temporarily disable party item sharing feature

This commit is contained in:
nossr50 2024-11-27 13:24:01 -08:00
parent 18bd31da40
commit 16d5d9f95f
2 changed files with 15 additions and 10 deletions

View File

@ -7,7 +7,11 @@ Version 2.2.029
Added Stripped_Pale_Oak_Wood to experience.yml for Woodcutting Added Stripped_Pale_Oak_Wood to experience.yml for Woodcutting
Added Bonus_Drops.Woodcutting.Pale_Oak_Wood to config.yml to enable double/triple drops for Pale Oak Wood Added Bonus_Drops.Woodcutting.Pale_Oak_Wood to config.yml to enable double/triple drops for Pale Oak Wood
Added Bonus_Drops.Woodcutting.Pale_Oak_Log to config.yml to enable double/triple drops for Pale Oak Log Added Bonus_Drops.Woodcutting.Pale_Oak_Log to config.yml to enable double/triple drops for Pale Oak Log
Temporarily disabled the party item share functionality until it is fixed or potentially removed (see notes)
Notes:
I noticed some issues with the party item share feature, so I've temporarily disabled it until those issues are addressed.
I'm not even sure people like or dislike this feature, I'm personally not a fan.. I'd like to hear what you guys think.
Version 2.2.028 Version 2.2.028
Fixed stack overflow during ChunkUnloadEvent Fixed stack overflow during ChunkUnloadEvent

View File

@ -255,14 +255,15 @@ public class PlayerListener implements Listener {
return; return;
} }
Item drop = event.getItemDrop();
ItemStack dropStack = drop.getItemStack();
if (ItemUtils.isSharable(dropStack)) { // TODO: This sharing item system seems very unoptimized, temporarily disabling
drop.setMetadata(MetadataConstants.METADATA_KEY_TRACKED_ITEM, MetadataConstants.MCMMO_METADATA_VALUE); /*if (ItemUtils.isSharable(event.getItemDrop().getItemStack())) {
} event.getItemDrop().getItemStack().setMetadata(
MetadataConstants.METADATA_KEY_TRACKED_ITEM,
MetadataConstants.MCMMO_METADATA_VALUE);
}*/
SkillUtils.removeAbilityBuff(dropStack); SkillUtils.removeAbilityBuff(event.getItemDrop().getItemStack());
} }
/** /**
@ -494,8 +495,7 @@ public class PlayerListener implements Listener {
return; return;
} }
Item drop = event.getItem(); final Item drop = event.getItem();
ItemStack dropStack = drop.getItemStack();
//Remove tracking //Remove tracking
if (drop.hasMetadata(MetadataConstants.METADATA_KEY_TRACKED_ARROW)) { if (drop.hasMetadata(MetadataConstants.METADATA_KEY_TRACKED_ARROW)) {
@ -510,13 +510,14 @@ public class PlayerListener implements Listener {
return; return;
} }
if (!drop.hasMetadata(MetadataConstants.METADATA_KEY_TRACKED_ITEM) && mcMMOPlayer.inParty() && ItemUtils.isSharable(dropStack)) { // TODO: Temporarily disabling sharing items...
/*if (!drop.hasMetadata(MetadataConstants.METADATA_KEY_TRACKED_ITEM) && mcMMOPlayer.inParty() && ItemUtils.isSharable(dropStack)) {
event.setCancelled(ShareHandler.handleItemShare(drop, mcMMOPlayer)); event.setCancelled(ShareHandler.handleItemShare(drop, mcMMOPlayer));
if (event.isCancelled()) { if (event.isCancelled()) {
SoundManager.sendSound(player, player.getLocation(), SoundType.POP); SoundManager.sendSound(player, player.getLocation(), SoundType.POP);
} }
} }*/
/*if (player.getInventory().getItemInMainHand().getType() == Material.AIR) { /*if (player.getInventory().getItemInMainHand().getType() == Material.AIR) {
Unarmed.handleItemPickup(player, event); Unarmed.handleItemPickup(player, event);