Hot Summer Deals are Here!
Celebrate with up to 99% off on 17,600 resources
02
Days
05
Hours
50
Mins
26
Secs

Help With My Bukkit Code!

Status
This thread has been locked.

VeraFox

Feedback score
1
Posts
75
Reactions
7
Resources
0
Hello I'm VeraFox,

I'm somewhat new to coding but I am having trouble with an error I don't know how to fix. I will show the error.

c5514018cf0752975589be3d313f732a.png

https://gyazo.com/c5514018cf0752975589be3d313f732a

https://gyazo.com/a8c61e990fe04699d611598ea9da4e80

Logs
https://gyazo.com/33feccae0619bd853b6b8185bc3ab866

if you could fix this code it would be must appreciated. I just need help getting started. Thanks To All Who Will Help!
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

TheRedstoneGeek

Feedback score
2
Posts
76
Reactions
32
Resources
0
Make line 17 this
public static CommandSender cs;

EDIT:
That is not how commands work though and will break eventually since cs is null meaning when you are using cs it will return a Null Pointer Exception

If you want to make it send to console use this :
System.out.println("message");
 
Last edited:

VeraFox

Feedback score
1
Posts
75
Reactions
7
Resources
0
ok thank you[DOUBLEPOST=1520702727][/DOUBLEPOST]
Make line 17 this
public static CommandSender cs;

EDIT:
That is not how commands work though and will break eventually since cs is null meaning when you are using cs it will return a Null Pointer Exception

If you want to make it send to console use this :
System.out.println("message");
how would i fix this error https://gyazo.com/bd27522cd9e54cc604370d90ebc79754
 
Last edited:

TheRedstoneGeek

Feedback score
2
Posts
76
Reactions
32
Resources
0
It's the exact same, change that line 16 to:

public static ReportFile rf;

EDIT:

Again that will return a Null Pointer Exception because you dont define what rf is.
 

VeraFox

Feedback score
1
Posts
75
Reactions
7
Resources
0
It's the exact same, change that line 16 to:

public static ReportFile rf;

EDIT:

Again that will return a Null Pointer Exception because you dont define what rf is.
When I go ingame the commands do nothing. They just dont do anything I can share the whole code with you so you can look but idk what is wrong
 
Last edited:

TheRedstoneGeek

Feedback score
2
Posts
76
Reactions
32
Resources
0
From what I can see, there is no place you are creating a command. To do that do this:
public Boolean onCommand(CommandSender sender, Command cmd, String label, String args[]) {
if (cmd.getName().equalsIgnoreCase(“Command”)) {
//Do something
}
}
 
Status
This thread has been locked.
Top