Fixed emulator texts value, made it return so that it didn't pick up the bot if the limit was reached.

This commit is contained in:
harmonic 2020-06-05 16:35:08 +01:00
parent c49d9248ce
commit d8bcb50e9b
2 changed files with 3 additions and 4 deletions

View File

@ -174,8 +174,9 @@ public class BotManager {
return;
if (bot.getOwnerId() == habbo.getHabboInfo().getId() || habbo.hasPermission(Permission.ACC_ANYROOMOWNER)) {
if (!habbo.hasPermission(Permission.ACC_UNLIMITED_BOTS) && habbo.getInventory().getBotsComponent().getBots().size() >= MAXIMUM_BOT_INVENTORY_SIZE) {
habbo.alert(Emulator.getTexts().getValue("hotel.bot.max.amount.message").replace("%amount%", MAXIMUM_BOT_INVENTORY_SIZE + ""));
if (!habbo.hasPermission(Permission.ACC_UNLIMITED_BOTS) && habbo.getInventory().getBotsComponent().getBots().size() >= BotManager.MAXIMUM_BOT_INVENTORY_SIZE) {
habbo.alert(Emulator.getTexts().getValue("error.bots.max.inventory").replace("%amount%", BotManager.MAXIMUM_BOT_INVENTORY_SIZE + ""));
return;
}
bot.onPickUp(habbo, habbo.getHabboInfo().getCurrentRoom());

View File

@ -40,12 +40,10 @@ public class Permission {
public static String ACC_MODTOOL_ROOM_INFO = "acc_modtool_room_info";
public static String ACC_MODTOOL_ROOM_LOGS = "acc_modtool_room_logs";
public static String ACC_TRADE_ANYWHERE = "acc_trade_anywhere";
public static String ACC_UPDATE_NOTIFICATIONS = "acc_update_notifications";
public static String ACC_HELPER_USE_GUIDE_TOOL = "acc_helper_use_guide_tool";
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_CAMERA = "acc_camera";
public final String key;
public final PermissionSetting setting;
public Permission(String key, PermissionSetting setting) {