You've already forked Arcturus-Morningstar-Extended
mirror of
https://github.com/duckietm/Arcturus-Morningstar-Extended.git
synced 2026-06-20 15:36:17 +00:00
🆙 Pull request from simoleo89 Add UpdateItems RCON command
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
package com.eu.habbo.messages.rcon;
|
||||||
|
|
||||||
|
import com.eu.habbo.Emulator;
|
||||||
|
import com.eu.habbo.habbohotel.rooms.Room;
|
||||||
|
import com.eu.habbo.messages.outgoing.rooms.RoomRelativeMapComposer;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
|
public class UpdateItems extends RCONMessage<UpdateItems.JSONUpdateItems> {
|
||||||
|
|
||||||
|
public UpdateItems() {
|
||||||
|
super(JSONUpdateItems.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(Gson gson, JSONUpdateItems json) {
|
||||||
|
Emulator.getGameEnvironment().getItemManager().loadItems();
|
||||||
|
Emulator.getGameEnvironment().getItemManager().loadCrackable();
|
||||||
|
Emulator.getGameEnvironment().getItemManager().loadSoundTracks();
|
||||||
|
|
||||||
|
synchronized (Emulator.getGameEnvironment().getRoomManager().getActiveRooms()) {
|
||||||
|
for (Room room : Emulator.getGameEnvironment().getRoomManager().getActiveRooms()) {
|
||||||
|
if (room.isLoaded() && room.getUserCount() > 0 && room.getLayout() != null) {
|
||||||
|
room.sendComposer(new RoomRelativeMapComposer(room).compose());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static class JSONUpdateItems {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -64,6 +64,7 @@ public class RCONServer extends Server {
|
|||||||
this.addRCONMessage("giveuserclothing", GiveUserClothing.class);
|
this.addRCONMessage("giveuserclothing", GiveUserClothing.class);
|
||||||
this.addRCONMessage("modifysubscription", ModifyUserSubscription.class);
|
this.addRCONMessage("modifysubscription", ModifyUserSubscription.class);
|
||||||
this.addRCONMessage("changeusername", ChangeUsername.class);
|
this.addRCONMessage("changeusername", ChangeUsername.class);
|
||||||
|
this.addRCONMessage("updateitems", UpdateItems.class);
|
||||||
|
|
||||||
Collections.addAll(this.allowedAdresses, Emulator.getConfig().getValue("rcon.allowed", "127.0.0.1").split(";"));
|
Collections.addAll(this.allowedAdresses, Emulator.getConfig().getValue("rcon.allowed", "127.0.0.1").split(";"));
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user