From 3b480db9f6ec3ef71a5d8461d617e1999fd39fce Mon Sep 17 00:00:00 2001 From: Harmony Date: Tue, 14 May 2019 20:14:15 +0100 Subject: [PATCH] Make plugins window style configurable between default and the old scrollable style --- sqlupdates/2_0_0-RC-1_TO_2_0_0-RC-2.sql | 5 +++++ .../habbo/habbohotel/commands/PluginsCommand.java | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 sqlupdates/2_0_0-RC-1_TO_2_0_0-RC-2.sql diff --git a/sqlupdates/2_0_0-RC-1_TO_2_0_0-RC-2.sql b/sqlupdates/2_0_0-RC-1_TO_2_0_0-RC-2.sql new file mode 100644 index 00000000..568aeff0 --- /dev/null +++ b/sqlupdates/2_0_0-RC-1_TO_2_0_0-RC-2.sql @@ -0,0 +1,5 @@ +#DATABASE UPDATE: 2.0.0 RC-2 -> 2.0.0 RC-3 + +INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('commands.plugins.oldstyle', '0'); + +#END DATABASE UPDATE: 2.0.0 RC-2 -> 2.0.0 RC-3 \ No newline at end of file diff --git a/src/main/java/com/eu/habbo/habbohotel/commands/PluginsCommand.java b/src/main/java/com/eu/habbo/habbohotel/commands/PluginsCommand.java index 26977aa6..cb129f1f 100644 --- a/src/main/java/com/eu/habbo/habbohotel/commands/PluginsCommand.java +++ b/src/main/java/com/eu/habbo/habbohotel/commands/PluginsCommand.java @@ -2,9 +2,11 @@ package com.eu.habbo.habbohotel.commands; import com.eu.habbo.Emulator; import com.eu.habbo.habbohotel.gameclients.GameClient; -import com.eu.habbo.messages.outgoing.generic.alerts.GenericAlertComposer; +import com.eu.habbo.messages.outgoing.generic.alerts.MessagesForYouComposer; import com.eu.habbo.plugin.HabboPlugin; +import java.util.Collections; + public class PluginsCommand extends Command { public PluginsCommand() @@ -22,7 +24,14 @@ public class PluginsCommand extends Command message.append("\r").append(plugin.configuration.name).append(" By ").append(plugin.configuration.author); } - gameClient.getHabbo().alert(message.toString()); + + if (Emulator.getConfig().getBoolean("commands.plugins.oldstyle")) + { + gameClient.sendResponse(new MessagesForYouComposer(Collections.singletonList(message.toString()))); + } else + { + gameClient.getHabbo().alert(message.toString()); + } return true; }