Solved Suppress Error

Discussion in 'Plugin Development' started by Typ, Dec 23, 2016.

Thread Status:
Not open for further replies.
  1. Hello,
    I've got a plugin, wich is working very fine, but it sends really much error Messages to the console.
    How can I suppress the error Messages? (without Fixing the error)
    I know there is @suppress or something like this, but how can I use it?

    Hopefullyy someone can help me ;)
     
  2. @Typ
    Error messages to the console are there to indicate that something has gone wrong with your code. You can't (or well, shouldn't) remove the error message without fixing it, as it often means that your code is broken in some way. Show us the error messages, and we can tell you how to fix them.

    Also, @SupressWarnings is something that can only be used in your IDE to hide non-fatal errors at compile time. It can not be used to hide errors while the program is running.
     
  3. Offline

    timtower Administrator Administrator Moderator

    Moved to plugin development.
    @Typ Like said: fix the errors, don't hide them.
     
  4. I don't find any error, the warning message doesn't Show any Connection to the plugin itself. It sais there would be an NPE, but not, where in the Code...

    Code (open)

    [16:07:54] [Server thread/ERROR]: Could not pass event PlayerInteractEvent to Testplugin v1.0.4
    org.bukkit.event.EventException
    at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:46) ~[patched_1.10.2.jar:git-Paper-830]
    at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.10.2.jar:git-Paper-830]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.10.2.jar:git-Paper-830]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517) [patched_1.10.2.jar:git-Paper-830]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) [patched_1.10.2.jar:git-Paper-830]
    at org.bukkit.craftbukkit.v1_10_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:231) [patched_1.10.2.jar:git-Paper-830]
    at org.bukkit.craftbukkit.v1_10_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:198) [patched_1.10.2.jar:git-Paper-830]
    at org.bukkit.craftbukkit.v1_10_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:194) [patched_1.10.2.jar:git-Paper-830]
    at net.minecraft.server.v1_10_R1.PlayerConnection.a(PlayerConnection.java:1427) [patched_1.10.2.jar:git-Paper-830]
    at net.minecraft.server.v1_10_R1.PacketPlayInArmAnimation.a(SourceFile:32) [patched_1.10.2.jar:git-Paper-830]
    at net.minecraft.server.v1_10_R1.PacketPlayInArmAnimation.a(SourceFile:9) [patched_1.10.2.jar:git-Paper-830]
    at net.minecraft.server.v1_10_R1.PlayerConnectionUtils$1.run(SourceFile:13) [patched_1.10.2.jar:git-Paper-830]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_40]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_40]
    at net.minecraft.server.v1_10_R1.SystemUtils.a(SourceFile:45) [patched_1.10.2.jar:git-Paper-830]
    at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:791) [patched_1.10.2.jar:git-Paper-830]
    at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:404) [patched_1.10.2.jar:git-Paper-830]
    at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:725) [patched_1.10.2.jar:git-Paper-830]
    at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:624) [patched_1.10.2.jar:git-Paper-830]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_40]
    Caused by: java.lang.NullPointerException
     
  5. Offline

    RenditionsRule

    @Typ Surely that wasn't the whole error. It should also have a line that tells you what class is causing it, and what line.
     
  6. Offline

    Ganga

    From what you've sent us:

    Obviously you have a nullpointerexception somwhere in your PlayerInteractEvent. This could mean you didnt handle the input correctly. I assume you know where your PlayerInteractEvent is. Look for potential error-causing input like a player that is non existent.
     
  7. That is the funny Thing, my plugin doesn't has a playerInteractEvent :C

    @RenditionsRule of Course it is the whole Code... But it is sent very extremly often, in milliseconds....
     
  8. @Typ
    My guess is that the problem occurs because you're using PaperSpigot.
     
  9. @AlvinB No I don't, I'm using Craftbukkit...
     
  10. Offline

    Zombie_Striker

    @Typ
    Your actual error logs say otherwise.
     
  11. sry I didn't answer so Long, Internet was down :/

    I'm sure, I'm not using Paper Spigot... However, I will try it the next days again, when I will have some time for this..
    Thanks for all answers!
     
Thread Status:
Not open for further replies.

Share This Page