Free - Essentials plugin

Status
This thread has been locked.

Jolt

Feedback score
0
Posts
31
Reactions
15
Resources
0
Hey MC-Market;

I'm Jolt, I have recently started Java & Bukkit API, I've coded my first plugin 'Essentials' this has a decent amount of features that can be used for Factions etc.. Thanks to FU22Y & Nerm for helping me, They helped me with a few things such as 'for loops'.

Download » https://www.mediafire.com/folder/0bx4wx6xguine/JoltEssentials

Thanks, please leave me feedback about this.

Big thanks to FU22Y & Nerm again!

Kind regards,
Jolt.
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

FU22Y

scottish developer.
Supreme
Feedback score
32
Posts
935
Reactions
349
Resources
0
Vouch, Teaching him a bit and helping with a bit, He's becoming better :)
 

Harry

Rustacean
Management
Feedback score
10
Posts
1,606
Reactions
876
Resources
0
Even for someone such as myself that only started coding in java a few weeks ago, this code seems very messy/inefficient.

You use multiple if statements inside of each other instead of using else if{}.

You've also defined multiple command executors instead of using alliasis in the plugin.yml

Also, to toggle the fly, try check if they have fly enabled and if so, disable it instead of using lists.
 
Last edited:

FU22Y

scottish developer.
Supreme
Feedback score
32
Posts
935
Reactions
349
Resources
0
Even for someone such as myself that only started coding in java a few weeks ago, this code seems very messy/inefficient.

You use multiple if statements inside of each other instead of using else if{}.

You've also defined multiple command executors instead of using alliasis in the plugin.yml

Also, to toggle the fly, try check if they have fly enabled and if so, disable it instead of using lists.

He's new, He started yesterday & I don't want to help him with everything, Also for a beginner it is not Inefficient.
 

Harry

Rustacean
Management
Feedback score
10
Posts
1,606
Reactions
876
Resources
0
He's new, He started yesterday & I don't want to help him with everything, Also for a beginner it is not Inefficient.
I know and that's why I'm trying to help and give feedback so he can improve it.

My comment wasn't meant to sound disrespectful, it was just meant to help him.
 

FU22Y

scottish developer.
Supreme
Feedback score
32
Posts
935
Reactions
349
Resources
0
Even for someone such as myself that only started coding in java a few weeks ago, this code seems very messy/inefficient.

You use multiple if statements inside of each other instead of using else if{}.

You've also defined multiple command executors instead of using alliasis in the plugin.yml

Also, to toggle the fly, try check if they have fly enabled and if so, disable it instead of using lists.

'Inefficient' he started yesterday, Also 'You've also defined multiple command executors instead of using alliasis in the plugin.yml'

He clearly is using Aliases
 

Harry

Rustacean
Management
Feedback score
10
Posts
1,606
Reactions
876
Resources
0
'Inefficient' he started yesterday, Also 'You've also defined multiple command executors instead of using alliasis in the plugin.yml'

He clearly is using aliases
This is clearly not using aliases.
Code:
getCommand("cc").setExecutor(new ClearChatCommand());
getCommand("clearchat").setExecutor(new ClearChatCommand())

getCommand("ci").setExecutor(new CiCommand());
getCommand("clear").setExecutor(new CiCommand());
 

FU22Y

scottish developer.
Supreme
Feedback score
32
Posts
935
Reactions
349
Resources
0
This is clearly not using aliases.
Code:
getCommand("cc").setExecutor(new ClearChatCommand());
getCommand("clearchat").setExecutor(new ClearChatCommand())

getCommand("ci").setExecutor(new CiCommand());
getCommand("clear").setExecutor(new CiCommand());

Read what you said again lmao..
 

Jolt

Feedback score
0
Posts
31
Reactions
15
Resources
0
This is clearly not using aliases.
Code:
getCommand("cc").setExecutor(new ClearChatCommand());
getCommand("clearchat").setExecutor(new ClearChatCommand())

getCommand("ci").setExecutor(new CiCommand());
getCommand("clear").setExecutor(new CiCommand());
Code:
name: Essentials
main: me.jolt.ess.Main
version: 1.0
author: Jolt
commands:
gmc:
aliases: [gm1]
ci:
aliases: [clear]
gms:
aliases: [gm0]
clearchat:
aliases: [cc]
heal:
feed:
help:
fly:
 

Harry

Rustacean
Management
Feedback score
10
Posts
1,606
Reactions
876
Resources
0
Code:
name: Essentials
main: me.jolt.ess.Main
version: 1.0
author: Jolt
commands:
gmc:
aliases: [gm1]
ci:
aliases: [clear]
gms:
aliases: [gm0]
clearchat:
aliases: [cc]
heal:
feed:
help:
fly:
There you go. If that is your current config, you don't need to define two CommandExecutors.

Just use:
Code:
getCommand("ci").setExecutor(new CiCommand());

getCommand("clearchat").setExecutor(new ClearChatCommand());
 
Last edited:

FU22Y

scottish developer.
Supreme
Feedback score
32
Posts
935
Reactions
349
Resources
0
There you go. If that is your current config, you don't need to define two CommandExecutors.

Just use:
Code:
getCommand("ci").setExecutor(new CiCommand());

getCommand("clearchat").setExecutor(new ClearChatCommand());

aw, i thought you ment something else ahaha.
 

Jolt

Feedback score
0
Posts
31
Reactions
15
Resources
0
There you go. If that is your current config, you don't need to define two CommandExecutors.

Just use:
Code:
getCommand("ci").setExecutor(new CiCommand());

getCommand("clearchat").setExecutor(new ClearChatCommand());
It doesn't really make a difference for a small plugin like that to be honest.[DOUBLEPOST=1509805423][/DOUBLEPOST]Thanks for the feedback,

I'm very new to all of this. So I am not going to use all of these methods.
 
Last edited:

Conflicted

drip or drown
Premium
Feedback score
12
Posts
273
Reactions
142
Resources
0
Like Harry said, you don't need to register the aliases as an executor, but i guess to make it 'official' you can do make a list of strings, add the alias that you want to the list and set the aliases doing plugin.getCommand("maincommand").setAliases(aliases);
this isn't needed but i guess it makes it 'official'
 

Harry

Rustacean
Management
Feedback score
10
Posts
1,606
Reactions
876
Resources
0
It doesn't really make a difference for a small plugin like that to be honest.[DOUBLEPOST=1509805423][/DOUBLEPOST]Thanks for the feedback,

I'm very new to all of this. So I am not going to use all of these methods.
I know but I would get into the habit of not defining twice since it's considered 'dead code' and has not effect if it's there or not. Just wanted to point it out because it makes the plugin larger in size and a tiny bit less efficient (especially if you go onto creating larger plugins).

Anyway, good luck with future plugins. :)
 
Last edited:
Status
This thread has been locked.
Top