Rothes / ProtocolStringReplacer

A Spigot plugin that allows you to edit the String in packet sends to players.
GNU General Public License v3.0
42 stars 10 forks source link

Not relocating all of apache lang3 #12

Closed olijeffers0n closed 2 years ago

olijeffers0n commented 2 years ago

Is your feature request related to a problem? Please describe. I'm always frustrated when i see excessively large jar files

Describe the solution you'd like Please stop relocating all of lang3

Apache commons is shaded in spigot and all the methods you use are in apache commons, so just use them

Rothes commented 2 years ago

Thank you for the notification but I just find out that not all versions of Spigot or its forks have integrated lang3, but lang is integrated. I don't want to switch to it for better efficiency yet. However, minimizeJar is enabled. Edit: Maybe switch to lang is OK after my thought.

olijeffers0n commented 2 years ago

i mean i was talking about Apache Commons - but that may also work. If nothing else you are using very few methods that can be implemented in a util class

Rothes commented 2 years ago

Yeah I'll deal with the issue when I'm free. Possibly this weekend.

Rothes commented 2 years ago

https://github.com/Rothes/ProtocolStringReplacer/commit/e1d30b26d4b6c927b3bc5c17316241cd17a71685 https://github.com/Rothes/ProtocolStringReplacer/commit/d8a5ed67407c493b96ee955be6cff749e5599436 These 2 commits deeply reduced jar file size(295,403 bytes).

olijeffers0n commented 2 years ago

Yes, i think we just need to look at the other two relocations - would it not be better to just shade them so that you can minimise the jar more

Rothes commented 2 years ago

I don't think relocations could affect minimizing - And without it PSR may conflict with other plugins. It seems that the other two dependencies have also been minimized. If you have a better idea, I accept PRs. 😊

olijeffers0n commented 2 years ago

Will look at it if i have time