1

Need help coding!

YourMCGeek 1/4/14 8:54 am
459
1/4/2014 11:30 am
Hi,

I don't know if this is the right place to post but I need help coding a plugin. I know this is the mod section but there is no plugin section. My code is below because you are not allowed to post .jars or .exe
package io.github.YourMCGeek;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.permissions.Permissible;
import org.bukkit.plugin.java.JavaPlugin;

public final class Powerballers extends JavaPlugin {

@Override
public void onEnable(){
Bukkit.getServer().getLogger().info((ChatColor.GREEN + "Staff helper has been Enabled and is ready to help! :D"));
getLogger().info("onEnable has been invoked!");
for (Player player : this.getServer().getOnlinePlayers()) {
Object playerList;
((Object) playerList).put(player, playerData(player));
}
}


private Object playerData(Player player) {
// TODO Auto-generated method stub
return null;
}

public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
if(cmd.getName().equalsIgnoreCase("anyone")){sender.sendMessage(ChatColor.WHITE + "Does anyone need any help? If so just ask!");
return true;
} //If this has happened the function will return true.
// If this hasn't happened the a value of false will be returned.
return false;


if(player.hasPermission("some.pointless.permission")) {
//Do something
}else{
//Do something else
}



}






@Override
public void onDisable() {
Bukkit.getServer().getLogger().info((ChatColor.RED + "Staff helper has now been Disabled and will not be able to preform any commands D: !"));
getLogger().info("onDisable has been invoked!");
}











}
If you can help me I will add you to the plugin. If you have a server I can use to test please tell me
Posted by
YourMCGeek
Level 5 : Apprentice Crafter
6

  Have something to say?

JoinSign in

12

joegaming111
01/04/2014 8:59 am
Level 5 : Apprentice Explorer
hey what is your server called i may be able to help but first i need to see your server
1
YourMCGeek
01/04/2014 9:44 am
Level 5 : Apprentice Crafter
I don't have a server I just want to make it for other servers to use but I need a test server
1
Willsr71
01/04/2014 10:15 am
Level 53 : Grandmaster Programmer
joegaming111-snip- Hai wats ur sever i want op before i can helpz you. kthxbye.

OP: I have absolutely no experience with plugins though so I can't help you.
1
EsvDefcon
01/04/2014 10:20 am
Level 62 : High Grandmaster Programmer
So what do you actually need help with specifically- are you unsure of how to do something or do you just want some help with the plugin overall?
1
YourMCGeek
01/04/2014 10:36 am
Level 5 : Apprentice Crafter
I need help making sure that if the plugin fails that it won't crash the server. I also need help with perms
1
SabreGames
01/04/2014 10:31 am
Level 13 : Journeyman Network
I have a test server you can use
1
Starguy
01/04/2014 10:35 am
Level 20 : Expert Ranger
plugins have to be .jars and im learning the bukkit api
1
SmiteMC_Realm
01/04/2014 10:39 am
Level 2 : Apprentice Crafter
Google>Youtube>search>how to make a bukkit plugin



It will solve your problem
1
SpectralEclipse
01/04/2014 10:42 am
Level 24 : Expert System
You can easily just local host a bukkit server to test your plugin on.
1
Starguy
01/04/2014 10:43 am
Level 20 : Expert Ranger
and what kind of plugin is this?
1
Proud_Aussie
01/04/2014 11:30 am
Level 7 : Apprentice Farmer
it changed chat colour
1
YourMCGeek
01/04/2014 10:50 am
Level 5 : Apprentice Crafter
It does /anyone and the person that did it says anyone need help
1

Welcome