mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-22 15:00:52 +01:00
Goodbye magic strings
This commit is contained in:
parent
5e15e3c2d7
commit
582b60b810
@ -1,6 +1,6 @@
|
||||
#DATABASE UPDATE: 1.0.6 -> 1.0.7
|
||||
|
||||
ALTER TABLE `permissions` ADD `acc_update_notifications` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `permissions` ADD `"acc_update_notifications"` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
|
||||
DELETE FROM emulator_settings WHERE `key` LIKE 'emulator.version';
|
||||
|
||||
#END DATABASE UPDATE: 1.0.5 -> 1.0.6
|
@ -110,8 +110,8 @@ public class BotManager {
|
||||
return;
|
||||
|
||||
if (room != null && bot != null && habbo != null) {
|
||||
if (room.getOwnerId() == habbo.getHabboInfo().getId() || habbo.hasPermission(Permission.ACC_ANYROOMOWNER) || habbo.hasPermission("acc_placefurni")) {
|
||||
if (room.getCurrentBots().size() >= Room.MAXIMUM_BOTS && !habbo.hasPermission("acc_unlimited_bots")) {
|
||||
if (room.getOwnerId() == habbo.getHabboInfo().getId() || habbo.hasPermission(Permission.ACC_ANYROOMOWNER) || habbo.hasPermission(Permission.ACC_PLACEFURNI)) {
|
||||
if (room.getCurrentBots().size() >= Room.MAXIMUM_BOTS && !habbo.hasPermission(Permission.ACC_UNLIMITED_BOTS)) {
|
||||
habbo.getClient().sendResponse(new BotErrorComposer(BotErrorComposer.ROOM_ERROR_MAX_BOTS));
|
||||
return;
|
||||
}
|
||||
@ -171,7 +171,7 @@ public class BotManager {
|
||||
return;
|
||||
|
||||
if (bot.getOwnerId() == habbo.getHabboInfo().getId() || habbo.hasPermission(Permission.ACC_ANYROOMOWNER)) {
|
||||
if (!habbo.hasPermission("acc_unlimited_bots") && habbo.getInventory().getBotsComponent().getBots().size() >= 15)
|
||||
if (!habbo.hasPermission(Permission.ACC_UNLIMITED_BOTS) && habbo.getInventory().getBotsComponent().getBots().size() >= 15)
|
||||
return;
|
||||
|
||||
bot.onPickUp(habbo, habbo.getHabboInfo().getCurrentRoom());
|
||||
|
@ -11,6 +11,7 @@ import com.eu.habbo.habbohotel.items.Item;
|
||||
import com.eu.habbo.habbohotel.items.SoundTrack;
|
||||
import com.eu.habbo.habbohotel.items.interactions.*;
|
||||
import com.eu.habbo.habbohotel.modtool.ScripterManager;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.pets.Pet;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.habbohotel.users.HabboBadge;
|
||||
@ -1070,14 +1071,14 @@ public class CatalogManager {
|
||||
}
|
||||
}
|
||||
|
||||
if (!free && !habbo.getClient().getHabbo().hasPermission("acc_infinite_credits")) {
|
||||
if (!free && !habbo.getClient().getHabbo().hasPermission(Permission.ACC_INFINITE_CREDITS)) {
|
||||
if (purchasedEvent.totalCredits > 0) {
|
||||
habbo.getClient().getHabbo().getHabboInfo().addCredits(-purchasedEvent.totalCredits);
|
||||
habbo.getClient().sendResponse(new UserCreditsComposer(habbo.getClient().getHabbo()));
|
||||
}
|
||||
}
|
||||
|
||||
if (!free && !habbo.getClient().getHabbo().hasPermission("acc_infinite_points")) {
|
||||
if (!free && !habbo.getClient().getHabbo().hasPermission(Permission.ACC_INFINITE_POINTS)) {
|
||||
if (purchasedEvent.totalPoints > 0) {
|
||||
habbo.getClient().getHabbo().getHabboInfo().addCurrencyAmount(item.getPointsType(), -purchasedEvent.totalPoints);
|
||||
habbo.getClient().sendResponse(new UserPointsComposer(habbo.getClient().getHabbo().getHabboInfo().getCurrencyAmount(item.getPointsType()), -purchasedEvent.totalPoints, item.getPointsType()));
|
||||
|
@ -2,6 +2,7 @@ package com.eu.habbo.habbohotel.commands;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
|
||||
import com.eu.habbo.messages.outgoing.users.MeMenuSettingsComposer;
|
||||
|
||||
@ -31,7 +32,7 @@ public class ChatTypeCommand extends Command {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!gameClient.getHabbo().hasPermission("acc_anychatcolor")) {
|
||||
if (!gameClient.getHabbo().hasPermission(Permission.ACC_ANYCHATCOLOR)) {
|
||||
for (String s : Emulator.getConfig().getValue("commands.cmd_chatcolor.banned_numbers").split(";")) {
|
||||
if (Integer.valueOf(s) == chatColor) {
|
||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_chatcolor.banned"), RoomChatMessageBubbles.ALERT);
|
||||
|
@ -72,7 +72,7 @@ public class CommandHandler {
|
||||
for (String s : command.keys) {
|
||||
if (s.toLowerCase().equals(parts[0].toLowerCase())) {
|
||||
boolean succes = false;
|
||||
if (command.permission == null || gameClient.getHabbo().hasPermission(command.permission, gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null && (gameClient.getHabbo().getHabboInfo().getCurrentRoom().hasRights(gameClient.getHabbo())) || gameClient.getHabbo().hasPermission("acc_placefurni") || (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null && gameClient.getHabbo().getHabboInfo().getCurrentRoom().getGuildId() > 0 && gameClient.getHabbo().getHabboInfo().getCurrentRoom().guildRightLevel(gameClient.getHabbo()) >= 2))) {
|
||||
if (command.permission == null || gameClient.getHabbo().hasPermission(command.permission, gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null && (gameClient.getHabbo().getHabboInfo().getCurrentRoom().hasRights(gameClient.getHabbo())) || gameClient.getHabbo().hasPermission(Permission.ACC_PLACEFURNI) || (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null && gameClient.getHabbo().getHabboInfo().getCurrentRoom().getGuildId() > 0 && gameClient.getHabbo().getHabboInfo().getCurrentRoom().guildRightLevel(gameClient.getHabbo()) >= 2))) {
|
||||
try {
|
||||
Emulator.getPluginManager().fireEvent(new UserExecuteCommandEvent(gameClient.getHabbo(), command, parts));
|
||||
|
||||
|
@ -2,6 +2,7 @@ package com.eu.habbo.habbohotel.commands;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import org.slf4j.Logger;
|
||||
@ -29,7 +30,7 @@ public class EnableCommand extends Command {
|
||||
}
|
||||
|
||||
if (target != null) {
|
||||
if (target == gameClient.getHabbo() || gameClient.getHabbo().hasPermission("acc_enable_others")) {
|
||||
if (target == gameClient.getHabbo() || gameClient.getHabbo().hasPermission(Permission.ACC_ENABLE_OTHERS)) {
|
||||
try {
|
||||
if (target.getHabboInfo().getCurrentRoom() != null) {
|
||||
if (target.getHabboInfo().getRiding() == null) {
|
||||
|
@ -2,6 +2,7 @@ package com.eu.habbo.habbohotel.commands;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.habbohotel.users.HabboGender;
|
||||
@ -27,7 +28,7 @@ public class MimicCommand extends Command {
|
||||
if (habbo == gameClient.getHabbo()) {
|
||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_mimic.not_self"), RoomChatMessageBubbles.ALERT);
|
||||
return true;
|
||||
} else if (habbo.hasPermission("acc_not_mimiced") && !gameClient.getHabbo().hasPermission("acc_not_mimiced")) {
|
||||
} else if (habbo.hasPermission(Permission.ACC_NOT_MIMICED) && !gameClient.getHabbo().hasPermission(Permission.ACC_NOT_MIMICED)) {
|
||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_mimic.blocked").replace("%user%", params[1]).replace("%gender_name%", (habbo.getHabboInfo().getGender().equals(HabboGender.M) ? Emulator.getTexts().getValue("gender.him") : Emulator.getTexts().getValue("gender.her"))), RoomChatMessageBubbles.ALERT);
|
||||
return true;
|
||||
} else if (!habbo.hasPermission("acc_mimic_unredeemed") && FigureUtil.hasBlacklistedClothing(habbo.getHabboInfo().getLook(), gameClient.getHabbo().getForbiddenClothing())) {
|
||||
|
@ -2,7 +2,7 @@ package com.eu.habbo.habbohotel.commands;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
|
||||
public class TestCommand extends Command {
|
||||
@ -12,7 +12,7 @@ public class TestCommand extends Command {
|
||||
|
||||
@Override
|
||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
||||
if (gameClient.getHabbo() != null || !gameClient.getHabbo().hasPermission("acc_supporttool") || !Emulator.debugging)
|
||||
if (gameClient.getHabbo() != null || !gameClient.getHabbo().hasPermission(Permission.ACC_SUPPORTTOOL) || !Emulator.debugging)
|
||||
return false;
|
||||
|
||||
int header = Integer.valueOf(params[1]);
|
||||
|
@ -3,6 +3,7 @@ package com.eu.habbo.habbohotel.commands;
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
||||
import com.eu.habbo.habbohotel.modtool.ModToolBan;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.habbohotel.users.HabboInfo;
|
||||
@ -42,9 +43,9 @@ public class UserInfoCommand extends Command {
|
||||
Emulator.getTexts().getValue("command.cmd_userinfo.motto") + ": " + habbo.getMotto().replace("<", "[").replace(">", "]") + "\r" +
|
||||
Emulator.getTexts().getValue("command.cmd_userinfo.rank") + ": " + habbo.getRank().getName() + " (" + habbo.getRank().getId() + ") \r" +
|
||||
Emulator.getTexts().getValue("command.cmd_userinfo.online") + ": " + (onlineHabbo == null ? Emulator.getTexts().getValue("generic.no") : Emulator.getTexts().getValue("generic.yes")) + "\r" +
|
||||
((habbo.getRank().hasPermission("acc_hide_mail", true)) ? "" : Emulator.getTexts().getValue("command.cmd_userinfo.email") + ": " + habbo.getMail() + "\r") +
|
||||
((habbo.getRank().hasPermission("acc_hide_ip", true)) ? "" : Emulator.getTexts().getValue("command.cmd_userinfo.ip_register") + ": " + habbo.getIpRegister() + "\r") +
|
||||
((habbo.getRank().hasPermission("acc_hide_ip", true)) || onlineHabbo == null ? "" : Emulator.getTexts().getValue("command.cmd_userinfo.ip_current") + ": " + onlineHabbo.getClient().getChannel().remoteAddress().toString() + "\r") +
|
||||
((habbo.getRank().hasPermission(Permission.ACC_HIDE_MAIL, true)) ? "" : Emulator.getTexts().getValue("command.cmd_userinfo.email") + ": " + habbo.getMail() + "\r") +
|
||||
((habbo.getRank().hasPermission(Permission.ACC_HIDE_IP, true)) ? "" : Emulator.getTexts().getValue("command.cmd_userinfo.ip_register") + ": " + habbo.getIpRegister() + "\r") +
|
||||
((habbo.getRank().hasPermission(Permission.ACC_HIDE_IP, true)) || onlineHabbo == null ? "" : Emulator.getTexts().getValue("command.cmd_userinfo.ip_current") + ": " + onlineHabbo.getClient().getChannel().remoteAddress().toString() + "\r") +
|
||||
(onlineHabbo != null ? Emulator.getTexts().getValue("command.cmd_userinfo.achievement_score") + ": " + onlineHabbo.getHabboStats().achievementScore + "\r" : ""));
|
||||
|
||||
ModToolBan ban = Emulator.getGameEnvironment().getModToolManager().checkForBan(habbo.getId());
|
||||
|
@ -3,6 +3,7 @@ package com.eu.habbo.habbohotel.items.interactions;
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
||||
import com.eu.habbo.habbohotel.items.Item;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomTile;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomUnit;
|
||||
@ -35,7 +36,7 @@ public class InteractionGuildGate extends InteractionGuildFurni {
|
||||
|
||||
Habbo habbo = room.getHabbo(roomUnit);
|
||||
|
||||
return habbo != null && (habbo.getHabboStats().hasGuild(super.getGuildId()) || habbo.hasPermission("acc_guildgate"));
|
||||
return habbo != null && (habbo.getHabboStats().hasGuild(super.getGuildId()) || habbo.hasPermission(Permission.ACC_GUILDGATE));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,6 +5,7 @@ import com.eu.habbo.habbohotel.gameclients.GameClient;
|
||||
import com.eu.habbo.habbohotel.items.Item;
|
||||
import com.eu.habbo.habbohotel.items.interactions.InteractionWiredEffect;
|
||||
import com.eu.habbo.habbohotel.items.interactions.InteractionWiredTrigger;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomUnit;
|
||||
@ -116,7 +117,7 @@ public class WiredEffectGiveReward extends InteractionWiredEffect {
|
||||
public void onClick(GameClient client, Room room, Object[] objects) throws Exception {
|
||||
super.onClick(client, room, objects);
|
||||
|
||||
if (client.getHabbo().hasPermission("acc_superwired")) {
|
||||
if (client.getHabbo().hasPermission(Permission.ACC_SUPERWIRED)) {
|
||||
client.getHabbo().whisper(Emulator.getTexts().getValue("hotel.wired.superwired.info"), RoomChatMessageBubbles.BOT);
|
||||
}
|
||||
}
|
||||
@ -165,7 +166,7 @@ public class WiredEffectGiveReward extends InteractionWiredEffect {
|
||||
|
||||
@Override
|
||||
public boolean saveData(ClientMessage packet, GameClient gameClient) {
|
||||
if (gameClient.getHabbo().hasPermission("acc_superwired")) {
|
||||
if (gameClient.getHabbo().hasPermission(Permission.ACC_SUPERWIRED)) {
|
||||
packet.readInt();
|
||||
|
||||
this.rewardTime = packet.readInt();
|
||||
|
@ -19,7 +19,7 @@ public class NavigatorHotelFilter extends NavigatorFilter {
|
||||
|
||||
@Override
|
||||
public List<SearchResultList> getResult(Habbo habbo) {
|
||||
boolean showInvisible = habbo.hasPermission("acc_enter_anyroom") || habbo.hasPermission(Permission.ACC_ANYROOMOWNER);
|
||||
boolean showInvisible = habbo.hasPermission(Permission.ACC_ENTERANYROOM) || habbo.hasPermission(Permission.ACC_ANYROOMOWNER);
|
||||
List<SearchResultList> resultLists = new ArrayList<>();
|
||||
|
||||
int i = 0;
|
||||
@ -41,7 +41,7 @@ public class NavigatorHotelFilter extends NavigatorFilter {
|
||||
|
||||
@Override
|
||||
public List<SearchResultList> getResult(Habbo habbo, NavigatorFilterField filterField, String value, int roomCategory) {
|
||||
boolean showInvisible = habbo.hasPermission("acc_enter_anyroom") || habbo.hasPermission(Permission.ACC_ANYROOMOWNER);
|
||||
boolean showInvisible = habbo.hasPermission(Permission.ACC_ENTERANYROOM) || habbo.hasPermission(Permission.ACC_ANYROOMOWNER);
|
||||
if (!filterField.databaseQuery.isEmpty()) {
|
||||
List<SearchResultList> resultLists = new ArrayList<>();
|
||||
int i = 0;
|
||||
|
@ -16,7 +16,7 @@ public class NavigatorPublicFilter extends NavigatorFilter {
|
||||
|
||||
@Override
|
||||
public List<SearchResultList> getResult(Habbo habbo) {
|
||||
boolean showInvisible = habbo.hasPermission("acc_enter_anyroom") || habbo.hasPermission(Permission.ACC_ANYROOMOWNER);
|
||||
boolean showInvisible = habbo.hasPermission(Permission.ACC_ENTERANYROOM) || habbo.hasPermission(Permission.ACC_ANYROOMOWNER);
|
||||
List<SearchResultList> resultLists = new ArrayList<>();
|
||||
|
||||
int i = 0;
|
||||
|
@ -16,7 +16,7 @@ public class NavigatorRoomAdsFilter extends NavigatorFilter {
|
||||
|
||||
@Override
|
||||
public List<SearchResultList> getResult(Habbo habbo) {
|
||||
boolean showInvisible = habbo.hasPermission("acc_enter_anyroom") || habbo.hasPermission(Permission.ACC_ANYROOMOWNER);
|
||||
boolean showInvisible = habbo.hasPermission(Permission.ACC_ENTERANYROOM) || habbo.hasPermission(Permission.ACC_ANYROOMOWNER);
|
||||
List<SearchResultList> resultList = new ArrayList<>();
|
||||
resultList.add(new SearchResultList(0, "categories", "", SearchAction.NONE, habbo.getHabboStats().navigatorWindowSettings.getListModeForCategory("categories", ListMode.LIST), habbo.getHabboStats().navigatorWindowSettings.getDisplayModeForCategory("official-root", DisplayMode.VISIBLE), Emulator.getGameEnvironment().getNavigatorManager().getRoomsForCategory("categories", habbo), false, showInvisible, DisplayOrder.ACTIVITY, 0));
|
||||
return resultList;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.eu.habbo.habbohotel.permissions;
|
||||
|
||||
public class Permission {
|
||||
public static String ACC_ANYCHATCOLOR = "acc_anychatcolor";
|
||||
public static String ACC_ANYCHATCOLOR = "acc_anychatcolor"; // allows them to pick and choose any color from the chat bubbles.
|
||||
public static String ACC_ANYROOMOWNER = "acc_anyroomowner";
|
||||
public static String ACC_EMPTY_OTHERS = "acc_empty_others";
|
||||
public static String ACC_ENABLE_OTHERS = "acc_enable_others";
|
||||
@ -18,15 +18,13 @@ public class Permission {
|
||||
public static String ACC_HIDE_MAIL = "acc_hide_mail";
|
||||
public static String ACC_NOT_MIMICED = "acc_not_mimiced";
|
||||
public static String ACC_CHAT_NO_FLOOD = "acc_chat_no_flood";
|
||||
public static String ACC_STAFF_CHAT = "acc_staff_chat";
|
||||
public static String ACC_STAFF_PICK = "acc_staff_pick";
|
||||
public static String ACC_ENTERANYROOM = "acc_enteranyroom";
|
||||
public static String ACC_ENTERANYROOM = "acc_enteranyroom"; //
|
||||
public static String ACC_FULLROOMS = "acc_fullrooms";
|
||||
public static String ACC_INFINITE_CREDITS = "acc_infinite_credits";
|
||||
public static String ACC_INFINITE_PIXELS = "acc_infinite_pixels";
|
||||
public static String ACC_INFINITE_POINTS = "acc_infinite_points";
|
||||
public static String ACC_AMBASSADOR = "acc_ambassador";
|
||||
public static String ACC_DEBUG = "acc_debug";
|
||||
public static String ACC_CHAT_NO_LIMIT = "acc_chat_no_limit";
|
||||
public static String ACC_CHAT_NO_FILTER = "acc_chat_no_filter";
|
||||
public static String ACC_NOMUTE = "acc_nomute";
|
||||
|
@ -1197,7 +1197,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
habbo.getHabboStats().mutedBubbleTracker = false;
|
||||
this.sendComposer(new RoomUserIgnoredComposer(habbo, RoomUserIgnoredComposer.UNIGNORED).compose());
|
||||
}
|
||||
if (!habbo.hasPermission("acc_chat_no_flood") && habbo.getHabboStats().chatCounter > 0) {
|
||||
if (!habbo.hasPermission(Permission.ACC_CHAT_NO_FLOOD) && habbo.getHabboStats().chatCounter > 0) {
|
||||
//if (habbo.getRoomUnit().talkTimeOut == 0 || currentTimestamp - habbo.getRoomUnit().talkTimeOut < 0)
|
||||
{
|
||||
habbo.getHabboStats().chatCounter--;
|
||||
@ -3088,14 +3088,14 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
}
|
||||
|
||||
if (!this.wordFilterWords.isEmpty()) {
|
||||
if (!habbo.hasPermission("acc_chat_no_filter")) {
|
||||
if (!habbo.hasPermission(Permission.ACC_CHAT_NO_FILTER)) {
|
||||
for (String string : this.wordFilterWords) {
|
||||
roomChatMessage.setMessage(roomChatMessage.getMessage().replace(string, "bobba"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!habbo.hasPermission("acc_nomute")) {
|
||||
if (!habbo.hasPermission(Permission.ACC_NOMUTE)) {
|
||||
if (this.isMuted() && !this.hasRights(habbo)) {
|
||||
return;
|
||||
}
|
||||
@ -3160,13 +3160,13 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
|
||||
continue;
|
||||
}
|
||||
if (h.hasPermission("acc_see_whispers")) {
|
||||
if (h.hasPermission(Permission.ACC_SEE_WHISPERS)) {
|
||||
h.getClient().sendResponse(staffMessage);
|
||||
}
|
||||
}
|
||||
} else if (chatType == RoomChatType.TALK) {
|
||||
ServerMessage message = new RoomUserTalkComposer(roomChatMessage).compose();
|
||||
boolean noChatLimit = habbo.hasPermission("acc_chat_no_limit");
|
||||
boolean noChatLimit = habbo.hasPermission(Permission.ACC_CHAT_NO_LIMIT);
|
||||
|
||||
for (Habbo h : this.getHabbos()) {
|
||||
if ((h.getRoomUnit().getCurrentLocation().distance(habbo.getRoomUnit().getCurrentLocation()) <= this.chatDistance ||
|
||||
@ -4229,7 +4229,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
for (Habbo habbo : this.getHabbos()) {
|
||||
if (habbo.getHabboInfo().getCurrentRoom() == this) {
|
||||
if (habbo.getHabboInfo().getId() != this.ownerId) {
|
||||
if (!(habbo.hasPermission(Permission.ACC_ANYROOMOWNER) || habbo.hasPermission("acc_moverotate")))
|
||||
if (!(habbo.hasPermission(Permission.ACC_ANYROOMOWNER) || habbo.hasPermission(Permission.ACC_MOVEROTATE)))
|
||||
this.refreshRightsForHabbo(habbo);
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.eu.habbo.habbohotel.rooms;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.core.DatabaseLoggable;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.ISerialize;
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
@ -51,7 +52,7 @@ public class RoomChatMessage implements Runnable, ISerialize, DatabaseLoggable {
|
||||
this.bubble = RoomChatMessageBubbles.NORMAL;
|
||||
}
|
||||
|
||||
if (!message.client.getHabbo().hasPermission("acc_anychatcolor")) {
|
||||
if (!message.client.getHabbo().hasPermission(Permission.ACC_ANYCHATCOLOR)) {
|
||||
for (Integer i : RoomChatMessage.BANNED_BUBBLES) {
|
||||
if (i == this.bubble.getType()) {
|
||||
this.bubble = RoomChatMessageBubbles.NORMAL;
|
||||
@ -173,7 +174,7 @@ public class RoomChatMessage implements Runnable, ISerialize, DatabaseLoggable {
|
||||
@Override
|
||||
public void serialize(ServerMessage message) {
|
||||
if (this.habbo != null && this.bubble.isOverridable()) {
|
||||
if (!this.habbo.hasPermission("acc_anychatcolor")) {
|
||||
if (!this.habbo.hasPermission(Permission.ACC_ANYCHATCOLOR)) {
|
||||
for (Integer i : RoomChatMessage.BANNED_BUBBLES) {
|
||||
if (i == this.bubble.getType()) {
|
||||
this.bubble = RoomChatMessageBubbles.NORMAL;
|
||||
@ -209,7 +210,7 @@ public class RoomChatMessage implements Runnable, ISerialize, DatabaseLoggable {
|
||||
}
|
||||
|
||||
if (Emulator.getConfig().getBoolean("hotel.wordfilter.enabled") && Emulator.getConfig().getBoolean("hotel.wordfilter.rooms")) {
|
||||
if (!this.habbo.hasPermission("acc_chat_no_filter")) {
|
||||
if (!this.habbo.hasPermission(Permission.ACC_CHAT_NO_FILTER)) {
|
||||
if (!Emulator.getGameEnvironment().getWordFilter().autoReportCheck(this)) {
|
||||
if (!Emulator.getGameEnvironment().getWordFilter().hideMessageCheck(this.message)) {
|
||||
Emulator.getGameEnvironment().getWordFilter().filter(this, this.habbo);
|
||||
|
@ -510,7 +510,7 @@ public class RoomManager {
|
||||
}
|
||||
}
|
||||
|
||||
if (room.isBanned(habbo) && !habbo.hasPermission(Permission.ACC_ANYROOMOWNER) && !habbo.hasPermission("acc_enteranyroom")) {
|
||||
if (room.isBanned(habbo) && !habbo.hasPermission(Permission.ACC_ANYROOMOWNER) && !habbo.hasPermission(Permission.ACC_ENTERANYROOM)) {
|
||||
habbo.getClient().sendResponse(new RoomEnterErrorComposer(RoomEnterErrorComposer.ROOM_ERROR_BANNED));
|
||||
return;
|
||||
}
|
||||
@ -528,7 +528,7 @@ public class RoomManager {
|
||||
room.getState() == RoomState.OPEN ||
|
||||
room.getState() == RoomState.INVISIBLE ||
|
||||
habbo.hasPermission(Permission.ACC_ANYROOMOWNER) ||
|
||||
habbo.hasPermission("acc_enteranyroom") ||
|
||||
habbo.hasPermission(Permission.ACC_ENTERANYROOM) ||
|
||||
room.hasRights(habbo) ||
|
||||
(room.hasGuild() && room.guildRightLevel(habbo) > 2)) {
|
||||
this.openRoom(habbo, room, doorLocation);
|
||||
@ -620,7 +620,7 @@ public class RoomManager {
|
||||
return;
|
||||
}
|
||||
|
||||
if (room.getUserCount() >= room.getUsersMax() && !habbo.hasPermission("acc_fullrooms") && !room.hasRights(habbo)) {
|
||||
if (room.getUserCount() >= room.getUsersMax() && !habbo.hasPermission(Permission.ACC_FULLROOMS) && !room.hasRights(habbo)) {
|
||||
habbo.getClient().sendResponse(new RoomEnterErrorComposer(RoomEnterErrorComposer.ROOM_ERROR_GUESTROOM_FULL));
|
||||
return;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.eu.habbo.messages.incoming.ambassadors;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.modtool.ScripterManager;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
||||
@ -11,7 +12,7 @@ import com.eu.habbo.plugin.events.support.SupportUserAlertedReason;
|
||||
public class AmbassadorAlertCommandEvent extends MessageHandler {
|
||||
@Override
|
||||
public void handle() throws Exception {
|
||||
if (!this.client.getHabbo().hasPermission("acc_ambassador")) {
|
||||
if (!this.client.getHabbo().hasPermission(Permission.ACC_AMBASSADOR)) {
|
||||
ScripterManager.scripterDetected(this.client, Emulator.getTexts().getValue("scripter.warning.modtools.alert").replace("%username%", client.getHabbo().getHabboInfo().getUsername()).replace("%message%", "${notification.ambassador.alert.warning.message}"));
|
||||
return;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.eu.habbo.messages.incoming.ambassadors;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.rooms.ForwardToRoomComposer;
|
||||
@ -8,7 +9,7 @@ import com.eu.habbo.messages.outgoing.rooms.ForwardToRoomComposer;
|
||||
public class AmbassadorVisitCommandEvent extends MessageHandler {
|
||||
@Override
|
||||
public void handle() throws Exception {
|
||||
if (this.client.getHabbo().hasPermission("acc_ambassador")) {
|
||||
if (this.client.getHabbo().hasPermission(Permission.ACC_AMBASSADOR)) {
|
||||
String username = this.packet.readString();
|
||||
|
||||
Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(username);
|
||||
|
@ -10,6 +10,7 @@ import com.eu.habbo.habbohotel.items.FurnitureType;
|
||||
import com.eu.habbo.habbohotel.items.Item;
|
||||
import com.eu.habbo.habbohotel.items.interactions.*;
|
||||
import com.eu.habbo.habbohotel.modtool.ScripterManager;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.habbohotel.users.HabboBadge;
|
||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||
@ -347,15 +348,15 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
|
||||
AchievementManager.progressAchievement(userId, Emulator.getGameEnvironment().getAchievementManager().getAchievement("GiftReceiver"));
|
||||
|
||||
if (!this.client.getHabbo().hasPermission("acc_infinite_credits")) {
|
||||
if (!this.client.getHabbo().hasPermission(Permission.ACC_INFINITE_CREDITS)) {
|
||||
if (totalCredits > 0) {
|
||||
this.client.getHabbo().giveCredits(-totalCredits);
|
||||
}
|
||||
}
|
||||
if (totalPoints > 0) {
|
||||
if (item.getPointsType() == 0 && !this.client.getHabbo().hasPermission("acc_infinite_pixels")) {
|
||||
if (item.getPointsType() == 0 && !this.client.getHabbo().hasPermission(Permission.ACC_INFINITE_PIXELS)) {
|
||||
this.client.getHabbo().getHabboInfo().addPixels(-totalPoints);
|
||||
} else if (!this.client.getHabbo().hasPermission("acc_infinite_points")) {
|
||||
} else if (!this.client.getHabbo().hasPermission(Permission.ACC_INFINITE_POINTS)) {
|
||||
this.client.getHabbo().getHabboInfo().addCurrencyAmount(item.getPointsType(), -totalPoints);
|
||||
}
|
||||
this.client.sendResponse(new UserPointsComposer(this.client.getHabbo().getHabboInfo().getCurrencyAmount(item.getPointsType()), -totalPoints, item.getPointsType()));
|
||||
|
@ -166,10 +166,10 @@ public class CatalogBuyItemEvent extends MessageHandler {
|
||||
if (this.client.getHabbo().getHabboInfo().getCredits() < totalCredits)
|
||||
return;
|
||||
|
||||
if (!this.client.getHabbo().hasPermission("acc_infinite_credits"))
|
||||
if (!this.client.getHabbo().hasPermission(Permission.ACC_INFINITE_CREDITS))
|
||||
this.client.getHabbo().getHabboInfo().addCredits(-totalCredits);
|
||||
|
||||
if (!this.client.getHabbo().hasPermission("acc_infinite_points"))
|
||||
if (!this.client.getHabbo().hasPermission(Permission.ACC_INFINITE_POINTS))
|
||||
this.client.getHabbo().getHabboInfo().addCurrencyAmount(item.getPointsType(), -totalDuckets);
|
||||
|
||||
if (this.client.getHabbo().getHabboStats().getClubExpireTimestamp() <= Emulator.getIntUnixTimestamp())
|
||||
|
@ -21,7 +21,7 @@ public class FloorPlanEditorSaveEvent extends MessageHandler {
|
||||
|
||||
@Override
|
||||
public void handle() throws Exception {
|
||||
if (!this.client.getHabbo().hasPermission("acc_floorplan_editor")) {
|
||||
if (!this.client.getHabbo().hasPermission(Permission.ACC_FLOORPLAN_EDITOR)) {
|
||||
this.client.sendResponse(new GenericAlertComposer(Emulator.getTexts().getValue("floorplan.permission")));
|
||||
return;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.eu.habbo.messages.incoming.guides;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.guides.GuideToolsComposer;
|
||||
|
||||
@ -14,13 +15,13 @@ public class RequestGuideToolEvent extends MessageHandler {
|
||||
boolean helperRequests = this.packet.readBoolean();
|
||||
boolean bullyReports = this.packet.readBoolean();
|
||||
|
||||
if (!this.client.getHabbo().hasPermission("acc_helper_use_guide_tool"))
|
||||
if (!this.client.getHabbo().hasPermission(Permission.ACC_HELPER_USE_GUIDE_TOOL))
|
||||
return;
|
||||
|
||||
if (helperRequests && !this.client.getHabbo().hasPermission("acc_helper_give_guide_tours"))
|
||||
if (helperRequests && !this.client.getHabbo().hasPermission(Permission.ACC_HELPER_GIVE_GUIDE_TOURS))
|
||||
helperRequests = false;
|
||||
|
||||
if (bullyReports && !this.client.getHabbo().hasPermission("acc_helper_judge_chat_reviews"))
|
||||
if (bullyReports && !this.client.getHabbo().hasPermission(Permission.ACC_HELPER_JUDGE_CHAT_REVIEWS))
|
||||
bullyReports = false;
|
||||
|
||||
if (helperRequests) {
|
||||
|
@ -4,6 +4,7 @@ import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.guilds.Guild;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildMember;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildRank;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
@ -20,7 +21,7 @@ public class GuildAcceptMembershipEvent extends MessageHandler {
|
||||
|
||||
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
|
||||
|
||||
if (guild == null || (guild.getOwnerId() != this.client.getHabbo().getHabboInfo().getId() && !Emulator.getGameEnvironment().getGuildManager().getOnlyAdmins(guild).containsKey(this.client.getHabbo().getHabboInfo().getId()) && !this.client.getHabbo().hasPermission("acc_guild_admin")))
|
||||
if (guild == null || (guild.getOwnerId() != this.client.getHabbo().getHabboInfo().getId() && !Emulator.getGameEnvironment().getGuildManager().getOnlyAdmins(guild).containsKey(this.client.getHabbo().getHabboInfo().getId()) && !this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)))
|
||||
return;
|
||||
|
||||
Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(userId);
|
||||
|
@ -2,6 +2,7 @@ package com.eu.habbo.messages.incoming.guilds;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.guilds.Guild;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.plugin.events.guilds.GuildChangedBadgeEvent;
|
||||
@ -13,7 +14,7 @@ public class GuildChangeBadgeEvent extends MessageHandler {
|
||||
|
||||
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
|
||||
if (guild != null) {
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission("acc_guild_admin")) {
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) {
|
||||
Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(guild.getRoomId());
|
||||
|
||||
if (room == null || room.getId() != guild.getRoomId())
|
||||
|
@ -2,6 +2,7 @@ package com.eu.habbo.messages.incoming.guilds;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.guilds.Guild;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.plugin.events.guilds.GuildChangedColorsEvent;
|
||||
@ -14,7 +15,7 @@ public class GuildChangeColorsEvent extends MessageHandler {
|
||||
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
|
||||
|
||||
if (guild != null) {
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission("acc_guild_admin")) {
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) {
|
||||
GuildChangedColorsEvent colorsEvent = new GuildChangedColorsEvent(guild, this.packet.readInt(), this.packet.readInt());
|
||||
Emulator.getPluginManager().fireEvent(colorsEvent);
|
||||
|
||||
|
@ -2,6 +2,7 @@ package com.eu.habbo.messages.incoming.guilds;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.guilds.Guild;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.plugin.events.guilds.GuildChangedNameEvent;
|
||||
@ -14,7 +15,7 @@ public class GuildChangeNameDescEvent extends MessageHandler {
|
||||
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
|
||||
|
||||
if (guild != null) {
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission("acc_guild_admin")) {
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) {
|
||||
GuildChangedNameEvent nameEvent = new GuildChangedNameEvent(guild, this.packet.readString(), this.packet.readString());
|
||||
Emulator.getPluginManager().fireEvent(nameEvent);
|
||||
|
||||
|
@ -3,6 +3,7 @@ package com.eu.habbo.messages.incoming.guilds;
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.guilds.Guild;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildState;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.plugin.events.guilds.GuildChangedSettingsEvent;
|
||||
@ -15,7 +16,7 @@ public class GuildChangeSettingsEvent extends MessageHandler {
|
||||
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
|
||||
|
||||
if (guild != null) {
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission("acc_guild_admin")) {
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) {
|
||||
Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(guild.getRoomId());
|
||||
|
||||
if (room == null)
|
||||
|
@ -4,6 +4,7 @@ import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.guilds.Guild;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildMember;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildRank;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.guilds.GuildConfirmRemoveMemberComposer;
|
||||
@ -18,7 +19,7 @@ public class GuildConfirmRemoveMemberEvent extends MessageHandler {
|
||||
|
||||
if (guild != null) {
|
||||
GuildMember member = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, this.client.getHabbo());
|
||||
if (userId == this.client.getHabbo().getHabboInfo().getId() || guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || (member != null && member.getRank().equals(GuildRank.OWNER)) || this.client.getHabbo().hasPermission("acc_guild_admin")) {
|
||||
if (userId == this.client.getHabbo().getHabboInfo().getId() || guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || (member != null && member.getRank().equals(GuildRank.OWNER)) || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) {
|
||||
Room room = Emulator.getGameEnvironment().getRoomManager().loadRoom(guild.getRoomId());
|
||||
int count = 0;
|
||||
if (room != null) {
|
||||
|
@ -4,6 +4,7 @@ import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.guilds.Guild;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildMember;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildRank;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
@ -22,7 +23,7 @@ public class GuildDeclineMembershipEvent extends MessageHandler {
|
||||
|
||||
if (guild != null) {
|
||||
GuildMember member = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, this.client.getHabbo());
|
||||
if (userId == this.client.getHabbo().getHabboInfo().getId() || guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || member.getRank().equals(GuildRank.OWNER) || this.client.getHabbo().hasPermission("acc_guild_admin")) {
|
||||
if (userId == this.client.getHabbo().getHabboInfo().getId() || guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || member.getRank().equals(GuildRank.OWNER) || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) {
|
||||
guild.decreaseRequestCount();
|
||||
Emulator.getGameEnvironment().getGuildManager().removeMember(guild, userId);
|
||||
this.client.sendResponse(new GuildMembersComposer(guild, Emulator.getGameEnvironment().getGuildManager().getGuildMembers(guild, 0, 0, ""), this.client.getHabbo(), 0, 0, "", true, Emulator.getGameEnvironment().getGuildManager().getGuildMembersCount(guild, 0, 0, "")));
|
||||
|
@ -2,6 +2,7 @@ package com.eu.habbo.messages.incoming.guilds;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.guilds.Guild;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.guilds.RemoveGuildFromRoomComposer;
|
||||
import com.eu.habbo.messages.outgoing.rooms.RoomDataComposer;
|
||||
@ -15,7 +16,7 @@ public class GuildDeleteEvent extends MessageHandler {
|
||||
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
|
||||
|
||||
if (guild != null) {
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission("acc_guild_admin")) //TODO Add staff permission override.
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) //TODO Add staff permission override.
|
||||
{
|
||||
Emulator.getGameEnvironment().getGuildManager().deleteGuild(guild);
|
||||
Emulator.getPluginManager().fireEvent(new GuildDeletedEvent(guild, this.client.getHabbo()));
|
||||
|
@ -3,6 +3,7 @@ package com.eu.habbo.messages.incoming.guilds;
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.guilds.Guild;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildMember;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
@ -18,7 +19,7 @@ public class GuildRemoveAdminEvent extends MessageHandler {
|
||||
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
|
||||
|
||||
if (guild != null) {
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission("acc_guild_admin")) {
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) {
|
||||
int userId = this.packet.readInt();
|
||||
|
||||
Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(guild.getRoomId());
|
||||
|
@ -4,6 +4,7 @@ import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.guilds.Guild;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildMember;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildRank;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
@ -22,7 +23,7 @@ public class GuildRemoveMemberEvent extends MessageHandler {
|
||||
|
||||
if (guild != null) {
|
||||
GuildMember member = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, this.client.getHabbo());
|
||||
if (userId == this.client.getHabbo().getHabboInfo().getId() || guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || member.getRank().equals(GuildRank.OWNER) || this.client.getHabbo().hasPermission("acc_guild_admin")) {
|
||||
if (userId == this.client.getHabbo().getHabboInfo().getId() || guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || member.getRank().equals(GuildRank.OWNER) || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) {
|
||||
Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(userId);
|
||||
GuildRemovedMemberEvent removedMemberEvent = new GuildRemovedMemberEvent(guild, userId, habbo);
|
||||
Emulator.getPluginManager().fireEvent(removedMemberEvent);
|
||||
|
@ -3,6 +3,7 @@ package com.eu.habbo.messages.incoming.guilds;
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.guilds.Guild;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildMember;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
@ -18,7 +19,7 @@ public class GuildSetAdminEvent extends MessageHandler {
|
||||
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
|
||||
|
||||
if (guild != null) {
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission("acc_guild_admin")) {
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) {
|
||||
Emulator.getGameEnvironment().getGuildManager().setAdmin(guild, userId);
|
||||
|
||||
Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(userId);
|
||||
|
@ -3,6 +3,7 @@ package com.eu.habbo.messages.incoming.guilds;
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.guilds.Guild;
|
||||
import com.eu.habbo.habbohotel.modtool.ScripterManager;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
@ -20,7 +21,7 @@ public class RequestGuildBuyEvent extends MessageHandler {
|
||||
|
||||
@Override
|
||||
public void handle() throws Exception {
|
||||
if (!this.client.getHabbo().hasPermission("acc_infinite_credits")) {
|
||||
if (!this.client.getHabbo().hasPermission(Permission.ACC_INFINITE_CREDITS)) {
|
||||
int guildPrice = Emulator.getConfig().getInt("catalog.guild.price");
|
||||
if (this.client.getHabbo().getHabboInfo().getCredits() >= guildPrice) {
|
||||
this.client.getHabbo().giveCredits(-guildPrice);
|
||||
|
@ -4,6 +4,7 @@ import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.guilds.Guild;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildMember;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildRank;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.guilds.GuildMembersComposer;
|
||||
|
||||
@ -18,7 +19,7 @@ public class RequestGuildMembersEvent extends MessageHandler {
|
||||
Guild g = Emulator.getGameEnvironment().getGuildManager().getGuild(groupId);
|
||||
|
||||
if (g != null) {
|
||||
boolean isAdmin = this.client.getHabbo().hasPermission("acc_guild_admin");
|
||||
boolean isAdmin = this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN);
|
||||
if (!isAdmin && this.client.getHabbo().getHabboStats().hasGuild(g.getId())) {
|
||||
GuildMember member = Emulator.getGameEnvironment().getGuildManager().getGuildMember(g, this.client.getHabbo());
|
||||
isAdmin = member != null && (member.getRank().equals(GuildRank.OWNER) || member.getRank().equals(GuildRank.ADMIN));
|
||||
|
@ -7,6 +7,7 @@ import com.eu.habbo.habbohotel.guilds.GuildRank;
|
||||
import com.eu.habbo.habbohotel.guilds.forums.ForumThread;
|
||||
import com.eu.habbo.habbohotel.guilds.forums.ForumThreadComment;
|
||||
import com.eu.habbo.habbohotel.guilds.forums.ForumThreadState;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||
@ -36,7 +37,7 @@ public class GuildForumModerateMessageEvent extends MessageHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean isStaff = this.client.getHabbo().hasPermission("acc_modtool_ticket_q");
|
||||
boolean isStaff = this.client.getHabbo().hasPermission(Permission.ACC_MODTOOL_TICKET_Q);
|
||||
|
||||
GuildMember member = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guildId, this.client.getHabbo().getHabboInfo().getId());
|
||||
if (member == null) {
|
||||
|
@ -6,6 +6,7 @@ import com.eu.habbo.habbohotel.guilds.GuildMember;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildRank;
|
||||
import com.eu.habbo.habbohotel.guilds.forums.ForumThread;
|
||||
import com.eu.habbo.habbohotel.guilds.forums.ForumThreadState;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||
@ -29,7 +30,7 @@ public class GuildForumModerateThreadEvent extends MessageHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean isStaff = this.client.getHabbo().hasPermission("acc_modtool_ticket_q");
|
||||
boolean isStaff = this.client.getHabbo().hasPermission(Permission.ACC_MODTOOL_TICKET_Q);
|
||||
|
||||
GuildMember member = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guildId, this.client.getHabbo().getHabboInfo().getId());
|
||||
if (member == null) {
|
||||
|
@ -6,6 +6,7 @@ import com.eu.habbo.habbohotel.guilds.GuildMember;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildRank;
|
||||
import com.eu.habbo.habbohotel.guilds.forums.ForumThread;
|
||||
import com.eu.habbo.habbohotel.guilds.forums.ForumThreadComment;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.guilds.forums.GuildForumAddCommentComposer;
|
||||
import com.eu.habbo.messages.outgoing.guilds.forums.GuildForumThreadMessagesComposer;
|
||||
@ -38,7 +39,7 @@ public class GuildForumPostThreadEvent extends MessageHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean isStaff = this.client.getHabbo().hasPermission("acc_modtool_ticket_q");
|
||||
boolean isStaff = this.client.getHabbo().hasPermission(Permission.ACC_MODTOOL_TICKET_Q);
|
||||
|
||||
GuildMember member = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guildId, this.client.getHabbo().getHabboInfo().getId());
|
||||
|
||||
|
@ -6,6 +6,7 @@ import com.eu.habbo.habbohotel.guilds.GuildMember;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildRank;
|
||||
import com.eu.habbo.habbohotel.guilds.SettingsState;
|
||||
import com.eu.habbo.habbohotel.guilds.forums.ForumThread;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||
@ -29,7 +30,7 @@ public class GuildForumThreadUpdateEvent extends MessageHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean isStaff = this.client.getHabbo().hasPermission("acc_modtool_ticket_q");
|
||||
boolean isStaff = this.client.getHabbo().hasPermission(Permission.ACC_MODTOOL_TICKET_Q);
|
||||
|
||||
GuildMember member = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guildId, this.client.getHabbo().getHabboInfo().getId());
|
||||
if (member == null) {
|
||||
|
@ -123,7 +123,7 @@ public class RequestNewNavigatorRoomsEvent extends MessageHandler {
|
||||
}
|
||||
}
|
||||
|
||||
SearchResultList list = new SearchResultList(0, "query", "", SearchAction.NONE, ListMode.LIST, DisplayMode.VISIBLE, new ArrayList<Room>(searchRooms.values()), true, this.client.getHabbo().hasPermission("acc_enter_anyroom") || this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER), DisplayOrder.ACTIVITY, -1);
|
||||
SearchResultList list = new SearchResultList(0, "query", "", SearchAction.NONE, ListMode.LIST, DisplayMode.VISIBLE, new ArrayList<Room>(searchRooms.values()), true, this.client.getHabbo().hasPermission(Permission.ACC_ENTERANYROOM) || this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER), DisplayOrder.ACTIVITY, -1);
|
||||
nList.add(list);
|
||||
return nList;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.eu.habbo.messages.incoming.rooms;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
@ -15,7 +16,7 @@ public class RoomBackgroundEvent extends MessageHandler {
|
||||
if (room == null)
|
||||
return;
|
||||
|
||||
if (room.hasRights(this.client.getHabbo()) || this.client.getHabbo().hasPermission("acc_placefurni")) {
|
||||
if (room.hasRights(this.client.getHabbo()) || this.client.getHabbo().hasPermission(Permission.ACC_PLACEFURNI)) {
|
||||
HabboItem item = room.getHabboItem(itemId);
|
||||
|
||||
if (item == null)
|
||||
|
@ -2,6 +2,7 @@ package com.eu.habbo.messages.incoming.rooms;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.achievements.AchievementManager;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
@ -16,7 +17,7 @@ public class RoomPlacePaintEvent extends MessageHandler {
|
||||
|
||||
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom();
|
||||
|
||||
if (room.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || room.hasRights(this.client.getHabbo()) || this.client.getHabbo().hasPermission("acc_placefurni")) {
|
||||
if (room.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || room.hasRights(this.client.getHabbo()) || this.client.getHabbo().hasPermission(Permission.ACC_PLACEFURNI)) {
|
||||
int itemId = this.packet.readInt();
|
||||
HabboItem item = this.client.getHabbo().getInventory().getItemsComponent().getHabboItem(itemId);
|
||||
|
||||
|
@ -3,6 +3,7 @@ package com.eu.habbo.messages.incoming.rooms;
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.achievements.AchievementManager;
|
||||
import com.eu.habbo.habbohotel.navigation.NavigatorPublicCategory;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
@ -11,7 +12,7 @@ import com.eu.habbo.messages.outgoing.rooms.RoomDataComposer;
|
||||
public class RoomStaffPickEvent extends MessageHandler {
|
||||
@Override
|
||||
public void handle() throws Exception {
|
||||
if (this.client.getHabbo().hasPermission("acc_staff_pick")) {
|
||||
if (this.client.getHabbo().hasPermission(Permission.ACC_STAFF_PICK)) {
|
||||
int roomId = this.packet.readInt();
|
||||
|
||||
Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(roomId);
|
||||
|
@ -80,7 +80,7 @@ public class BotSaveSettingsEvent extends MessageHandler {
|
||||
String result = Emulator.getGameEnvironment().getWordFilter().filter(s, null);
|
||||
|
||||
if (!result.isEmpty()) {
|
||||
if (!this.client.getHabbo().hasPermission("acc_chat_no_filter")) {
|
||||
if (!this.client.getHabbo().hasPermission(Permission.ACC_CHAT_NO_FILTER)) {
|
||||
result = Emulator.getGameEnvironment().getWordFilter().filter(result, this.client.getHabbo());
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.eu.habbo.messages.incoming.rooms.items;
|
||||
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.FurnitureMovementError;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||
@ -15,7 +16,7 @@ public class MoveWallItemEvent extends MessageHandler {
|
||||
if (room == null)
|
||||
return;
|
||||
|
||||
if (!room.hasRights(this.client.getHabbo()) && !this.client.getHabbo().hasPermission("acc_placefurni") && !(room.getGuildId() > 0 && room.guildRightLevel(this.client.getHabbo()) >= 2)) {
|
||||
if (!room.hasRights(this.client.getHabbo()) && !this.client.getHabbo().hasPermission(Permission.ACC_PLACEFURNI) && !(room.getGuildId() > 0 && room.guildRightLevel(this.client.getHabbo()) >= 2)) {
|
||||
this.client.sendResponse(new BubbleAlertComposer(BubbleAlertKeys.FURNITURE_PLACEMENT_ERROR.key, FurnitureMovementError.NO_RIGHTS.errorCode));
|
||||
return;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class PetPickupEvent extends MessageHandler {
|
||||
|
||||
if (pet != null) {
|
||||
if (this.client.getHabbo().getHabboInfo().getId() == pet.getId() || room.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER)) {
|
||||
if (this.client.getHabbo().getInventory().getPetsComponent().getPets().size() >= Emulator.getConfig().getInt("hotel.pets.max.inventory") && !this.client.getHabbo().hasPermission("acc_unlimited_pets")) {
|
||||
if (this.client.getHabbo().getInventory().getPetsComponent().getPets().size() >= Emulator.getConfig().getInt("hotel.pets.max.inventory") && !this.client.getHabbo().hasPermission(Permission.ACC_UNLIMITED_PETS)) {
|
||||
this.client.sendResponse(new RoomUserWhisperComposer(new RoomChatMessage(Emulator.getTexts().getValue("error.pets.max.inventory"), this.client.getHabbo(), this.client.getHabbo(), RoomChatMessageBubbles.ALERT)));
|
||||
return;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ public class PetPlaceEvent extends MessageHandler {
|
||||
if (room == null)
|
||||
return;
|
||||
|
||||
if (this.client.getHabbo().getHabboInfo().getId() != room.getOwnerId() && !room.isAllowPets() && !(this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER) || this.client.getHabbo().hasPermission("acc_placefurni"))) {
|
||||
if (this.client.getHabbo().getHabboInfo().getId() != room.getOwnerId() && !room.isAllowPets() && !(this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER) || this.client.getHabbo().hasPermission(Permission.ACC_PLACEFURNI))) {
|
||||
this.client.sendResponse(new PetErrorComposer(PetErrorComposer.ROOM_ERROR_PETS_FORBIDDEN_IN_FLAT));
|
||||
return;
|
||||
}
|
||||
@ -29,7 +29,7 @@ public class PetPlaceEvent extends MessageHandler {
|
||||
if (pet == null) {
|
||||
return;
|
||||
}
|
||||
if (room.getCurrentPets().size() >= Room.MAXIMUM_PETS && !this.client.getHabbo().hasPermission("acc_unlimited_pets")) {
|
||||
if (room.getCurrentPets().size() >= Room.MAXIMUM_PETS && !this.client.getHabbo().hasPermission(Permission.ACC_UNLIMITED_PETS)) {
|
||||
this.client.sendResponse(new PetErrorComposer(PetErrorComposer.ROOM_ERROR_MAX_PETS));
|
||||
return;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.eu.habbo.messages.incoming.rooms.promotions;
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.catalog.CatalogItem;
|
||||
import com.eu.habbo.habbohotel.catalog.CatalogPage;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseFailedComposer;
|
||||
@ -45,11 +46,11 @@ public class BuyRoomPromotionEvent extends MessageHandler {
|
||||
}
|
||||
|
||||
if (room.isPromoted()) {
|
||||
if (!this.client.getHabbo().hasPermission("acc_infinite_credits")) {
|
||||
if (!this.client.getHabbo().hasPermission(Permission.ACC_INFINITE_CREDITS)) {
|
||||
this.client.getHabbo().giveCredits(-item.getCredits());
|
||||
}
|
||||
|
||||
if (!this.client.getHabbo().hasPermission("acc_infinite_points")) {
|
||||
if (!this.client.getHabbo().hasPermission(Permission.ACC_INFINITE_POINTS)) {
|
||||
this.client.getHabbo().givePoints(item.getPointsType(), -item.getPoints());
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class RoomUserKickEvent extends MessageHandler {
|
||||
if (event.isCancelled())
|
||||
return;
|
||||
|
||||
if (room.hasRights(this.client.getHabbo()) || this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER) || this.client.getHabbo().hasPermission("acc_ambassador")) {
|
||||
if (room.hasRights(this.client.getHabbo()) || this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER) || this.client.getHabbo().hasPermission(Permission.ACC_AMBASSADOR)) {
|
||||
if (target.hasPermission(Permission.ACC_UNKICKABLE)) return;
|
||||
|
||||
room.kickHabbo(target, true);
|
||||
|
@ -2,6 +2,7 @@ package com.eu.habbo.messages.incoming.rooms.users;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.achievements.AchievementManager;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
@ -17,7 +18,7 @@ public class RoomUserMuteEvent extends MessageHandler {
|
||||
Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(roomId);
|
||||
|
||||
if (room != null) {
|
||||
if (room.hasRights(this.client.getHabbo()) || this.client.getHabbo().hasPermission("cmd_mute") || this.client.getHabbo().hasPermission("acc_ambassador")) {
|
||||
if (room.hasRights(this.client.getHabbo()) || this.client.getHabbo().hasPermission("cmd_mute") || this.client.getHabbo().hasPermission(Permission.ACC_AMBASSADOR)) {
|
||||
Habbo habbo = room.getHabbo(userId);
|
||||
|
||||
if (habbo != null) {
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.eu.habbo.messages.incoming.trading;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomTrade;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomUnitStatus;
|
||||
@ -20,7 +21,7 @@ public class TradeStartEvent extends MessageHandler {
|
||||
if (userId >= 0 && userId != this.client.getHabbo().getRoomUnit().getId()) {
|
||||
Habbo targetUser = room.getHabboByRoomUnitId(userId);
|
||||
|
||||
boolean tradeAnywhere = this.client.getHabbo().hasPermission("acc_trade_anywhere");
|
||||
boolean tradeAnywhere = this.client.getHabbo().hasPermission(Permission.ACC_TRADE_ANYWHERE);
|
||||
|
||||
if (!RoomTrade.TRADING_ENABLED && !tradeAnywhere) {
|
||||
this.client.sendResponse(new TradeStartFailComposer(TradeStartFailComposer.HOTEL_TRADING_NOT_ALLOWED));
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.eu.habbo.messages.incoming.users;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
|
||||
@ -9,7 +10,7 @@ public class ChangeChatBubbleEvent extends MessageHandler {
|
||||
public void handle() throws Exception {
|
||||
int chatBubble = this.packet.readInt();
|
||||
|
||||
if (!this.client.getHabbo().hasPermission("acc_anychatcolor")) {
|
||||
if (!this.client.getHabbo().hasPermission(Permission.ACC_ANYCHATCOLOR)) {
|
||||
for (String s : Emulator.getConfig().getValue("commands.cmd_chatcolor.banned_numbers").split(";")) {
|
||||
if (Integer.valueOf(s) == chatBubble) {
|
||||
return;
|
||||
|
@ -15,7 +15,7 @@ public class WiredConditionSaveDataEvent extends MessageHandler {
|
||||
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom();
|
||||
|
||||
if (room != null) {
|
||||
if (room.hasRights(this.client.getHabbo()) || room.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER) || this.client.getHabbo().hasPermission("acc_moverotate")) {
|
||||
if (room.hasRights(this.client.getHabbo()) || room.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER) || this.client.getHabbo().hasPermission(Permission.ACC_MOVEROTATE)) {
|
||||
InteractionWiredCondition condition = room.getRoomSpecialTypes().getCondition(itemId);
|
||||
|
||||
if (condition != null) {
|
||||
|
@ -15,7 +15,7 @@ public class WiredEffectSaveDataEvent extends MessageHandler {
|
||||
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom();
|
||||
|
||||
if (room != null) {
|
||||
if (room.hasRights(this.client.getHabbo()) || room.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER) || this.client.getHabbo().hasPermission("acc_moverotate")) {
|
||||
if (room.hasRights(this.client.getHabbo()) || room.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER) || this.client.getHabbo().hasPermission(Permission.ACC_MOVEROTATE)) {
|
||||
InteractionWiredEffect effect = room.getRoomSpecialTypes().getEffect(itemId);
|
||||
|
||||
if (effect != null) {
|
||||
|
@ -15,7 +15,7 @@ public class WiredTriggerSaveDataEvent extends MessageHandler {
|
||||
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom();
|
||||
|
||||
if (room != null) {
|
||||
if (room.hasRights(this.client.getHabbo()) || room.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER) || this.client.getHabbo().hasPermission("acc_moverotate")) {
|
||||
if (room.hasRights(this.client.getHabbo()) || room.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER) || this.client.getHabbo().hasPermission(Permission.ACC_MOVEROTATE)) {
|
||||
InteractionWiredTrigger trigger = room.getRoomSpecialTypes().getTrigger(itemId);
|
||||
|
||||
if (trigger != null) {
|
||||
|
@ -2,6 +2,7 @@ package com.eu.habbo.messages.outgoing.catalog;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.catalog.CatalogPage;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
@ -21,7 +22,7 @@ public class CatalogPagesListComposer extends MessageComposer {
|
||||
public CatalogPagesListComposer(Habbo habbo, String mode) {
|
||||
this.habbo = habbo;
|
||||
this.mode = mode;
|
||||
this.hasPermission = this.habbo.hasPermission("acc_catalog_ids");
|
||||
this.hasPermission = this.habbo.hasPermission(Permission.ACC_CATALOG_IDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,6 +5,7 @@ import com.eu.habbo.habbohotel.guilds.Guild;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildMember;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildMembershipStatus;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildRank;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
@ -27,7 +28,7 @@ public class GuildInfoComposer extends MessageComposer {
|
||||
|
||||
@Override
|
||||
protected ServerMessage composeInternal() {
|
||||
boolean adminPermissions = this.client.getHabbo().getHabboStats().hasGuild(this.guild.getId()) && this.client.getHabbo().hasPermission("acc_guild_admin");
|
||||
boolean adminPermissions = this.client.getHabbo().getHabboStats().hasGuild(this.guild.getId()) && this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN);
|
||||
this.response.init(Outgoing.GuildInfoComposer);
|
||||
this.response.appendInt(this.guild.getId());
|
||||
this.response.appendBoolean(true);
|
||||
|
@ -6,6 +6,7 @@ import com.eu.habbo.habbohotel.guilds.GuildMember;
|
||||
import com.eu.habbo.habbohotel.guilds.GuildRank;
|
||||
import com.eu.habbo.habbohotel.guilds.forums.ForumThread;
|
||||
import com.eu.habbo.habbohotel.guilds.forums.ForumThreadComment;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
@ -107,7 +108,7 @@ public class GuildForumDataComposer extends MessageComposer {
|
||||
|
||||
GuildMember member = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, habbo);
|
||||
boolean isAdmin = member != null && (member.getRank().type < GuildRank.MEMBER.type || guild.getOwnerId() == this.habbo.getHabboInfo().getId());
|
||||
boolean isStaff = this.habbo.hasPermission("acc_modtool_ticket_q");
|
||||
boolean isStaff = this.habbo.hasPermission(Permission.ACC_MODTOOL_TICKET_Q);
|
||||
|
||||
String errorRead = "";
|
||||
String errorPost = "";
|
||||
|
@ -4,6 +4,7 @@ import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.modtool.ModToolCategory;
|
||||
import com.eu.habbo.habbohotel.modtool.ModToolIssue;
|
||||
import com.eu.habbo.habbohotel.modtool.ModToolTicketState;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
@ -25,7 +26,7 @@ public class ModToolComposer extends MessageComposer implements TObjectProcedure
|
||||
protected ServerMessage composeInternal() {
|
||||
this.response.init(Outgoing.ModToolComposer);
|
||||
|
||||
if (this.habbo.hasPermission("acc_modtool_ticket_q")) {
|
||||
if (this.habbo.hasPermission(Permission.ACC_MODTOOL_TICKET_Q)) {
|
||||
THashSet<ModToolIssue> openTickets = new THashSet<>();
|
||||
|
||||
THashMap<Integer, ModToolIssue> tickets = Emulator.getGameEnvironment().getModToolManager().getTickets();
|
||||
@ -63,13 +64,13 @@ public class ModToolComposer extends MessageComposer implements TObjectProcedure
|
||||
|
||||
Emulator.getGameEnvironment().getModToolManager().getCategory().forEachValue(this);
|
||||
|
||||
this.response.appendBoolean(this.habbo.hasPermission("acc_modtool_ticket_q")); //ticketQueueueuhuehuehuehue
|
||||
this.response.appendBoolean(this.habbo.hasPermission("acc_modtool_user_logs")); //user chatlogs
|
||||
this.response.appendBoolean(this.habbo.hasPermission("acc_modtool_user_alert")); //can send caution
|
||||
this.response.appendBoolean(this.habbo.hasPermission("acc_modtool_user_kick")); //can send kick
|
||||
this.response.appendBoolean(this.habbo.hasPermission("acc_modtool_user_ban")); //can send ban
|
||||
this.response.appendBoolean(this.habbo.hasPermission("acc_modtool_room_info")); //room info ??Not sure
|
||||
this.response.appendBoolean(this.habbo.hasPermission("acc_modtool_room_logs")); //room chatlogs ??Not sure
|
||||
this.response.appendBoolean(this.habbo.hasPermission(Permission.ACC_MODTOOL_TICKET_Q)); //ticketQueueueuhuehuehuehue
|
||||
this.response.appendBoolean(this.habbo.hasPermission(Permission.ACC_MODTOOL_USER_LOGS)); //user chatlogs
|
||||
this.response.appendBoolean(this.habbo.hasPermission(Permission.ACC_MODTOOL_USER_ALERT)); //can send caution
|
||||
this.response.appendBoolean(this.habbo.hasPermission(Permission.ACC_MODTOOL_USER_KICK)); //can send kick
|
||||
this.response.appendBoolean(this.habbo.hasPermission(Permission.ACC_MODTOOL_USER_BAN)); //can send ban
|
||||
this.response.appendBoolean(this.habbo.hasPermission(Permission.ACC_MODTOOL_ROOM_INFO)); //room info ??Not sure
|
||||
this.response.appendBoolean(this.habbo.hasPermission(Permission.ACC_MODTOOL_ROOM_LOGS)); //room chatlogs ??Not sure
|
||||
|
||||
synchronized (Emulator.getGameEnvironment().getModToolManager().getPresets()) {
|
||||
this.response.appendInt(Emulator.getGameEnvironment().getModToolManager().getPresets().get("room").size());
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.eu.habbo.messages.outgoing.users;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
@ -20,7 +21,7 @@ public class UserPerksComposer extends MessageComposer {
|
||||
|
||||
this.response.appendString("USE_GUIDE_TOOL");
|
||||
this.response.appendString("requirement.unfulfilled.helper_level_4");
|
||||
this.response.appendBoolean(Emulator.getGameEnvironment().getPermissionsManager().hasPermission(this.habbo, "acc_helper_use_guide_tool"));
|
||||
this.response.appendBoolean(Emulator.getGameEnvironment().getPermissionsManager().hasPermission(this.habbo, Permission.ACC_HELPER_USE_GUIDE_TOOL));
|
||||
|
||||
this.response.appendString("GIVE_GUIDE_TOURS");
|
||||
this.response.appendString("");
|
||||
@ -48,7 +49,7 @@ public class UserPerksComposer extends MessageComposer {
|
||||
|
||||
this.response.appendString("HEIGHTMAP_EDITOR_BETA");
|
||||
this.response.appendString("requirement.unfulfilled.feature_disabled");
|
||||
this.response.appendBoolean(Emulator.getGameEnvironment().getPermissionsManager().hasPermission(this.habbo, "acc_floorplan_editor"));
|
||||
this.response.appendBoolean(Emulator.getGameEnvironment().getPermissionsManager().hasPermission(this.habbo, Permission.ACC_FLOORPLAN_EDITOR));
|
||||
|
||||
this.response.appendString("BUILDER_AT_WORK");
|
||||
this.response.appendString("");
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.eu.habbo.messages.outgoing.users;
|
||||
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
@ -20,7 +21,7 @@ public class UserPermissionsComposer extends MessageComposer {
|
||||
this.response.init(Outgoing.UserPermissionsComposer);
|
||||
this.response.appendInt(this.clubLevel);
|
||||
this.response.appendInt(this.habbo.getHabboInfo().getRank().getLevel());
|
||||
this.response.appendBoolean(this.habbo.hasPermission("acc_ambassador"));
|
||||
this.response.appendBoolean(this.habbo.hasPermission(Permission.ACC_AMBASSADOR));
|
||||
return this.response;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user