Why does everybody define task if it's in main plugin's class like this: Code:java this.getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable() { What's the difference between with: Code:java this. and without it ? Next: If i want to define task in class "drakonasKomanda", but it's not main class. Main class would be funkcijos. So is this defining right: Code:java public class drakonasKomanda implements CommandExecutor {funkcijos plugin;public drakonasKomanda(funkcijos plugin) {this.plugin = plugin;}public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){ Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() {
1. There is no difference, but Eclipse suggests getServer() for you when you use this. 2. This would work, but you could use plugin.getServer().getScheduler()..., too. Don't know which one is "better"... Btw. Class names should always start with a capital letter.