OpenSource | Prefix Plugin - Adding MongoDB Support Today

Status
This thread has been locked.

NV6

the opensource person(?)
Premium
Feedback score
8
Posts
383
Reactions
223
Resources
1
Okay, so I have recently decided to make an opensource prefix plugin to prove how easy it is to make a flatfile prefix plugin.
It would be easy to transfer the project to a database, I have added some methods where you can add your database shit.


6q3jFYj
6369db190f86f7e79e202440b94ea379
KSvsICB

Link: https://github.com/NotNV6/Prefix-Plugin/tree/master

Don't be afraid to give criticism on my code, goodluck.

- You can't claim this project as your own.
- You can't use this in any public plugin without my permissions.
- You can't sell this without my permissions.

NOTE
You must agree with the TOS on my github repository before using this.
 
Last edited:
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Ambrosia

Premium
Feedback score
22
Posts
2,340
Reactions
1,384
Resources
0
You have just wrote some whole bunch of shit on me and said "I'm not toxic" LMAO.

I kinda started enjoying in making kids mad. Will be glad to see out other skid's projects as well!
Calls me a skid, calls me a kid, and commenting on a persons post is not allowed without being toxic? Ah, okay. Very nice logic. Enjoy flexing your salary and calling everyone a skid when you haven't seen a project of theirs.
 

Ambrosia

Premium
Feedback score
22
Posts
2,340
Reactions
1,384
Resources
0
Why and where did I target you with word "skid".

Read the reply if you are unable to understand, try again. Maybe couple more times and it will get in your head and you will understand it.
I've read it, thanks for suggesting though.
 

PTech

Feedback score
6
Posts
422
Reactions
261
Resources
0
Hello!(i got tagged here lelel).

I'd like to leave some suggestions on this plugin:
  • First, improve the plugin class's name - Prefix sounds like an object to me. Call it something like PrefixPlugin. That ought to make it a little clearer.
  • Instead of using the section symbol(§[it actually does seem you have not used it in some places, and used the suggested method i mentioned down the line of this comment: like the displayName string in the PrefixMenu class. A little inconsistent, I'd like you to fix that part]), it is a better alternative to use ChatColor's built-in translateAlternateColorCodes, it takes in a replacement character and a string, and colors it. It's more future-proof, and you can rely on it a little more.
  • the registerPrefix function in the main class confused me a bit due to the naming and the actual purpose of it. Call it something like, registerListeners, for example, and maybe separate the registering of commands on a separate functions, more so just to make the code look a little more readable.
  • There's a lot of static use on this project. Arguably a lot more than needed. Touch up on that, I can't really spoon feed you the answer right now, but some tips would include using dependency injection a little more often than the singleton pattern(this is just a fancy way of saying passing the instance of a class through a constructor), it isn't in any way, shape, or form, better, more performant, etc than the singleton pattern -- it's just a little more preferred for conforming to the idea of object oriented paradigm, and is more modular and flexible, if you want an easy way to do it, I'd recommend you search up on Guice.
  • The PrefixListener(the class name, again, a little confusing, thought this would be the one to do the chat part, but ChatListener does, touch up on that) has a function called "hasNullPointer", you can simply do && instead of the multiple if statements.
  • I'd also work on a more api-based gui system, it would save you heaps of time and you wouldn't produce DRY code like in the PrefixListener class for the GUIs.

That's all I can think of right now. Arguably I could have gone into more depth for some other things, but I think that you can get a good idea of what I mean by this.

Have a good time!
 

NV6

the opensource person(?)
Premium
Feedback score
8
Posts
383
Reactions
223
Resources
1
You see how your toxic little kid you are?

But if you really wanna start sure no problem.

1. https://github.com/NotNV6/Prefix-Plugin/blob/master/src/club/curahq/prefix/util/PrefixAPI.java#L23, == false? You serious?
2. Heard of java design patterns? Mind follow that too instead of passing instance object on each call.
3. https://github.com/NotNV6/Prefix-Plugin/blob/master/src/club/curahq/prefix/Prefix.java#L12, ChatColor#translateAlternateColorCodes
4. https://github.com/NotNV6/Prefix-Pl...ub/curahq/prefix/prefixes/PrefixMenu.java#L22, so much static abuse everywhere.
5. https://github.com/NotNV6/Prefix-Pl...curahq/prefix/commands/PrefixCommand.java#L18, already checking if sender is not a player, so no need to go on with else statements, it's only a Console and Player possibility of sender.[DOUBLEPOST=1544030990][/DOUBLEPOST]
I've just corrected as people claimed it to be an "awesome plugin".[DOUBLEPOST=1544031028][/DOUBLEPOST]
Amd if you are going to brag about iHCF, since you have no other excuses, pathetic.
and as I already said I made it to prove a point, that it's easy to make one.
My goal wasn't to make a quality plugin, as it's opensource.
Stop bragging about how "famous/good" your core is, it's just sad.

Anyways, trash another thread if you want to trash one.[DOUBLEPOST=1544033502][/DOUBLEPOST]
Hello!(i got tagged here lelel).

I'd like to leave some suggestions on this plugin:
  • First, improve the plugin class's name - Prefix sounds like an object to me. Call it something like PrefixPlugin. That ought to make it a little clearer.
  • Instead of using the section symbol(§[it actually does seem you have not used it in some places, and used the suggested method i mentioned down the line of this comment: like the displayName string in the PrefixMenu class. A little inconsistent, I'd like you to fix that part]), it is a better alternative to use ChatColor's built-in translateAlternateColorCodes, it takes in a replacement character and a string, and colors it. It's more future-proof, and you can rely on it a little more.
  • the registerPrefix function in the main class confused me a bit due to the naming and the actual purpose of it. Call it something like, registerListeners, for example, and maybe separate the registering of commands on a separate functions, more so just to make the code look a little more readable.
  • There's a lot of static use on this project. Arguably a lot more than needed. Touch up on that, I can't really spoon feed you the answer right now, but some tips would include using dependency injection a little more often than the singleton pattern(this is just a fancy way of saying passing the instance of a class through a constructor), it isn't in any way, shape, or form, better, more performant, etc than the singleton pattern -- it's just a little more preferred for conforming to the idea of object oriented paradigm, and is more modular and flexible, if you want an easy way to do it, I'd recommend you search up on Guice.
  • The PrefixListener(the class name, again, a little confusing, thought this would be the one to do the chat part, but ChatListener does, touch up on that) has a function called "hasNullPointer", you can simply do && instead of the multiple if statements.
  • I'd also work on a more api-based gui system, it would save you heaps of time and you wouldn't produce DRY code like in the PrefixListener class for the GUIs.

That's all I can think of right now. Arguably I could have gone into more depth for some other things, but I think that you can get a good idea of what I mean by this.

Have a good time!
1] Will do, thank you.
2] Alright, will do.
3] I called it registerPrefix just because I couldn't think of any other name, and I didn't want to make 2 separate methods for just 3 lines of code.
4] I will fix in a bit, thanks for the "suggestion".
5] Yeah, I also found it kinda confusing, but I didn't see the need to change it, but I'll change it in a bit.
6] I would of made that if it wasn't a plugin to "prove a point", but as it is I didn't see the point of making it.


Also, you didn't take into account having more than 54 prefixes on a GUI, which means you'd need to add some sort of page function which is fairly simple.

https://www.spigotmc.org/threads/gui-with-multiple-pages.322487/
https://www.spigotmc.org/threads/multipage-gui.210838/
https://www.spigotmc.org/threads/pages-in-a-gui.178164/

I forgot your "suggestion", will add it now.
 
Last edited:

PTech

Feedback score
6
Posts
422
Reactions
261
Resources
0
and as I already said I made it to prove a point, that it's easy to make one.
My goal wasn't to make a quality plugin, as it's opensource.
Stop bragging about how "famous/good" your core is, it's just sad.

Anyways, trash another thread if you want to trash one.[DOUBLEPOST=1544033502][/DOUBLEPOST]
1] Will do, thank you.
2] Alright, will do.
3] I called it registerPrefix just because I couldn't think of any other name, and I didn't want to make 2 separate methods for just 3 lines of code.
4] I will fix in a bit, thanks for the "suggestion".
5] Yeah, I also found it kinda confusing, but I didn't see the need to change it, but I'll change it in a bit.
6] I would of made that if it wasn't a plugin to "prove a point", but as it is I didn't see the point of making it.




I forgot your "suggestion", will add it now.
I don't think you're proving the right point that way, though, I assume you're perfectly capable of doing all the things I listed there, however because you didn't makes you seem like someone who started development rather recently, I think it's better to go all out, even on open source projects, to show what you can do, because after all - this will probably be shown on portfolios

also Notifyz gl on the new HCF core(from what i read in that blocked red part)[if it ain't sorry for getting it wrong lol], hope you'll start from scratch this time instead of using iHCF's base.
 

NV6

the opensource person(?)
Premium
Feedback score
8
Posts
383
Reactions
223
Resources
1
I don't think you're proving the right point that way, though, I assume you're perfectly capable of doing all the things I listed there, however because you didn't makes you seem like someone who started development rather recently, I think it's better to go all out, even on open source projects, to show what you can do, because after all - this will probably be shown on portfolios

also Notifyz gl on the new HCF core(from what i read in that blocked red part)[if it ain't sorry for getting it wrong lol], hope you'll start from scratch this time instead of using iHCF's base.
I don't know if I'm a "new" Developer, but I asusme I am, I started coding "medium/big" sized plugins since June.
 

PTech

Feedback score
6
Posts
422
Reactions
261
Resources
0
I don't know if I'm a "new" Developer, but I asusme I am, I started coding "medium/big" sized plugins since June.
Oh well, then I believe your heart's in the right place, and for someone who has started quite recently this looks pretty doable. Good job. If you ever need any help on these kinds of things, let me know and I might be able to help you out.
 

NV6

the opensource person(?)
Premium
Feedback score
8
Posts
383
Reactions
223
Resources
1
Oh well, then I believe your heart's in the right place, and for someone who has started quite recently this looks pretty doable. Good job. If you ever need any help on these kinds of things, let me know and I might be able to help you out.
Alright, thanks for the feedback (same for Ambrosia and for Notifyz - I guess)
 
Status
This thread has been locked.
Top