Java plugin
Off topic → Programming → Java plugin
Im creating a plugin for another server. its a /website plugin really simple but its not working here is the code
this is the plugin.yml
thanks in advanced
@Override annotation above onCommandIn your plugin.yml you are referencing a lowercase “main” while your class is actually named “Main” with an uppercase M.
Also the missing annotation as nash has pointed out already.
Additionally, why are you casting the sender to player? You don’t access any player specific methods - what you’re doing just makes it crash when someone runs the command from console.
if(cL.equalsIgnoreCase("website")) enough? also this may sound stupid but I heard there always needs to be an else statement if there is and if statement is that the case with if(cL.equalsIgnoreCase("website")) goodThis is definitely not necroposting.
I wouldn’t use the command label, just use cmd.getName().equals(“website”). Note that cmd.getName() gives the name of the command, not what the user typed, so this will also work fine with aliases.