package org.stevewinfield.suja.idk.game.plugins;

import org.stevewinfield.suja.idk.Bootloader;
import org.stevewinfield.suja.idk.game.rooms.RoomInstance;
import org.stevewinfield.suja.idk.game.rooms.RoomPlayer;
import org.stevewinfield.suja.idk.network.sessions.Session;

public class PluginHelper {
    public static Object[] getActiveSessions() {
        return Bootloader.getSessionManager().getSessions().toArray();
    }

    public static Object[] getRoomPlayers(final RoomInstance room) {
        return room.getRoomPlayers().values().toArray();
	}
	
    public static Session[] getActiveSessions() {
        return Bootloader.getSessionManager().getSessions().toArray(new Session[Bootloader.getSessionManager().getSessions().size()]);
    }

    public static RoomPlayer[] getRoomPlayers(final RoomInstance room) {
        return room.getRoomPlayers().values().toArray(new RoomPlayer[room.getRoomPlayers().values().size()]);
    }

    public static Object[] getRoomItems(final RoomInstance room) {
        return room.getRoomItems().values().toArray();
    }
}

@@ -148,16 +148,71 @@
 stance;%0A
+import org.stevewinfield.suja.idk.game.rooms.RoomItem;%0A
 import o
@@ -256,24 +256,24 @@
 RoomPlayer;%0A
-
 import org.s
@@ -353,266 +353,8 @@
 r %7B%0A
-    public static Object%5B%5D getActiveSessions() %7B%0A        return Bootloader.getSessionManager().getSessions().toArray();%0A    %7D%0A%0A    public static Object%5B%5D getRoomPlayers(final RoomInstance room) %7B%0A        return room.getRoomPlayers().values().toArray();%0A%09%7D%0A%09%0A
     
@@ -753,14 +753,16 @@
 tic 
-Object
+RoomItem
 %5B%5D g
@@ -852,16 +852,65 @@
 toArray(
+new RoomItem%5Broom.getRoomItems().values().size()%5D
 );%0A    %7D

Fix PluginHelper