🆙 Fix Ignore issue
This commit is contained in:
parent
06c18fc979
commit
54080dee5a
2
Database Updates/UpdateDatae_unignorable.sql
Normal file
2
Database Updates/UpdateDatae_unignorable.sql
Normal file
@ -0,0 +1,2 @@
|
||||
--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,16 +742,10 @@ 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)) {
|
||||
this.ignoredUsers.add(userId);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user