mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-30 09:50:51 +01:00
You can now only open highscores with rights or wired. Closes #885
This commit is contained in:
parent
854333a145
commit
4992b759e4
@ -6,6 +6,9 @@ import com.eu.habbo.habbohotel.items.Item;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomUnit;
|
||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||
import com.eu.habbo.habbohotel.wired.WiredEffectType;
|
||||
import com.eu.habbo.habbohotel.wired.WiredHandler;
|
||||
import com.eu.habbo.habbohotel.wired.WiredTriggerType;
|
||||
import com.eu.habbo.habbohotel.wired.highscores.WiredHighscoreClearType;
|
||||
import com.eu.habbo.habbohotel.wired.highscores.WiredHighscoreRow;
|
||||
import com.eu.habbo.habbohotel.wired.highscores.WiredHighscoreScoreType;
|
||||
@ -78,6 +81,9 @@ public class InteractionWiredHighscore extends HabboItem {
|
||||
|
||||
@Override
|
||||
public void onClick(GameClient client, Room room, Object[] objects) throws Exception {
|
||||
if (!((client != null && room != null && room.hasRights(client.getHabbo())) || (objects.length >= 2 && objects[1] instanceof WiredEffectType)))
|
||||
return;
|
||||
|
||||
if (this.getExtradata() == null || this.getExtradata().isEmpty() || this.getExtradata().length() == 0) {
|
||||
this.setExtradata("0");
|
||||
}
|
||||
@ -89,6 +95,10 @@ public class InteractionWiredHighscore extends HabboItem {
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Caught exception", e);
|
||||
}
|
||||
|
||||
if(client != null && !(objects.length >= 2 && objects[1] instanceof WiredEffectType)) {
|
||||
WiredHandler.handle(WiredTriggerType.STATE_CHANGED, client.getHabbo().getRoomUnit(), room, new Object[]{this});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user