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
    at org.bukkit.plugin.EventExecutor$1.execute( ~[patched_1.10.2.jar:git-Paper-830]
    at co.aikar.timings.TimedEventExecutor.execute( ~[patched_1.10.2.jar:git-Paper-830]
    at org.bukkit.plugin.RegisteredListener.callEvent( ~[patched_1.10.2.jar:git-Paper-830]
    at org.bukkit.plugin.SimplePluginManager.fireEvent( [patched_1.10.2.jar:git-Paper-830]
    at org.bukkit.plugin.SimplePluginManager.callEvent( [patched_1.10.2.jar:git-Paper-830]
    at org.bukkit.craftbukkit.v1_10_R1.event.CraftEventFactory.callPlayerInteractEvent( [patched_1.10.2.jar:git-Paper-830]
    at org.bukkit.craftbukkit.v1_10_R1.event.CraftEventFactory.callPlayerInteractEvent( [patched_1.10.2.jar:git-Paper-830]
    at org.bukkit.craftbukkit.v1_10_R1.event.CraftEventFactory.callPlayerInteractEvent( [patched_1.10.2.jar:git-Paper-830]
    at net.minecraft.server.v1_10_R1.PlayerConnection.a( [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$ [patched_1.10.2.jar:git-Paper-830]
    at java.util.concurrent.Executors$ [?:1.8.0_40]
    at [?: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( [patched_1.10.2.jar:git-Paper-830]
    at net.minecraft.server.v1_10_R1.DedicatedServer.D( [patched_1.10.2.jar:git-Paper-830]
    at net.minecraft.server.v1_10_R1.MinecraftServer.C( [patched_1.10.2.jar:git-Paper-830]
    at [patched_1.10.2.jar:git-Paper-830]
    at [?:1.8.0_40]
    Caused by: java.lang.NullPointerException
  5. Offline


    @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


    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


    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