Merge branch 'main' of https://github.com/duckietm/Arcturus-Morningstar-Extended
This commit is contained in:
commit
2b5c57b1bc
@ -291,6 +291,10 @@ public class RoomManager {
|
||||
public Room loadRoom(int id, boolean loadData) {
|
||||
Room room = null;
|
||||
|
||||
if(id == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (this.activeRooms.containsKey(id)) {
|
||||
room = this.activeRooms.get(id);
|
||||
|
||||
@ -411,7 +415,7 @@ public class RoomManager {
|
||||
|
||||
public RoomLayout loadLayout(String name, Room room) {
|
||||
RoomLayout layout = null;
|
||||
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT * FROM room_models WHERE name LIKE ? LIMIT 1")) {
|
||||
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT * FROM room_models WHERE name = ? LIMIT 1")) {
|
||||
statement.setString(1, name);
|
||||
try (ResultSet set = statement.executeQuery()) {
|
||||
if (set.next()) {
|
||||
|
@ -232,7 +232,7 @@ public class WiredHandler {
|
||||
executed = true;
|
||||
if (!effect.requiresTriggeringUser() || (roomUnit != null && effect.requiresTriggeringUser())) {
|
||||
Emulator.getThreading().run(() -> {
|
||||
if (room.isLoaded()) {
|
||||
if (room.isLoaded() && room.getHabbos().size() > 0) {
|
||||
try {
|
||||
if (!effect.execute(roomUnit, room, stuff)) return;
|
||||
effect.setCooldown(millis);
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user