1
Need help coding!
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
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
12
hey what is your server called i may be able to help but first i need to see your server
I don't have a server I just want to make it for other servers to use but I need a test server
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.
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?
I need help making sure that if the plugin fails that it won't crash the server. I also need help with perms
I have a test server you can use
plugins have to be .jars and im learning the bukkit api
Google>Youtube>search>how to make a bukkit plugin
It will solve your problem
It will solve your problem
You can easily just local host a bukkit server to test your plugin on.
and what kind of plugin is this?
it changed chat colour
It does /anyone and the person that did it says anyone need help
