Skip to content

Commit

Permalink
Abstract Packet System (#1839)
Browse files Browse the repository at this point in the history
* update translations manually to reset crowdin

* Update typo in worldguard compatibility.

* Remove outdated platform spec.

* Initialize PacketHandler interface.

* Implemented PacketHandler API for 1.21.
- This adds a PacketHandler and PacketFactory class.
- This also adds two new events for when the handler is loaded and initialized which are cancellable.
- Everything is implemented except for the chunk load/unload listener.

* Finish Adding new Packet System.

* Update poms that were modified in merge.

* Update poms that were modified in merge.

* Update TNEConversion
  • Loading branch information
creatorfromhell authored Jan 27, 2025
1 parent 4f93811 commit 58d8e46
Show file tree
Hide file tree
Showing 117 changed files with 1,746 additions and 2,288 deletions.
34 changes: 34 additions & 0 deletions .changelog/6.2.0.9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 6.2.0.9

## Major Changes

### Introduction of the Revamped Packet System
1. **About**:
- A modular and scalable system for managing packets related to virtual display items in Minecraft.
- Supports both ProtocolLib and PacketEvents libraries for greater flexibility.

2. **Custom Packet Factories**:
- Modular implementation of `PacketFactory` for game versions 1.20.x and 1.21.x.
- Packet types:
- **Spawn Packet**: Spawns a virtual item entity at a specific location.
- **Metadata Packet**: Updates the visual properties of virtual items.
- **Velocity Packet**: Adds motion/velocity to entities (currently optional).
- **Destroy Packet**: Removes the entity from the client view.

4. **Error Handling and Logging**:
- Enhanced debug logs to trace packet-related issues.
- Detailed error messages for missing factories or unregistered listeners.

#### Improvements:
- Better modular design to facilitate support for future Minecraft versions.

#### Deprecations:
- Legacy packet handling mechanisms replaced with this new Packet System.

## Minor Changes

## Fixes
- readded the /qs history permissions to the default quickshop.player

## Version Changes
- Removed support for 1.18 and 1.19. These versions had minimal usage.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ run/
.run
/${rootDir}/
.${rootDir}/
.paper-nms/
/.paper-nms/
2 changes: 1 addition & 1 deletion addon/bluemap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.addon</groupId>
Expand Down
2 changes: 1 addition & 1 deletion addon/discordsrv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.addon</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import com.ghostchu.quickshop.addon.discordsrv.bean.NotificationFeature;
import com.ghostchu.quickshop.addon.discordsrv.database.DiscordDatabaseHelper;
import com.ghostchu.quickshop.addon.discordsrv.wrapper.JDAWrapper;
import com.ghostchu.quickshop.api.event.modification.ShopDeleteEvent;
import com.ghostchu.quickshop.api.event.details.ShopOwnershipTransferEvent;
import com.ghostchu.quickshop.api.event.details.ShopPlayerGroupSetEvent;
import com.ghostchu.quickshop.api.event.details.ShopPriceChangeEvent;
import com.ghostchu.quickshop.api.event.economy.ShopSuccessPurchaseEvent;
import com.ghostchu.quickshop.api.event.modification.ShopDeleteEvent;
import com.ghostchu.quickshop.api.obj.QUser;
import com.ghostchu.quickshop.api.shop.Shop;
import com.ghostchu.quickshop.obj.QUserImpl;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.ghostchu.quickshop.addon.discordsrv.message;

import com.ghostchu.quickshop.QuickShop;
import com.ghostchu.quickshop.api.event.modification.ShopCreateEvent;
import com.ghostchu.quickshop.api.event.modification.ShopDeleteEvent;
import com.ghostchu.quickshop.api.event.details.ShopOwnershipTransferEvent;
import com.ghostchu.quickshop.api.event.details.ShopPlayerGroupSetEvent;
import com.ghostchu.quickshop.api.event.details.ShopPriceChangeEvent;
import com.ghostchu.quickshop.api.event.economy.ShopSuccessPurchaseEvent;
import com.ghostchu.quickshop.api.event.modification.ShopCreateEvent;
import com.ghostchu.quickshop.api.event.modification.ShopDeleteEvent;
import com.ghostchu.quickshop.api.obj.QUser;
import com.ghostchu.quickshop.api.shop.Shop;
import com.ghostchu.quickshop.common.util.CommonUtil;
Expand Down
8 changes: 1 addition & 7 deletions addon/discount/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.addon</groupId>
Expand Down Expand Up @@ -65,11 +65,5 @@
<version>${depend.commons.lang3}</version>
<scope>provided</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>net.kyori</groupId>-->
<!-- <artifactId>adventure-text-serializer-plain</artifactId>-->
<!-- <version>4.12.0</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import com.ghostchu.quickshop.QuickShop;
import com.ghostchu.quickshop.addon.discount.DiscountCode;
import com.ghostchu.quickshop.addon.discount.Main;
import com.ghostchu.quickshop.api.event.general.ShopInfoPanelEvent;
import com.ghostchu.quickshop.api.event.economy.ShopPurchaseEvent;
import com.ghostchu.quickshop.api.event.general.ShopInfoPanelEvent;
import com.ghostchu.quickshop.api.obj.QUser;
import com.ghostchu.quickshop.api.shop.Shop;
import com.ghostchu.quickshop.util.Util;
Expand Down
8 changes: 1 addition & 7 deletions addon/displaycontrol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.addon</groupId>
Expand Down Expand Up @@ -64,11 +64,5 @@
<version>${depend.commons.lang3}</version>
<scope>provided</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>net.kyori</groupId>-->
<!-- <artifactId>adventure-text-serializer-plain</artifactId>-->
<!-- <version>4.12.0</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->
</dependencies>
</project>
2 changes: 1 addition & 1 deletion addon/dynmap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.addon</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

import com.ghostchu.quickshop.QuickShop;
import com.ghostchu.quickshop.api.event.QSConfigurationReloadEvent;
import com.ghostchu.quickshop.api.event.modification.ShopCreateSuccessEvent;
import com.ghostchu.quickshop.api.event.modification.ShopDeleteEvent;
import com.ghostchu.quickshop.api.event.details.ShopItemChangeEvent;
import com.ghostchu.quickshop.api.event.details.ShopNamingEvent;
import com.ghostchu.quickshop.api.event.details.ShopOwnershipTransferEvent;
import com.ghostchu.quickshop.api.event.details.ShopPriceChangeEvent;
import com.ghostchu.quickshop.api.event.economy.ShopSuccessPurchaseEvent;
import com.ghostchu.quickshop.api.event.details.ShopTypeChangeEvent;
import com.ghostchu.quickshop.api.event.economy.ShopSuccessPurchaseEvent;
import com.ghostchu.quickshop.api.event.modification.ShopCreateSuccessEvent;
import com.ghostchu.quickshop.api.event.modification.ShopDeleteEvent;
import com.ghostchu.quickshop.api.localization.text.TextManager;
import com.ghostchu.quickshop.api.shop.Shop;
import com.ghostchu.quickshop.api.shop.ShopType;
Expand Down
8 changes: 1 addition & 7 deletions addon/limited/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.addon</groupId>
Expand Down Expand Up @@ -65,11 +65,5 @@
<version>${depend.commons.lang3}</version>
<scope>provided</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>net.kyori</groupId>-->
<!-- <artifactId>adventure-text-serializer-plain</artifactId>-->
<!-- <version>4.12.0</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import com.ghostchu.quickshop.addon.limited.command.SubCommand_Limit;
import com.ghostchu.quickshop.api.command.CommandContainer;
import com.ghostchu.quickshop.api.event.CalendarEvent;
import com.ghostchu.quickshop.api.event.modification.ShopClickEvent;
import com.ghostchu.quickshop.api.event.economy.ShopPurchaseEvent;
import com.ghostchu.quickshop.api.event.economy.ShopSuccessPurchaseEvent;
import com.ghostchu.quickshop.api.event.modification.ShopClickEvent;
import com.ghostchu.quickshop.api.localization.text.Text;
import com.ghostchu.quickshop.api.shop.Shop;
import com.ghostchu.quickshop.util.Util;
Expand Down Expand Up @@ -133,7 +133,7 @@ public void scheduleEvent(final CalendarEvent event) {
shop.setExtra(this, manager);
Log.debug("Limit data has been reset. Shop -> " + shop);
}
} catch(IllegalArgumentException ignored) {
} catch(final IllegalArgumentException ignored) {
Log.debug("Limit data failed to reset. Shop -> " + shop + " type " + manager.getString("period") + " not exists.");
manager.set("period", null);
shop.setExtra(this, manager);
Expand Down
2 changes: 1 addition & 1 deletion addon/list/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.addon</groupId>
Expand Down
2 changes: 1 addition & 1 deletion addon/plan/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.addon</groupId>
Expand Down
2 changes: 1 addition & 1 deletion addon/reremake-migrator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.addon</groupId>
Expand Down
2 changes: 1 addition & 1 deletion addon/shopitemonly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.addon</groupId>
Expand Down
6 changes: 5 additions & 1 deletion compatibility/advancedregionmarket/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.compatibility</groupId>
Expand All @@ -34,6 +34,10 @@
</build>

<repositories>
<repository>
<id>jitpack</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>alex9849</id>
<url>https://nexus.alex9849.net/repository/maven-releases/</url>
Expand Down
2 changes: 1 addition & 1 deletion compatibility/angelchest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.compatibility</groupId>
Expand Down
2 changes: 1 addition & 1 deletion compatibility/bentobox/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.compatibility</groupId>
Expand Down
2 changes: 1 addition & 1 deletion compatibility/bungeecord-geyser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.compatibility</groupId>
Expand Down
2 changes: 1 addition & 1 deletion compatibility/bungeecord/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.compatibility</groupId>
Expand Down
2 changes: 1 addition & 1 deletion compatibility/chestprotect/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.compatibility</groupId>
Expand Down
2 changes: 1 addition & 1 deletion compatibility/clearlag/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.compatibility</groupId>
Expand Down
2 changes: 1 addition & 1 deletion compatibility/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.compatibility</groupId>
Expand Down
2 changes: 1 addition & 1 deletion compatibility/ecoenchants/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.compatibility</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.ghostchu.quickshop.compatibility.ecoenchants;

import com.ghostchu.quickshop.QuickShop;
import com.ghostchu.quickshop.api.event.display.ItemPreviewComponentPrePopulateEvent;
import com.ghostchu.quickshop.api.event.QSConfigurationReloadEvent;
import com.ghostchu.quickshop.api.event.display.ItemPreviewComponentPrePopulateEvent;
import com.ghostchu.quickshop.compatibility.CompatibilityModule;
import com.ghostchu.quickshop.util.logger.Log;
import com.willfp.eco.core.display.DisplayProperties;
Expand Down
10 changes: 9 additions & 1 deletion compatibility/elitemobs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.compatibility</groupId>
Expand Down Expand Up @@ -35,6 +35,14 @@
</build>

<repositories>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
<id>sonatype-snapshot</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
<repository>
<id>magmaguy-repo-releases</id>
<name>MagmaGuy's Repository</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.ghostchu.quickshop.compatibility.elitemobs;

import com.ghostchu.quickshop.QuickShop;
import com.ghostchu.quickshop.api.event.modification.ShopCreateEvent;
import com.ghostchu.quickshop.api.event.details.ShopItemChangeEvent;
import com.ghostchu.quickshop.api.event.economy.ShopPurchaseEvent;
import com.ghostchu.quickshop.api.event.modification.ShopCreateEvent;
import com.ghostchu.quickshop.api.obj.QUser;
import com.ghostchu.quickshop.compatibility.CompatibilityModule;
import com.magmaguy.elitemobs.api.utils.EliteItemManager;
Expand Down
2 changes: 1 addition & 1 deletion compatibility/griefprevention/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.ghostchu</groupId>
<artifactId>quickshop-hikari</artifactId>
<version>6.2.0.8</version>
<version>6.2.0.9-SNAPSHOT-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>com.ghostchu.quickshop.compatibility</groupId>
Expand Down
Loading

0 comments on commit 58d8e46

Please sign in to comment.