Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Beny 2019-05-25 13:52:01 +01:00
commit 4981d967eb
2 changed files with 4 additions and 3 deletions

View File

@ -23,7 +23,7 @@ public class TraxManager implements Disposable
private final Room room; private final Room room;
private final List<InteractionMusicDisc> songs = new ArrayList<>(0); private final List<InteractionMusicDisc> songs = new ArrayList<>(0);
private int totalLength = 0; private int totalLength = 0;
private int startedTimestamp; private int startedTimestamp = 0;
private InteractionMusicDisc currentlyPlaying = null; private InteractionMusicDisc currentlyPlaying = null;
private int playingIndex = 0; private int playingIndex = 0;
@ -70,7 +70,7 @@ public class TraxManager implements Disposable
//restart //restart
} }
if (Emulator.getIntUnixTimestamp() >= this.startedTimestamp + this.currentSong().getLength()) if (this.currentSong() != null && Emulator.getIntUnixTimestamp() >= this.startedTimestamp + this.currentSong().getLength())
{ {
this.play((this.playingIndex + 1) % this.songs.size()); this.play((this.playingIndex + 1) % this.songs.size());
} }

View File

@ -1,6 +1,7 @@
package com.eu.habbo.messages.incoming.rooms.items; package com.eu.habbo.messages.incoming.rooms.items;
import com.eu.habbo.Emulator; import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.items.interactions.InteractionExternalImage;
import com.eu.habbo.habbohotel.items.interactions.InteractionPostIt; import com.eu.habbo.habbohotel.items.interactions.InteractionPostIt;
import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.habbohotel.rooms.Room;
import com.eu.habbo.habbohotel.users.HabboItem; import com.eu.habbo.habbohotel.users.HabboItem;
@ -22,7 +23,7 @@ public class PostItDeleteEvent extends MessageHandler
HabboItem item = room.getHabboItem(itemId); HabboItem item = room.getHabboItem(itemId);
if (item instanceof InteractionPostIt) if (item instanceof InteractionPostIt || item instanceof InteractionExternalImage)
{ {
if (item.getUserId() == this.client.getHabbo().getHabboInfo().getId() || room.isOwner(this.client.getHabbo())) if (item.getUserId() == this.client.getHabbo().getHabboInfo().getId() || room.isOwner(this.client.getHabbo()))
{ {