Merge branch 'feature/handitem-configurable-removal' into 'dev'

Add option to prevent automatic handitem removal by setting `hotel.rooms.handitem.time` to 0

See merge request morningstar/Arcturus-Community!87
This commit is contained in:
ArpyAge 2024-10-17 16:00:45 +00:00
commit 0fe612ccbb

View File

@ -1224,7 +1224,8 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
foundRightHolder[0] = habbo.getRoomUnit().getRightsLevel() != RoomRightLevels.NONE;
}
if (habbo.getRoomUnit().getHandItem() > 0 && millis - habbo.getRoomUnit().getHandItemTimestamp() > (Room.HAND_ITEM_TIME * 1000)) {
// The handitem is no longer automatically removed from a user. We can set `Room.HAND_ITEM_TIME` to `0` as a configuration option to prevent it from being removed. (verified on Oct 15, 2024)
if (Room.HAND_ITEM_TIME > 0 && habbo.getRoomUnit().getHandItem() > 0 && millis - habbo.getRoomUnit().getHandItemTimestamp() > (Room.HAND_ITEM_TIME * 1000L)) {
this.giveHandItem(habbo, 0);
}