Add RbBunnyTag achievement

This commit is contained in:
Alejandro 2019-05-27 00:43:14 +03:00
parent 8a1dacd831
commit 8aae182f6a

View File

@ -1,8 +1,13 @@
package com.eu.habbo.habbohotel.items.interactions.games.tag.bunnyrun;
import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.achievements.Achievement;
import com.eu.habbo.habbohotel.achievements.AchievementManager;
import com.eu.habbo.habbohotel.games.tag.BunnyrunGame;
import com.eu.habbo.habbohotel.items.Item;
import com.eu.habbo.habbohotel.items.interactions.games.tag.InteractionTagField;
import com.eu.habbo.habbohotel.rooms.Room;
import com.eu.habbo.habbohotel.users.Habbo;
import java.sql.ResultSet;
import java.sql.SQLException;
@ -15,4 +20,15 @@ public class InteractionBunnyrunField extends InteractionTagField {
public InteractionBunnyrunField(int id, int userId, Item item, String extradata, int limitedStack, int limitedSells) {
super(id, userId, item, extradata, limitedStack, limitedSells, BunnyrunGame.class);
}
@Override
public void onPlace(Room room) {
super.onPlace(room);
Habbo itemOwner = Emulator.getGameEnvironment().getHabboManager().getHabbo(this.getUserId());
if (itemOwner != null) {
AchievementManager.progressAchievement(itemOwner, Emulator.getGameEnvironment().getAchievementManager().getAchievement("RbBunnyTag"));
}
}
}