Arcturus-Community/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionHabboClubHopper.java

35 lines
1.3 KiB
Java
Raw Normal View History

2018-07-06 15:30:00 +02:00
package com.eu.habbo.habbohotel.items.interactions;
import com.eu.habbo.habbohotel.gameclients.GameClient;
import com.eu.habbo.habbohotel.items.Item;
import com.eu.habbo.habbohotel.rooms.Room;
2019-03-18 02:22:00 +01:00
import com.eu.habbo.habbohotel.rooms.RoomTile;
2018-07-06 15:30:00 +02:00
import com.eu.habbo.messages.outgoing.generic.alerts.CustomNotificationComposer;
import java.sql.ResultSet;
import java.sql.SQLException;
2019-05-26 20:14:53 +02:00
public class InteractionHabboClubHopper extends InteractionHopper {
public InteractionHabboClubHopper(ResultSet set, Item baseItem) throws SQLException {
2018-07-06 15:30:00 +02:00
super(set, baseItem);
}
2019-05-26 20:14:53 +02:00
public InteractionHabboClubHopper(int id, int userId, Item item, String extradata, int limitedStack, int limitedSells) {
2018-07-06 15:30:00 +02:00
super(id, userId, item, extradata, limitedStack, limitedSells);
}
@Override
2019-05-26 20:14:53 +02:00
public void onClick(GameClient client, Room room, Object[] objects) throws Exception {
if (client.getHabbo().getHabboStats().hasActiveClub()) {
2018-07-06 15:30:00 +02:00
super.onClick(client, room, objects);
2019-05-26 20:14:53 +02:00
} else {
2018-07-06 15:30:00 +02:00
client.sendResponse(new CustomNotificationComposer(CustomNotificationComposer.HOPPER_NO_HC));
}
}
2019-03-18 02:22:00 +01:00
@Override
2019-05-26 20:14:53 +02:00
protected boolean canUseTeleport(GameClient client, RoomTile front, Room room) {
2019-03-18 02:22:00 +01:00
return super.canUseTeleport(client, front, room) && client.getHabbo().getHabboStats().hasActiveClub();
}
2018-07-06 15:30:00 +02:00
}