Skip to content

Commit caf1d17

Browse files
author
MrTwiggy
committed
Revert Issue Exultant#15 Fix
Re-implement PlayerPickupEvent fix for chunk unloading untill ChunkLoading bug is fixed.
1 parent 0f35c5e commit caf1d17

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/com/untamedears/PrisonPearl/PrisonPearlManager.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,17 @@ public void onPlayerPickupItem(PlayerPickupItemEvent event) {
618618

619619
pp.markMove();
620620
updatePearl(pp, event.getPlayer());
621+
622+
// If pearl was in unloaded chunk
623+
if (unloadedPearls.isEmpty())
624+
return;
625+
UUID want = pp.getImprisonedId();
626+
for (UUID uuid: unloadedPearls.keySet()){
627+
if (want.equals(uuid)){
628+
unloadedPearls.get(uuid).cancel();
629+
unloadedPearls.remove(uuid);
630+
}
631+
}
621632
}
622633

623634

0 commit comments

Comments
 (0)