mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-22 23:10:52 +01:00
Fix Ignore issue
This commit is contained in:
parent
e6bb8157b2
commit
f4955ff039
@ -1,3 +1,6 @@
|
||||
--New bot walking settings
|
||||
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.bot.limit.walking.distance', '1');
|
||||
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.bot.limit.walking.distance.radius', '5');
|
||||
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.bot.limit.walking.distance.radius', '5');
|
||||
|
||||
--New permission
|
||||
ALTER TABLE `permissions` ADD COLUMN `acc_unignorable` ENUM('0','1') NOT NULL DEFAULT '0' AFTER `acc_infinite_friends`;
|
@ -43,6 +43,7 @@ public class Permission {
|
||||
public static String ACC_HELPER_GIVE_GUIDE_TOURS = "acc_helper_give_guide_tours";
|
||||
public static String ACC_HELPER_JUDGE_CHAT_REVIEWS = "acc_helper_judge_chat_reviews";
|
||||
public static String ACC_FLOORPLAN_EDITOR = "acc_floorplan_editor";
|
||||
public static String ACC_UNIGNORABLE = "acc_unignorable";
|
||||
public final String key;
|
||||
public final PermissionSetting setting;
|
||||
public Permission(String key, PermissionSetting setting) {
|
||||
|
@ -7,6 +7,7 @@ import com.eu.habbo.habbohotel.achievements.Achievement;
|
||||
import com.eu.habbo.habbohotel.achievements.AchievementManager;
|
||||
import com.eu.habbo.habbohotel.achievements.TalentTrackType;
|
||||
import com.eu.habbo.habbohotel.catalog.CatalogItem;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomTrade;
|
||||
import com.eu.habbo.habbohotel.users.cache.HabboOfferPurchase;
|
||||
@ -741,14 +742,9 @@ public class HabboStats implements Runnable {
|
||||
public boolean ignoreUser(GameClient gameClient, int userId) {
|
||||
final Habbo target = Emulator.getGameEnvironment().getHabboManager().getHabbo(userId);
|
||||
|
||||
if (!Emulator.getConfig().getBoolean("hotel.allow.ignore.staffs")) {
|
||||
final int ownRank = gameClient.getHabbo().getHabboInfo().getRank().getId();
|
||||
final int targetRank = target.getHabboInfo().getRank().getId();
|
||||
|
||||
if (targetRank >= ownRank) {
|
||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("generic.error.ignore_higher_rank"), RoomChatMessageBubbles.ALERT);
|
||||
return false;
|
||||
}
|
||||
if (!Emulator.getConfig().getBoolean("hotel.allow.ignore.staffs") && target.hasPermission(Permission.ACC_UNIGNORABLE)) {
|
||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("generic.error.ignore_higher_rank"), RoomChatMessageBubbles.ALERT);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.userIgnored(userId)) {
|
||||
|
Loading…
Reference in New Issue
Block a user