diff --git a/src/main/java/com/eu/habbo/messages/incoming/rooms/items/SetCustomStackingHeightEvent.java b/src/main/java/com/eu/habbo/messages/incoming/rooms/items/SetCustomStackingHeightEvent.java index 55fd0f44..e0143630 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/rooms/items/SetCustomStackingHeightEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/rooms/items/SetCustomStackingHeightEvent.java @@ -34,7 +34,7 @@ public class SetCustomStackingHeightEvent extends MessageHandler { } } } else { - stackerHeight = Math.min(Math.max(stackerHeight, itemTile.z * 100), Room.MAXIMUM_FURNI_HEIGHT * 100); + stackerHeight = Math.min(Math.max(stackerHeight, (long) itemTile.z * 100), Room.MAXIMUM_FURNI_HEIGHT * 100); } double height = 0; diff --git a/src/main/java/com/eu/habbo/messages/incoming/rooms/items/youtube/ControlYoutubeDisplayPlaybackEvent.java b/src/main/java/com/eu/habbo/messages/incoming/rooms/items/youtube/ControlYoutubeDisplayPlaybackEvent.java index 7af486a2..6c5bac12 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/rooms/items/youtube/ControlYoutubeDisplayPlaybackEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/rooms/items/youtube/ControlYoutubeDisplayPlaybackEvent.java @@ -18,7 +18,7 @@ public class ControlYoutubeDisplayPlaybackEvent extends MessageHandler { PAUSE(2), RESUME(3); - private int state; + private final int state; YoutubeState(int state) { this.state = state; @@ -80,7 +80,7 @@ public class ControlYoutubeDisplayPlaybackEvent extends MessageHandler { case RESUME: tv.playing = true; tv.startedWatchingAt = Emulator.getIntUnixTimestamp(); - tv.autoAdvance = Emulator.getThreading().run(new YoutubeAdvanceVideo(tv), (tv.currentVideo.getDuration() - tv.offset) * 1000); + tv.autoAdvance = Emulator.getThreading().run(new YoutubeAdvanceVideo(tv), (tv.currentVideo.getDuration() - tv.offset) * 1000L); room.sendComposer(new YoutubeControlVideoMessageComposer(tv.getId(), 1).compose()); break; case PREVIOUS: @@ -99,7 +99,7 @@ public class ControlYoutubeDisplayPlaybackEvent extends MessageHandler { room.sendComposer(new YoutubeDisplayVideoMessageComposer(tv.getId(), tv.currentVideo, true, 0).compose()); tv.cancelAdvancement(); - tv.autoAdvance = Emulator.getThreading().run(new YoutubeAdvanceVideo(tv), tv.currentVideo.getDuration() * 1000); + tv.autoAdvance = Emulator.getThreading().run(new YoutubeAdvanceVideo(tv), tv.currentVideo.getDuration() * 1000L); tv.startedWatchingAt = Emulator.getIntUnixTimestamp(); tv.offset = 0; tv.playing = true; diff --git a/src/main/java/com/eu/habbo/messages/incoming/rooms/items/youtube/SetYoutubeDisplayPlaylistEvent.java b/src/main/java/com/eu/habbo/messages/incoming/rooms/items/youtube/SetYoutubeDisplayPlaylistEvent.java index 5d0c92d5..b509ec47 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/rooms/items/youtube/SetYoutubeDisplayPlaylistEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/rooms/items/youtube/SetYoutubeDisplayPlaylistEvent.java @@ -32,7 +32,7 @@ public class SetYoutubeDisplayPlaylistEvent extends MessageHandler { HabboItem item = this.client.getHabbo().getHabboInfo().getCurrentRoom().getHabboItem(itemId); - if (item == null || !(item instanceof InteractionYoutubeTV)) return; + if (!(item instanceof InteractionYoutubeTV)) return; Optional playlist = Emulator.getGameEnvironment().getItemManager().getYoutubeManager().getPlaylistsForItemId(item.getBaseItem().getId()).stream().filter(p -> p.getId().equals(playlistId)).findAny(); @@ -47,7 +47,7 @@ public class SetYoutubeDisplayPlaylistEvent extends MessageHandler { room.updateItem(item); room.sendComposer(new YoutubeDisplayVideoMessageComposer(itemId, video, true, 0).compose()); - ((InteractionYoutubeTV) item).autoAdvance = Emulator.getThreading().run(new YoutubeAdvanceVideo((InteractionYoutubeTV) item), video.getDuration() * 1000); + ((InteractionYoutubeTV) item).autoAdvance = Emulator.getThreading().run(new YoutubeAdvanceVideo((InteractionYoutubeTV) item), video.getDuration() * 1000L); item.needsUpdate(true); }