Skip to content

Commit 8e96442

Browse files
Merge remote-tracking branch 'origin/master'
2 parents 229169b + 5f42b76 commit 8e96442

216 files changed

Lines changed: 556 additions & 814 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ A video of me going through the guide [can be found here](https://www.youtube.co
3535
1. Download 'SkyBlockProxy.jar' from the releases page [here](https://github.com/Swofty-Developments/HypixelSkyBlock/releases/tag/latest)
3636
2. Download the Velocity proxy from [here](https://api.papermc.io/v2/projects/velocity/versions/3.4.0-SNAPSHOT/builds/463/downloads/velocity-3.4.0-SNAPSHOT-463.jar)
3737
3. Download `velocity.toml` from [here](https://github.com/Swofty-Developments/HypixelSkyBlock/tree/master/configuration) and move it to where you want your Proxy server to run.
38-
4. Move your Velocity proxy JAR into that folder aswell, and run the proxy using `java -jar velocity-3.4.0-SNAPSHOT-463.jar` as a command in that directory.
38+
4. Move your Velocity proxy JAR into that folder as well, and run the proxy using `java -jar velocity-3.4.0-SNAPSHOT-463.jar` as a command in that directory.
3939
5. Close this proxy once it has generated the `plugins` folder, just by pressing `CTRL + C` or closing the CMD Prompt.
40-
6. Move the `SkyBlockProxy.jar` from earlier into the plugins folder.
40+
6. Move the `SkyBlockProxy.jar` from earlier into the plugins' folder.
4141
7. Make a new folder where your `velocity.toml` is and call it `configuration`
4242
8. Download `resources.json` from [here](https://github.com/Swofty-Developments/HypixelSkyBlock/tree/master/configuration)
4343
9. Move this file into the `configuration` folder you just made.
@@ -62,7 +62,7 @@ A video of me going through the guide [can be found here](https://www.youtube.co
6262
16. (OPTIONAL) If you wish to have Songs on your server, copy the `songs` folder from [here](https://github.com/Swofty-Developments/HypixelSkyBlock/tree/master/configuration), and put it inside your configuration folder.
6363

6464
### Service Setup Guide
65-
1. Due to the nature of SkyBlock, there may be a variety of services that need to be ran. Go to the releases page [here](https://github.com/Swofty-Developments/HypixelSkyBlock/releases/tag/latest) and download any .JAR files that start with `Service`.
65+
1. Due to the nature of SkyBlock, there may be a variety of services that need to be run. Go to the releases page [here](https://github.com/Swofty-Developments/HypixelSkyBlock/releases/tag/latest) and download any .JAR files that start with `Service`.
6666
2. Move these JAR files into the same directory as your Game Servers, they will share the configuration JSON with the services.
6767
3. Run them using `java -jar {Insert the JAR file}`.
6868

@@ -80,13 +80,13 @@ A video of me going through the guide [can be found here](https://www.youtube.co
8080
## 🐋 Running with Docker
8181
- Install the git repository using `git clone https://github.com/Swofty-Developments/HypixelSkyBlock.git
8282

83-
Most parts about downloading and setting up files will be automated for you but you will need to add the following files to the `configuration` folder:
83+
Most parts about downloading and setting up files will be automated for you, but you will need to add the following files to the `configuration` folder:
8484

85-
- Download the [world files for the Hub and Island worlds.](https://www.mediafire.com/file/5oko5y8h7uj6i9z/world.zip/file). Make sure they are named as **world.zip**
85+
- Download the [world files for the Hub and Island worlds](https://www.mediafire.com/file/5oko5y8h7uj6i9z/world.zip/file). Make sure they are named as **world.zip**
8686

8787
- In your configuration file Remove the default `resources.json` and rename `resources.json.docker` to `resources.json`
8888

89-
## Running the contaniners!
89+
## Running the containers!
9090

9191
- (Recommended) Install Docker Desktop from [here](https://www.docker.com/products/docker-desktop).
9292
- Open Docker Desktop/Docker and ensure that it is running.
@@ -102,7 +102,7 @@ docker-compose up --build
102102
```bash
103103
docker-compose up --build -d
104104
```
105-
> Note: If you have already runned the server before with `docker-compose up --build` you can just run `docker-compose up` to start the server without rebuilding the images making it faster.
105+
> Note: If you have already run the server before with `docker-compose up --build` you can just run `docker-compose up` to start the server without rebuilding the images making it faster.
106106
107107
- To stop the containers, you can use:
108108

@@ -138,7 +138,7 @@ and then run the service command inside there. It will create its own screen ses
138138
## Common Issues
139139
1. `redis.clients.jedis.exceptions.JedisConnectionException: Failed to connect to any host resolved for DNS name.`
140140

141-
=> Your Memurai isn't running.
141+
=> Your Memurai isn't running. If this can not be fixed, try out [this](https://github.com/tporadowski/redis/releases) instead.
142142
2. `Preview features are not enabled for... Try running with '--enable-preview'`
143143

144144
=> try `java --enable-preview -jar SkyBlockCore.jar {ServerType}`

anticheat/src/main/java/net/swofty/anticheat/engine/MovementEvents.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@ public void onPacketReceive(AnticheatPacketEvent event) {
1515
Pos pos = player.getCurrentTick().getPos();
1616
boolean onGround = player.getCurrentTick().isOnGround();
1717

18-
if (packet instanceof PositionPacket) {
19-
PositionPacket positionPacket = (PositionPacket) packet;
20-
pos = new Pos(positionPacket.getX(),
21-
positionPacket.getY(), positionPacket.getZ(),
22-
pos.yaw(), pos.pitch());
23-
onGround = positionPacket.isOnGround();
24-
} else if (packet instanceof PositionAndRotationPacket) {
25-
PositionAndRotationPacket positionAndRotationPacket = (PositionAndRotationPacket) packet;
26-
pos = positionAndRotationPacket.getPos();
27-
onGround = positionAndRotationPacket.isOnGround();
28-
} else if (packet instanceof IsOnGroundPacket) {
29-
IsOnGroundPacket isOnGroundPacket = (IsOnGroundPacket) packet;
30-
onGround = isOnGroundPacket.isOnGround();
31-
} else if (packet instanceof RotationPacket) {
32-
RotationPacket rotationPacket = (RotationPacket) packet;
33-
pos = new Pos(pos.x(), pos.y(), pos.z(), rotationPacket.getYaw(), rotationPacket.getPitch());
18+
switch (packet) {
19+
case PositionPacket positionPacket -> {
20+
pos = new Pos(positionPacket.getX(),
21+
positionPacket.getY(), positionPacket.getZ(),
22+
pos.yaw(), pos.pitch());
23+
onGround = positionPacket.isOnGround();
24+
}
25+
case PositionAndRotationPacket positionAndRotationPacket -> {
26+
pos = positionAndRotationPacket.getPos();
27+
onGround = positionAndRotationPacket.isOnGround();
28+
}
29+
case IsOnGroundPacket isOnGroundPacket -> onGround = isOnGroundPacket.isOnGround();
30+
case RotationPacket rotationPacket ->
31+
pos = new Pos(pos.x(), pos.y(), pos.z(), rotationPacket.getYaw(), rotationPacket.getPitch());
32+
default -> {
33+
}
3434
}
3535

3636
player.processMovement(pos, onGround);

anticheat/src/main/java/net/swofty/anticheat/engine/PingEvents.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ public class PingEvents extends AntiCheatListener {
1010
@ListenerMethod
1111
public void onPacketReceive(AnticheatPacketEvent event) {
1212
SwoftyPacket packet = event.getPacket();
13-
if (packet instanceof PingResponsePacket) {
14-
PingResponsePacket pingResponsePacket = (PingResponsePacket) packet;
13+
if (packet instanceof PingResponsePacket pingResponsePacket) {
1514
SwoftyPlayer player = pingResponsePacket.getPlayer();
1615
if (player != null) player.handlePingResponse(pingResponsePacket.getRequestId());
1716
}

anticheat/src/main/java/net/swofty/anticheat/math/Vel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ public double dot(@NotNull Vel Vel) {
358358
}
359359

360360
/**
361-
* Rotates the Veltor around a given arbitrary axis in 3 dimensional space.
361+
* Rotates the Veltor around a given arbitrary axis in 3-dimensional space.
362362
*
363363
* <p>
364364
* Rotation will follow the general Right-Hand-Rule, which means rotation
@@ -382,7 +382,7 @@ public double dot(@NotNull Vel Vel) {
382382
}
383383

384384
/**
385-
* Rotates the Veltor around a given arbitrary axis in 3 dimensional space.
385+
* Rotates the Veltor around a given arbitrary axis in 3-dimensional space.
386386
*
387387
* <p>
388388
* Rotation will follow the general Right-Hand-Rule, which means rotation

commons/src/main/java/net/swofty/commons/ChatColor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public enum ChatColor {
3030
RESET('r', 21);
3131

3232
public static final char COLOR_CHAR = '§';
33-
private static final Pattern STRIP_COLOR_PATTERN = Pattern.compile("(?i)" + String.valueOf('§') + "[0-9A-FK-OR]");
33+
private static final Pattern STRIP_COLOR_PATTERN = Pattern.compile("(?i)" + '§' + "[0-9A-FK-OR]");
3434
private final int intCode;
3535
private final char code;
3636
private final boolean isFormat;

commons/src/main/java/net/swofty/commons/PlayerShopData.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,25 +74,25 @@ public int pushBuyback(UnderstandableSkyBlockItem item, int amount) {
7474
public Tuple<UnderstandableSkyBlockItem, Integer> popBuyback() {
7575
if (buybackData.isEmpty())
7676
throw new IndexOutOfBoundsException("Woah there!");
77-
Tuple<UnderstandableSkyBlockItem, Integer> last = buybackData.get(buybackData.size() - 1);
78-
buybackData.remove(buybackData.size() - 1);
77+
Tuple<UnderstandableSkyBlockItem, Integer> last = buybackData.getLast();
78+
buybackData.removeLast();
7979
return last;
8080
}
8181

8282
public Tuple<UnderstandableSkyBlockItem, Integer> lastBuyback() {
8383
if (buybackData.isEmpty())
8484
throw new IndexOutOfBoundsException("Woah there!");
85-
return buybackData.get(buybackData.size() - 1);
85+
return buybackData.getLast();
8686
}
8787

8888
public Tuple<UnderstandableSkyBlockItem, Integer> firstBuyback() {
8989
if (buybackData.isEmpty())
9090
throw new IndexOutOfBoundsException("Woah there!");
91-
return buybackData.get(0);
91+
return buybackData.getFirst();
9292
}
9393

9494
public boolean hasAnythingToBuyback() {
95-
return buybackData.size() > 0;
95+
return !buybackData.isEmpty();
9696
}
9797

9898
public Map<String, Object> serialize() {

commons/src/main/java/net/swofty/commons/TrackedItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void addOrUpdateAttachedPlayer(UUID playerUUID, UUID profileUUID) {
4747
if (attachedPlayers.isEmpty()) {
4848
attachedPlayers.add(new PlayerOwnershipLog(playerUUID, profileUUID, System.currentTimeMillis(), System.currentTimeMillis()));
4949
} else {
50-
PlayerOwnershipLog lastLog = attachedPlayers.get(attachedPlayers.size() - 1);
50+
PlayerOwnershipLog lastLog = attachedPlayers.getLast();
5151
if (lastLog.playerUUID.equals(playerUUID) && lastLog.playerProfileUUID.equals(profileUUID)) {
5252
lastLog = new PlayerOwnershipLog(lastLog.playerUUID, lastLog.playerProfileUUID, lastLog.firstSeen, System.currentTimeMillis());
5353
attachedPlayers.set(attachedPlayers.size() - 1, lastLog);

commons/src/main/java/net/swofty/commons/auctions/AuctionItem.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import net.swofty.commons.item.UnderstandableSkyBlockItem;
66
import net.swofty.commons.protocol.serializers.UnderstandableSkyBlockItemSerializer;
77
import org.bson.Document;
8+
import org.jetbrains.annotations.NotNull;
89

910
import java.util.ArrayList;
1011
import java.util.List;
@@ -62,7 +63,7 @@ public static AuctionItem fromDocument(Document document) {
6263
}
6364

6465
public record Bid(Long timestamp, UUID uuid, Long value) {
65-
public String toString() {
66+
public @NotNull String toString() {
6667
return timestamp + "," + uuid + "," + value;
6768
}
6869

commons/src/main/java/net/swofty/commons/item/ItemType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ public enum ItemType {
876876
COAL_BLOCK(Material.COAL_BLOCK, Rarity.COMMON),
877877
LAPIS_LAZULI_BLOCK(Material.LAPIS_BLOCK, Rarity.COMMON),
878878
BROWN_MUSHROOM_BLOCK(Material.BROWN_MUSHROOM_BLOCK, Rarity.COMMON),
879-
RED_MUSHROOM_BLOCK(Material.BROWN_MUSHROOM_BLOCK, Rarity.COMMON),
879+
RED_MUSHROOM_BLOCK(Material.RED_MUSHROOM_BLOCK, Rarity.COMMON),
880880
BLAZE_POWDER(Material.BLAZE_POWDER, Rarity.COMMON),
881881
GOLDEN_CARROT(Material.GOLDEN_CARROT, Rarity.COMMON),
882882
GOLD_NUGGET(Material.GOLD_NUGGET, Rarity.COMMON),

commons/src/main/java/net/swofty/commons/item/attribute/attributes/ItemAttributeHotPotatoBookData.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import java.util.HashMap;
1717
import java.util.Map;
18-
import java.util.stream.IntStream;
1918

2019
public class ItemAttributeHotPotatoBookData extends ItemAttribute<ItemAttributeHotPotatoBookData.HotPotatoBookData> {
2120

0 commit comments

Comments
 (0)