Guest User

TheAspie Code

a guest
Jun 30th, 2021
26
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Error
  2.  
  3.  
  4.  
  5. 30.06 19:28:26 [Server] Server thread/ERROR Could not pass event BlockBreakEvent to UnbreakableBlocks v1.0
  6. 30.06 19:28:26 [Server] INFO org.bukkit.event.EventException: null
  7. 30.06 19:28:26 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:319) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  8. 30.06 19:28:26 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  9. 30.06 19:28:26 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  10. 30.06 19:28:26 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  11. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.PlayerInteractManager.breakBlock(PlayerInteractManager.java:309) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  12. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.PlayerInteractManager.a(PlayerInteractManager.java:268) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  13. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.PlayerInteractManager.a(PlayerInteractManager.java:238) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  14. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.PlayerConnection.a(PlayerConnection.java:1219) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  15. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.PacketPlayInBlockDig.a(SourceFile:40) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  16. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.PacketPlayInBlockDig.a(SourceFile:10) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  17. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  18. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.TickTask.run(SourceFile:18) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  19. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.executeTask(SourceFile:144) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  20. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  21. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.executeNext(SourceFile:118) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  22. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.MinecraftServer.ba(MinecraftServer.java:941) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  23. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.MinecraftServer.executeNext(MinecraftServer.java:934) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  24. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.awaitTasks(SourceFile:127) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  25. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.MinecraftServer.sleepForTick(MinecraftServer.java:918) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  26. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:850) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  27. 30.06 19:28:26 [Server] INFO at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[spigot-1.16.2.jar:git-Spigot-379750e-9a9c223]
  28. 30.06 19:28:26 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
  29. 30.06 19:28:26 [Server] INFO Caused by: java.lang.NullPointerException
  30. 30.06 19:28:26 [Server] INFO at me.theaspie.unbreakableblocks.UnbreakableBlocks.onBlockBreak(UnbreakableBlocks.java:26) ~[?:?]
  31. 30.06 19:28:26 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_292]
  32. 30.06 19:28:26 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_292]
  33. 30.06 19:28:26 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_292]
  34. 30.06 19:28:26 [Server] INFO at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_292]
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42. Code (Main Class)-
  43.  
  44.  
  45.  
  46. package me.theaspie.unbreakableblocks;
  47.  
  48. import org.bukkit.command.*;
  49. import org.bukkit.event.*;
  50. import org.bukkit.event.block.*;
  51. import org.bukkit.plugin.java.*;
  52.  
  53. public final class UnbreakableBlocks extends JavaPlugin implements Listener, CommandExecutor {
  54. @Override
  55. public void onEnable() {
  56. this.getServer().getPluginManager().registerEvents(this, this);
  57. this.saveDefaultConfig();
  58. getConfig().options().copyDefaults(true);
  59. saveConfig();}
  60. @EventHandler
  61. public void onBlockBreak(BlockBreakEvent event) {
  62. this.getConfig().getConfigurationSection("blocks").getKeys(true).forEach(key -> {
  63. if (key.equalsIgnoreCase(event.getBlock().getType().name())) {
  64. event.setCancelled(true); }});}
  65. @Override
  66. public void onDisable() {}}
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73. config.yml
  74.  
  75.  
  76. blocks:
  77. -DIRT
  78. -STONE
  79.  
  80.  
  81. plugin.yml
  82.  
  83. name: UnbreakableBlocks
  84. version: ${project.version}
  85. main: me.theaspie.unbreakableblocks.UnbreakableBlocks
  86. api-version: 1.16
  87. authors: [ TheAspie ]
  88. description: Makes blocks unbreakable!
RAW Paste Data