mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-31 12:22:36 +01:00
Merge branch 'invisible-no-chat' into 'dev'
Add configurable prevention of talking while invisible See merge request morningstar/Arcturus-Community!33
This commit is contained in:
commit
5aed82c72b
@ -8,4 +8,7 @@ ADD COLUMN `build_hash` varchar(64) NOT NULL AFTER `version`;
|
|||||||
|
|
||||||
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('scripter.modtool.tickets', '1');
|
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('scripter.modtool.tickets', '1');
|
||||||
|
|
||||||
|
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('invisible.prevent.chat', '0');
|
||||||
|
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('invisible.prevent.chat.error', 'While being invisible you cannot talk.');
|
||||||
|
|
||||||
#END DATABASE UPDATE: 2.0.0 RC-2 -> 2.0.0 RC-3
|
#END DATABASE UPDATE: 2.0.0 RC-2 -> 2.0.0 RC-3
|
@ -3711,6 +3711,14 @@ public class Room implements Comparable<Room>, ISerialize, Runnable
|
|||||||
if (!habbo.getHabboStats().allowTalk())
|
if (!habbo.getHabboStats().allowTalk())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (habbo.getRoomUnit().isInvisible() && Emulator.getConfig().getBoolean("invisible.prevent.chat", false)) {
|
||||||
|
if (!CommandHandler.handleCommand(habbo.getClient(), roomChatMessage.getUnfilteredMessage())) {
|
||||||
|
habbo.whisper(Emulator.getTexts().getValue("invisible.prevent.chat.error"));
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
habbo.getHabboStats().chatCounter += 2;
|
habbo.getHabboStats().chatCounter += 2;
|
||||||
|
|
||||||
if (habbo.getHabboInfo().getCurrentRoom() != this)
|
if (habbo.getHabboInfo().getCurrentRoom() != this)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user