You've already forked Arcturus-Morningstar-Extended
mirror of
https://github.com/duckietm/Arcturus-Morningstar-Extended.git
synced 2026-06-19 15:06:19 +00:00
🆙 Added AvailableCommands
This commit is contained in:
@@ -17,6 +17,7 @@ import com.eu.habbo.habbohotel.users.subscriptions.SubscriptionHabboClub;
|
|||||||
import com.eu.habbo.messages.NoAuthMessage;
|
import com.eu.habbo.messages.NoAuthMessage;
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
|
import com.eu.habbo.messages.outgoing.commands.AvailableCommandsComposer;
|
||||||
import com.eu.habbo.messages.outgoing.gamecenter.GameCenterAccountInfoComposer;
|
import com.eu.habbo.messages.outgoing.gamecenter.GameCenterAccountInfoComposer;
|
||||||
import com.eu.habbo.messages.outgoing.gamecenter.GameCenterGameListComposer;
|
import com.eu.habbo.messages.outgoing.gamecenter.GameCenterGameListComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.GenericAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.GenericAlertComposer;
|
||||||
@@ -208,6 +209,11 @@ public class SecureLoginEvent extends MessageHandler {
|
|||||||
messages.add(new UserClothesComposer(this.client.getHabbo()).compose());
|
messages.add(new UserClothesComposer(this.client.getHabbo()).compose());
|
||||||
messages.add(new NewUserIdentityComposer(habbo).compose());
|
messages.add(new NewUserIdentityComposer(habbo).compose());
|
||||||
messages.add(new UserPermissionsComposer(this.client.getHabbo()).compose());
|
messages.add(new UserPermissionsComposer(this.client.getHabbo()).compose());
|
||||||
|
messages.add(new AvailableCommandsComposer(
|
||||||
|
Emulator.getGameEnvironment().getCommandHandler().getCommandsForRank(
|
||||||
|
this.client.getHabbo().getHabboInfo().getRank().getId()
|
||||||
|
)
|
||||||
|
).compose());
|
||||||
messages.add(new AvailabilityStatusMessageComposer(true, false, true).compose());
|
messages.add(new AvailabilityStatusMessageComposer(true, false, true).compose());
|
||||||
messages.add(new PingComposer().compose());
|
messages.add(new PingComposer().compose());
|
||||||
messages.add(new EnableNotificationsComposer(Emulator.getConfig().getBoolean("bubblealerts.enabled", true)).compose());
|
messages.add(new EnableNotificationsComposer(Emulator.getConfig().getBoolean("bubblealerts.enabled", true)).compose());
|
||||||
|
|||||||
@@ -559,5 +559,6 @@ public class Outgoing {
|
|||||||
public static final int UserPrefixesComposer = 7001;
|
public static final int UserPrefixesComposer = 7001;
|
||||||
public static final int PrefixReceivedComposer = 7002;
|
public static final int PrefixReceivedComposer = 7002;
|
||||||
public static final int ActivePrefixUpdatedComposer = 7003;
|
public static final int ActivePrefixUpdatedComposer = 7003;
|
||||||
|
public static final int AvailableCommandsComposer = 4050;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
package com.eu.habbo.messages.outgoing.commands;
|
||||||
|
|
||||||
|
import com.eu.habbo.Emulator;
|
||||||
|
import com.eu.habbo.habbohotel.commands.Command;
|
||||||
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
|
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||||
|
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class AvailableCommandsComposer extends MessageComposer {
|
||||||
|
private final List<Command> commands;
|
||||||
|
|
||||||
|
public AvailableCommandsComposer(List<Command> commands) {
|
||||||
|
this.commands = commands;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ServerMessage composeInternal() {
|
||||||
|
this.response.init(Outgoing.AvailableCommandsComposer);
|
||||||
|
this.response.appendInt(this.commands.size());
|
||||||
|
|
||||||
|
for (Command cmd : this.commands) {
|
||||||
|
this.response.appendString(cmd.keys[0]);
|
||||||
|
this.response.appendString(
|
||||||
|
Emulator.getTexts().getValue("commands.description." + cmd.permission, cmd.permission)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.response;
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Reference in New Issue
Block a user