mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 07:20:50 +01:00
more cleanup..
This commit is contained in:
parent
3da8143d37
commit
9064dc1fee
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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<YoutubeManager.YoutubePlaylist> 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user