What's wrong with my Code?

Status
This thread has been locked.

Stylez

Server Owner & World Painter
Premium
Feedback score
3
Posts
725
Reactions
240
Resources
0
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

ImDaFatBoss

Developer
Premium
Feedback score
0
Posts
55
Reactions
62
Resources
0
1. You need to be using the correct paperspigot build in your IDE.
2. You forgot the "@Override" annotation above the public boolean onCommand
3. Make sure you have the command registered in your plugin.yml, or else it won't work.
4. Also a quick tip, it looks better if you actually adjusted the spacing/tabbing. Because reading this code is strange to me, using correct spacing will make it clear to read.

If you have any more questions, or if none of the fixes above work, PM me :)
 

Shattered

old-timer
Supreme
Feedback score
5
Posts
3,486
Reactions
2,059
Resources
0
Why did you add permissions to your /forums and /apply o_O
They sound like default commands that everyone should have access to...
 

Skionz

ogminecraft.com
Premium
Feedback score
1
Posts
1,544
Reactions
1,527
Resources
0
Basically I've been trying to learn to code from my good friend Vapey and well my code doesn't seem to work on my PaperSpigot 1.7.10 Server. The plugin doesn't even load! Help me developers!
Heres the code:
https://gyazo.com/1f44404740842bcd3134173beb0d8d69
You aren't overriding 'onCommand.' You are creating a new method called 'OnCommand.' They are not the same.
$20 its his plugin.yml
Message 'skionzmc' on Skype. I accept Paypal and BTC.
 

Skionz

ogminecraft.com
Premium
Feedback score
1
Posts
1,544
Reactions
1,527
Resources
0
Ok, sending
BTC* My bad
Basically I've been trying to learn to code from my good friend Vapey and well my code doesn't seem to work on my PaperSpigot 1.7.10 Server. The plugin doesn't even load! Help me developers!
Heres the code:
https://gyazo.com/1f44404740842bcd3134173beb0d8d69
Moral of the story here is that your 'good friend' is not teaching you to code. He is setting you up for failure. Start with Java. Understand why you should never have a method named "OnCommand." Understand what I mean when I say 'method.' There is a difference between blindly copying code from memory and understanding what that code means.
 

Vapey

mcteams.com
Premium
Feedback score
7
Posts
495
Reactions
234
Resources
0
! means does not. Him missing a ! won't do anything.
I didn't see he put the message for the permission at the bottom, sorry[DOUBLEPOST=1457560334][/DOUBLEPOST]
isnt it running the clear chat even if you don't have the permission? there's no else, so it doesn't matter if you have the perm. or not.
No, he put if(!sender.hasPermission("")) {
Then he put the message for no permission then did
}
And he wrote the message of what the command does if they have permission here
 

Luke

lol
Premium
Feedback score
1
Posts
444
Reactions
193
Resources
0
I didn't see he put the message for the permission at the bottom, sorry[DOUBLEPOST=1457560334][/DOUBLEPOST]
No, he put if(!sender.hasPermission("")) {
Then he put the message for no permission then did
}
And he wrote the message of what the command does if they have permission here

it doesnt say if(sender.haspermission) ?
 
Status
This thread has been locked.
Top