Search in sources :

Example 1 with EditData

use of com.mraof.minestuck.editmode.EditData in project Minestuck by mraof.

the class GristHelper method notifyServer.

private static void notifyServer(PlayerIdentifier player, String type, Integer difference, String action) {
    SburbConnection sc = SkaianetHandler.getClientConnection(player);
    if (sc == null)
        return;
    EditData ed = ServerEditHandler.getData(sc);
    if (ed == null)
        return;
    notify(IdentifierHandler.encode(ed.getEditor()), type, difference, action);
}
Also used : EditData(com.mraof.minestuck.editmode.EditData) SburbConnection(com.mraof.minestuck.network.skaianet.SburbConnection)

Example 2 with EditData

use of com.mraof.minestuck.editmode.EditData in project Minestuck by mraof.

the class SkaianetHandler method resetGivenItems.

public static void resetGivenItems() {
    for (SburbConnection c : connections) {
        for (int i = 0; i < c.givenItemList.length; i++) c.givenItemList[i] = false;
        c.unregisteredItems = new NBTTagList();
        EditData data = ServerEditHandler.getData(c);
        if (data != null) {
            MinestuckPacket packet = MinestuckPacket.makePacket(Type.SERVER_EDIT, c.givenItemList);
            MinestuckChannelHandler.sendToPlayer(packet, data.getEditor());
        }
    }
}
Also used : NBTTagList(net.minecraft.nbt.NBTTagList) EditData(com.mraof.minestuck.editmode.EditData) MinestuckPacket(com.mraof.minestuck.network.MinestuckPacket)

Aggregations

EditData (com.mraof.minestuck.editmode.EditData)2 MinestuckPacket (com.mraof.minestuck.network.MinestuckPacket)1 SburbConnection (com.mraof.minestuck.network.skaianet.SburbConnection)1 NBTTagList (net.minecraft.nbt.NBTTagList)1