Skip to content

Commit

Permalink
... move them again.
Browse files Browse the repository at this point in the history
  • Loading branch information
KonoTyran committed Jul 31, 2024
1 parent e68e56e commit 95ca27b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
5 changes: 3 additions & 2 deletions src/main/java/dev/koifysh/archipelago/Client.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dev.koifysh.archipelago;

import dev.koifysh.archipelago.events.RetrievedEvent;
import dev.koifysh.archipelago.flags.ItemsHandling;
import dev.koifysh.archipelago.network.server.ConnectUpdatePacket;
import dev.koifysh.archipelago.network.server.RoomInfoPacket;
import dev.koifysh.archipelago.parts.DataPackage;
Expand Down Expand Up @@ -448,15 +449,15 @@ public Set<String> getTags() {
}

/**
* fetch the itemflags that have been set, bitwise Or against {@link ItemsHandlingFlags} to read.
* fetch the itemflags that have been set, bitwise Or against {@link ItemsHandling} to read.
* @return items handling int.
*/
public int getItemsHandlingFlags() {
return itemsHandlingFlags;
}

/**
* fetch the itemflags that have been set, bitwise Or against {@link ItemsHandlingFlags} to read.
* fetch the itemflags that have been set, bitwise Or against {@link ItemsHandling} to read.
*/
public void setItemsHandlingFlags(int itemsHandlingFlags) {
this.itemsHandlingFlags = itemsHandlingFlags;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/dev/koifysh/archipelago/WebSocket.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import dev.koifysh.archipelago.Print.APPrintJsonType;
import dev.koifysh.archipelago.Print.APPrintPart;
import dev.koifysh.archipelago.Print.APPrintType;
import dev.koifysh.archipelago.flags.NetworkPlayer;
import dev.koifysh.archipelago.helper.DeathLink;
import dev.koifysh.archipelago.network.APPacket;
import dev.koifysh.archipelago.network.ConnectionResult;
Expand All @@ -17,7 +18,6 @@
import dev.koifysh.archipelago.network.client.SayPacket;
import dev.koifysh.archipelago.parts.DataPackage;
import dev.koifysh.archipelago.parts.NetworkItem;
import dev.koifysh.archipelago.parts.NetworkPlayer;
import dev.koifysh.archipelago.events.*;
import dev.koifysh.archipelago.network.server.*;

Expand Down Expand Up @@ -105,7 +105,7 @@ public void onMessage(String message) {

client.setTeam(connectedPacket.team);
client.setSlot(connectedPacket.slot);
connectedPacket.slotInfo.put(0, new NetworkSlot("Archipelago", "Archipelago", NetworkPlayerFlags.SPECTATOR));
connectedPacket.slotInfo.put(0, new NetworkSlot("Archipelago", "Archipelago", NetworkPlayer.SPECTATOR));
client.setSlotInfo(connectedPacket.slotInfo);

client.getRoomInfo().networkPlayers.addAll(connectedPacket.players);
Expand All @@ -115,7 +115,7 @@ public void onMessage(String message) {
teams = teamsOptional.getAsInt() + 1;
}
for (int i = 0; i < teams; i++) {
client.getRoomInfo().networkPlayers.add( new NetworkPlayer(i, 0, "Archipelago"));
client.getRoomInfo().networkPlayers.add( new dev.koifysh.archipelago.parts.NetworkPlayer(i, 0, "Archipelago"));
}

client.setAlias(client.getRoomInfo().getPlayer(connectedPacket.team, connectedPacket.slot).alias);
Expand Down Expand Up @@ -161,7 +161,7 @@ public void onMessage(String message) {

if (part.type == APPrintType.playerID) {
int playerID = Integer.parseInt(part.text);
NetworkPlayer player = client.getRoomInfo().getPlayer(client.getTeam(), playerID);
dev.koifysh.archipelago.parts.NetworkPlayer player = client.getRoomInfo().getPlayer(client.getTeam(), playerID);
part.text = player.alias;
}
else if (part.type == APPrintType.itemID) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package dev.koifysh.archipelago;
package dev.koifysh.archipelago.flags;

import dev.koifysh.archipelago.Client;

/**
* Item Flag variables to read {@link Client#getItemsHandlingFlags()} and set {@link Client#setItemsHandlingFlags(int)}
* <br>
* Current item flags: {@link #SEND_ITEMS} {@link #SEND_OWN_ITEMS} {@link #SEND_STARTING_INVENTORY}
*/
public class ItemsHandlingFlags {
public class ItemsHandling {

/**
* Tells the server to send you items from other worlds.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package dev.koifysh.archipelago;
package dev.koifysh.archipelago.flags;

/**
* Flags that will tell you more about the item that was sent.<br>
* {@link #ADVANCEMENT},
* {@link #USEFUL},
* {@link #TRAP}
*/
public class NetworkItemFlags {
public class NetworkItem {
/**
* If set, indicates the item can unlock logical advancement
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package dev.koifysh.archipelago;
package dev.koifysh.archipelago.flags;

/**
* Flags that will tell you more about the slot type.<br>
* {@link #SPECTATOR},
* {@link #PLAYER},
* {@link #GROUP}
*/
public class NetworkPlayerFlags {
public class NetworkPlayer {
/**
* If set, indicates the slot is a spectator
*/
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/dev/koifysh/archipelago/parts/NetworkItem.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package dev.koifysh.archipelago.parts;

import com.google.gson.annotations.SerializedName;
import dev.koifysh.archipelago.NetworkItemFlags;

public class NetworkItem {

Expand All @@ -15,7 +14,7 @@ public class NetworkItem {
public int playerID;

/**
* Bit flags that tell you information about the item. bitwise AND them with {@link NetworkItemFlags} to read.
* Bit flags that tell you information about the item. bitwise AND them with {@link dev.koifysh.archipelago.flags.NetworkItem} to read.
*/
@SerializedName("flags")
public int flags;
Expand Down

0 comments on commit 95ca27b

Please sign in to comment.