1

HELP VISUAL BUKKIT/MINEHUT

goodguyLT 1/27/22 4:10 am
348
1/28/2022 7:34 am
So I coded a custom plugin with visual bukkit but I strugle with installing it on minehut server. HELP?
Posted by
goodguyLT
Level 1 : New Miner
0

  Have something to say?

JoinSign in

4

goodguyLT
01/28/2022 1:54 am
Level 1 : New Miner
yeah umm i did upload it but on server startup it shows a lot of warnings ([06:37:15 WARN]: java.lang.NullPointerException: Cannot invoke "org.bukkit.configuration.file.FileConfiguration.save(java.io.File)" because "null" is null
[06:37:15 WARN]: at noice-v1.1.jar//vb.$noice.PluginMain.onEnable(PluginMain.java:34)
[06:37:15 WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264)
[06:37:15 WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370)
[06:37:15 WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500)
[06:37:15 WARN]: at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugin(CraftServer.java:564)
[06:37:15 WARN]: at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugins(CraftServer.java:478)
[06:37:15 WARN]: at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:727)
[06:37:15 WARN]: at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:503)
[06:37:15 WARN]: at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:313)
[06:37:15 WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1202)
[06:37:15 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317)
[06:37:15 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)) and commands that should only send stuff to one person (comannd sender) doesn't work tho shows these warns in logs ([06:40:30 WARN]: java.lang.ClassCastException: class java.lang.String cannot be cast to class org.bukkit.command.CommandSender (java.lang.String is in module java.base of loader 'bootstrap'; org.bukkit.command.CommandSender is in unnamed module of loader java.net.URLClassLoader @759ebb3d)
[06:40:30 WARN]: at noice-v1.1.jar//vb.$noice.PluginMain.onCommand(PluginMain.java:79)
[06:40:30 WARN]: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[06:40:30 WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159)
[06:40:30 WARN]: at org.bukkit.craftbukkit.v1_18_R1.CraftServer.dispatchCommand(CraftServer.java:897)
[06:40:30 WARN]: at org.bukkit.craftbukkit.v1_18_R1.CraftServer.dispatchServerCommand(CraftServer.java:860)
[06:40:30 WARN]: at net.minecraft.server.dedicated.DedicatedServer.bf(DedicatedServer.java:507)
[06:40:30 WARN]: at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:481)
[06:40:30 WARN]: at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1470)
[06:40:30 WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1264)
[06:40:30 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317)
[06:40:30 WARN]: at java.base/java.lang.Thread.run(Thread.java:833))
also just for the record i use visual bukkit as a coding platform
1
lloyddominic26
01/28/2022 7:16 am
Level 20 : Expert Birb
You have a warning in your "noice-v1.1.jar" plugin, specifically located in the onEnable method of your plugin. I reckon it's somewhat related to saving the config file due to the "org.bukkit.configuration.file.FileConfiguration.save(java.io.File)" found in the stack trace.

In the second part, you (or at least Visual Bukkit) have tried to cast String to CommandSender. That isn't possible since String is not a subclass of CommandSender.

I don't make plugins in Visual Bukkit, so I may not be able to help you that much; however, I code plugins in Java, so here is one possible solution if you will be coding in Java:
If you are trying to get the name of a player and use it as an instance of CommandSender, make a "CommandSender" object using the "getPlayer(String name)" static method in the "Bukkit" class. Here is a sample code:

CommandSender commandSender = Bukkit.getPlayer("Steve");where "Steve" is the player name.
2
goodguyLT
01/28/2022 7:34 am
Level 1 : New Miner
Thx i will use as much as i can of this message!
2
lloyddominic26
01/27/2022 6:48 am
Level 20 : Expert Birb
Installing a Bukkit/Spigot plugin is pretty straightforward. You just put your plugin in the plugins folder of your server and, if compatible with the server and server version, it should automatically load upon starting up your server.

If it encounters an error upon loading your plugin, check the logs or you can upload it here.
2

Welcome