Need help with simple code (Plugin)

Status
This thread has been locked.

Ferrero

Manager
Banned
Feedback score
12
Posts
226
Reactions
110
Resources
0
Hey, been trying to learn how to make a plugin by purchasing a udemy tutorial. It's going pretty well so far but I keep running into this error.

This is my code: https://www.hastebin.com/epukuseyow.scala

This is the error(s) I'm getting on line 25 which is the public boolean line -

Multiple markers at this line
- Syntax error on token ")", { expected after this
token
- overrides
org.bukkit.plugin.java.JavaPlugin.onCommand

Here's an SS of my eclipse:

c54e106aa5ece3860edead10a20d31b5.png
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Sniper

Software Developer
Supreme
Feedback score
65
Posts
1,312
Reactions
695
Resources
0
Hey, been trying to learn how to make a plugin by purchasing a udemy tutorial. It's going pretty well so far but I keep running into this error.

This is my code: https://www.hastebin.com/epukuseyow.scala

This is the error(s) I'm getting on line 25 which is the public boolean line -

Multiple markers at this line
- Syntax error on token ")", { expected after this
token
- overrides
org.bukkit.plugin.java.JavaPlugin.onCommand

Here's an SS of my eclipse:

c54e106aa5ece3860edead10a20d31b5.png
what theme is tyhat
 

luaq

Supreme
Feedback score
7
Posts
141
Reactions
40
Resources
0
Also, implement CommandExecutor and add @Override so your code looks like this

Code:
public class Main extends JavaPlugin implements CommandExecutor {

public void onEnable(){
  System.out.println("Test Plugin Enabled");
}
public void onDisable(){
  System.out.println("Test Plugin Disabled");
}

@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
  return false;
}
 

Tig3ax

Feedback score
3
Posts
196
Reactions
41
Resources
0
Put a { after the oncommand.

public boolean onCommand(CommandSender sender, Command cmd, String Label, String [] args) {
 

Ferrero

Manager
Banned
Feedback score
12
Posts
226
Reactions
110
Resources
0
what theme is tyhat
window > preferences > general drop down > appearance > dark[DOUBLEPOST=1507320148][/DOUBLEPOST]
Put a { after the oncommand.

public boolean onCommand(CommandSender sender, Command cmd, String Label, String [] args) {
that fixed it! thanks
 
Banned forever. Reason: Creating Multiple Accounts (Servium, https://builtbybit.com/members/nitr0us.68132/)

Tig3ax

Feedback score
3
Posts
196
Reactions
41
Resources
0
tbh, my opion is dont buy any course. Just watch a yt series to get the basics and where that stops use google. Doing that for 2/3 months now and it works great. Because arnt getting spoonfeeded.
 

Sniper

Software Developer
Supreme
Feedback score
65
Posts
1,312
Reactions
695
Resources
0
window > preferences > general drop down > appearance > dark[DOUBLEPOST=1507320148][/DOUBLEPOST]
that fixed it! thanks
But it's orange.. Mine looks like this

upload_2017-10-6_13-19-47.png
 

Attachments

  • upload_2017-10-6_13-19-47.png
    upload_2017-10-6_13-19-47.png
    38.9 KB · Views: 55
Status
This thread has been locked.
Top