From 8aae182f6a3131cbd214a1757ed60fa3499fc79d Mon Sep 17 00:00:00 2001 From: Alejandro <25-alejandro@users.noreply.git.krews.org> Date: Mon, 27 May 2019 00:43:14 +0300 Subject: [PATCH] Add RbBunnyTag achievement --- .../tag/bunnyrun/InteractionBunnyrunField.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/tag/bunnyrun/InteractionBunnyrunField.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/tag/bunnyrun/InteractionBunnyrunField.java index f0ce6d36..ac996a8b 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/tag/bunnyrun/InteractionBunnyrunField.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/tag/bunnyrun/InteractionBunnyrunField.java @@ -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")); + } + } } \ No newline at end of file