My scheduler does not work:
55 Bukkit.getScheduler (). ScheduleSyncRepeatingTask (this, 56 new Runnable () {
57 public void run () {
58
59
60}
61}, 20, 20);
62
Could not pass event PlayerJoinEvent to TimePlugin v2.6
org.bukkit.event.EventException
at net.minecraft.server.v1_10_R1.PlayerList.onPlayerJoin (PlayerList.java:333) [server.jar: git-Spigot-6016ac7-10c10b3] at net.minecraft.server.v1_10_R1.PlayerList.a (PlayerList.java:159 ) [server.jar: git-Spigot-6016ac7-10c10b3] at net.minecraft.server.v1_10_R1.LoginListener.b (LoginListener.java:144) [server.jar: git-Spigot-6016ac7-10c10b3] at net.minecraft .server.v1_10_R1.LoginListener.E_ (LoginListener.java:54) [server.jar: git-Spigot-6016ac7-10c10b3] at net.minecraft.server.v1_10_R1.NetworkManager.a (NetworkManager.java:233) [server. Jar: git-Spigot-6016ac7-10c10b3] at net.minecraft.server.v1_10_R1.ServerConnection.c (ServerConnection.java:140) [server.jar: git-Spigot-6016ac7-10c10b3] at net.minecraft.server.v1_10_R1 .MinecraftServer.D (MinecraftServer.java:832) [server.jar: git-Spigot-6016ac7-10c10b3] at net.minecraft.server.v1_10_R1.DedicatedServer.D (DedicatedServer.java:399) [server.jar: git- Spigot-6016ac7-10c10b3] at net.minecraft.server.v1_10_R1.MinecraftServer.C (MinecraftServer.java:6 72) [server.jar: git-spigot-6016ac7-10c10b3] at net.minecraft.server.v1_10_R1.MinecraftServer.run (MinecraftServer.java:571) [server.jar: git-spigot-6016ac7-10c10b3] at java. Lang.Thread.run (Unknown Source) [?: 1.8.0_211] Caused by: org.bukkit.plugin.IllegalPluginAccessException: Plugin attempted to register task while disabled at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftScheduler.validate (CraftScheduler .java: 400) ~ [server.jar: git-Spigot-6016ac7-10c10b3] at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftScheduler.runTaskTimer (CraftScheduler.java:123) ~ [server.jar: git-spigot 6016ac7-10c10b3] at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftScheduler.scheduleSyncRepeatingTask (CraftScheduler.java:119) ~ [server.jar: git-Spigot-6016ac7-10c10b3] at the.arrel.main.eventlistner.onPlayerJoin ( eventlistner.java:55) ~ [?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) ~ [?: 1.8.0_211] at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source) ~ [?: 1.8. 0_211] at sun.reflect.D elegatingMethodAccessorImpl.invoke (Unknown Source) ~ [?: 1.8.0_211] at java.lang.reflect.Method.invoke (Unknown Source) ~ [?: 1.8.0_211] at org.bukkit.plugin.java.JavaPluginLoader $ 1.execute (JavaPluginLoader.java:306) ~ [server.jar: git-spigot-6016ac7-10c10b3]
I'm currently programming for version 1.10
Could not pass event PlayerJoinEvent to TimePlugin v2.6
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader $ 1.execute (JavaPluginLoader.java:310) ~ [server.jar: git-Spigot-6016ac7-10c10b3]
at org.bukkit.plugin.RegisteredListener.callEvent (RegisteredListener.java:62) ~ [server.jar: git-Spigot-6016ac7-10c10b3]
at org.bukkit.plugin.SimplePluginManager.fireEvent (SimplePluginManager.java:502) [server.jar: git-Spigot-6016ac7-10c10b3]
at org.bukkit.plugin.SimplePluginManager.callEvent (SimplePluginManager.java:487) [server.jar: git-Spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.PlayerList.onPlayerJoin (PlayerList.java:333) [server.jar: git-Spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.PlayerList.a (PlayerList.java:159) [server.jar: git-spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.LoginListener.b (LoginListener.java:144) [server.jar: git-Spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.LoginListener.E_ (LoginListener.java:54) [server.jar: git-Spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.NetworkManager.a (NetworkManager.java:233) [server.jar: git-spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.ServerConnection.c (ServerConnection.java:140) [server.jar: git-spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.MinecraftServer.D (MinecraftServer.java:832) [server.jar: git-Spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.DedicatedServer.D (DedicatedServer.java:399) [server.jar: git-spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.MinecraftServer.C (MinecraftServer.java:672) [server.jar: git-Spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.MinecraftServer.run (MinecraftServer.java:571) [server.jar: git-Spigot-6016ac7-10c10b3]
at java.lang.Thread.run (Unknown Source) [?: 1.8.0_211]
Caused by: org.bukkit.plugin.IllegalPluginAccessException: Plugin attempted to register task while disabled
at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftScheduler.validate (CraftScheduler.java:400) ~ [server.jar: git-Spigot-6016ac7-10c10b3]
at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftScheduler.runTaskTimer (CraftScheduler.java:123) ~ [server.jar: git-Spigot-6016ac7-10c10b3]
at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftScheduler.scheduleSyncRepeatingTask (CraftScheduler.java:119) ~ [server.jar: git-Spigot-6016ac7-10c10b3]
at de.arrel.main.eventlistner.onPlayerJoin (eventlistner.java:55) ~ [?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) ~ [?: 1.8.0_211]
at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source) ~ [?: 1.8.0_211]
at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source) ~ [?: 1.8.0_211]
at java.lang.reflect.Method.invoke (Unknown Source) ~ [?: 1.8.0_211]
at org.bukkit.plugin.java.JavaPluginLoader $ 1.execute (JavaPluginLoader.java:306) ~ [server.jar: git-Spigot-6016ac7-10c10b3]
Complete error message
The plugin is not yet activated at this time or has been deactivated due to an error
Please refer
Caused by: org.bukkit.plugin.IllegalPluginAccessException: Plugin attempted to register task while disabled
And why can that be?
Send more code
Public void onPlayerJoin (PlayerJoinEvent event) throws InterruptedException, IOException {
Player e = event.getPlayer ();
File file = new File ("plugins / userdata /" + "data.yml");
@SuppressWarnings ( "unused")
YamlConfiguration playerdata = YamlConfiguration.loadConfiguration (file);
if (playerdata.getBoolean (event.getPlayer (). GetName () + "Dead") == true) {
e.kickPlayer ("§aYou left the project.");
} else {
e.sendMessage ("§aYou can move in 10 seconds");
freeze = true;
Bukkit.getScheduler (). ScheduleSyncRepeatingTask (this, new Runnable () {
public void run () {
}
}, 20, 20);
}
}
For this you have to upload the entire log from the server to hastebin.com, then I can see if there are more errors.
Okay, second
Can it be that the playerjoinevent is not in the class that inherits from JavaPlugin?
So the playerjoinevent works fine otherwise!
That may be, but the problem is that you create the scheduler with the wrong plugin reference. Do it like this:
Bukkit.getScheduler (). ScheduleSyncRepeatingTask (Main.getInstance (), new Runnable () {
public void run () {
}
}, 20, 20);
I hope you know what this main.getinstance means. That means you should enter the instance of the main class, that is the class that inherits from javaplugin
My main class is called "main". So just enter "main.getInstance ()"?
If you also have a method getInstance () in this class. It usually looks like this:
public class Main extends JavaPlugin {
private static main instance;
@Override
public void onEnable () {
instance = this;
// your code here
}
// more code here
public static Main getInstance () {
return instance;
}
Could not pass event PlayerJoinEvent to TimePlugin v2.6
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader $ 1.execute (JavaPluginLoader.java:310) ~ [server.jar: git-Spigot-6016ac7-10c10b3]
at org.bukkit.plugin.RegisteredListener.callEvent (RegisteredListener.java:62) ~ [server.jar: git-Spigot-6016ac7-10c10b3]
at org.bukkit.plugin.SimplePluginManager.fireEvent (SimplePluginManager.java:502) [server.jar: git-Spigot-6016ac7-10c10b3]
at org.bukkit.plugin.SimplePluginManager.callEvent (SimplePluginManager.java:487) [server.jar: git-Spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.PlayerList.onPlayerJoin (PlayerList.java:333) [server.jar: git-Spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.PlayerList.a (PlayerList.java:159) [server.jar: git-spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.LoginListener.b (LoginListener.java:144) [server.jar: git-Spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.LoginListener.E_ (LoginListener.java:54) [server.jar: git-Spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.NetworkManager.a (NetworkManager.java:233) [server.jar: git-spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.ServerConnection.c (ServerConnection.java:140) [server.jar: git-spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.MinecraftServer.D (MinecraftServer.java:832) [server.jar: git-Spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.DedicatedServer.D (DedicatedServer.java:399) [server.jar: git-spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.MinecraftServer.C (MinecraftServer.java:672) [server.jar: git-Spigot-6016ac7-10c10b3]
at net.minecraft.server.v1_10_R1.MinecraftServer.run (MinecraftServer.java:571) [server.jar: git-Spigot-6016ac7-10c10b3]
at java.lang.Thread.run (Unknown Source) [?: 1.8.0_211]
Caused by: java.lang.IllegalArgumentException: Plugin can't be null
at org.apache.commons.lang.Validate.notNull (Validate.java:192) ~ [server.jar: git-Spigot-6016ac7-10c10b3]
at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftScheduler.validate (CraftScheduler.java:397) ~ [server.jar: git-Spigot-6016ac7-10c10b3]
at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftScheduler.runTaskTimer (CraftScheduler.java:123) ~ [server.jar: git-Spigot-6016ac7-10c10b3]
at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftScheduler.scheduleSyncRepeatingTask (CraftScheduler.java:119) ~ [server.jar: git-Spigot-6016ac7-10c10b3]
at de.arrel.main.eventlistner.onPlayerJoin (eventlistner.java:56) ~ [?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) ~ [?: 1.8.0_211]
at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source) ~ [?: 1.8.0_211]
at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source) ~ [?: 1.8.0_211]
at java.lang.reflect.Method.invoke (Unknown Source) ~ [?: 1.8.0_211]
at org.bukkit.plugin.java.JavaPluginLoader $ 1.execute (JavaPluginLoader.java:306) ~ [server.jar: git-Spigot-6016ac7-10c10b3]
… 14 more
No, unfortunately not
You seemingly did not follow my steps:
Plugin can't be null
send times main class and what the scheduler jz looks like
Okay I do with pastebin
Main.java:
eventlistner:
You do not have as I said the part written down:
@Override
public void onEnable () {
instance = this;
// your code here
}
write the instance = this in the onEnable part at the top
By the way, you should always work with main.getInstance () if you do not create a scheduler in the main class. Then you can also remove this superfluous implements plugin in the eventlistener
Oh yeah!
Your question has already been solved, the section you pasted on pastbin was not the one I wanted ;-)