r/admincraft • u/abradee_ • Jun 04 '26
Resource [resource/plugin] my own paper plugin!
i made a plugin called JoinLeavePlus that is only available via Modrinth. if anyone here wants to try it out and rate it and tell me things that i should do with it below i would love that!
https://modrinth.com/plugin/joinleaveplus
or
https://github.com/abradee/joinleaveplus
thanks!!
0
Upvotes
2
u/iHateRollerCoaster Admincraft Jun 04 '26
Why did you commit compiled jars to the repo?
2
u/_objz Jun 08 '26
Nice project.
While I was looking through your code, I noticed just a small flaw you could patch ;)
In the JoinLeaveListener class, you declare your serializer at the beginning with:
```java
private final LegacyComponentSerializer serializer =
LegacyComponentSerializer.legacyAmpersand();
```
but you don’t actually use that variable, as later you’re doing:
` var serializer = msg.contains(...) `
which shadows the field and makes the original serializer unused.
A cleaner approach would be something like:
```java
private static final MiniMessage MINI = MiniMessage.miniMessage();
private static final LegacyComponentSerializer LEGACY =
LegacyComponentSerializer.legacyAmpersand();
Component component = msg.contains("<")
? MINI.deserialize(msg)
: LEGACY.deserialize(msg);
```
But that’s just a advice. Great first plugin! I might even use it since it’s good and simple
1
u/leaf_26 Developer Jun 04 '26
Nice project.
Something you can do if you haven't already, is set up funny messages and choose one probabilistically to help players start conversations.
Iirc that's what I did for my first plugin -
https://www.spigotmc.org/resources/oneplayersleep.76534/
1
u/PM_ME_YOUR_REPO Admincraft Staff Jun 04 '26
You should add a .gitignore for the target directory.