#plugin dont work
1 messages · Page 1 of 1 (latest)
ok
package fr.yuna.europemc;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
public class Main extends JavaPlugin {
public void OnEnable() {
}
public void OnDisable() {
}
public boolean OnCommand(CommandSender sender, Command command, String label, String[] args) {
if(label.equalsIgnoreCase("hello")) {
if(!(sender instanceof Player)) {
sender.sendMessage("You need to be a player to run this command!");
return true;
}
if(!sender.hasPermission("helloworld.use")) {
sender.sendMessage(ChatColor.RED + "You do not have permission!");
return true;
}
Player p = (Player) sender;
p.sendMessage("Hello " + p.getName());
return true;
}
return false;
}
}
no
aha
you need to make
plugin.yml
and if you already did
then restart the server
after you add a plugin
or use sth like /reload or plugman
restarting is always safer tho
but for your plugin anything should work
that doesn't do anything
oh I've forgot to restart the server
or paper
oh
I don't have my plugin in /pl
where did I put plugin.yml ?
no, in my plugin folder
yes i do
to then compile your plugin with it
ow ok
EVERY plugin must have plugin.yml to work
show me plugin.yml
main: fr.yuna.europemc.Main
name: EuropeMC_1.16.3
version: 1.0
description: EuropeMC
api-version: 1.16.3
commands:
hello:
description: HelloWorld!
huhhh
ok
can you send me the plugin?
yes
sry for taking long i was downloading and decompiling the plugin
sry for my english level
its still
1.16.3
you need to change it to 1.16
or remove api-version all together
but why it doens't work for me ?
well idk
are you on 1.16.3 ?
1.17.1
but it is compatible
btw do /pl
it should appear
the plugin itself
doesnt work
but it should load properly
now
yes
do /ver
or paper
what is this ?
a plugin to load plugins
plugmanx ?
ok it's downloaded
already do
you should see plugman
yea
so thats the problem right there
your server
the jdk that the server runs on
doesnt support the one you used to compile it
if im understanding correctly
so its not a problem with the plugin itself
but what you compile it with and what jdk you run it on
im pretty sure that if you just run the server at your local computer
it would work
maybe im wrong
I will test to build the plugin with the jdk of the server
oke
jre or jdk
maybe its jre
but idk much about this
but its more of a java as a whole question now
and not bukkit
the jre run by the server is lower than the one you compiled it with
nope
you run the server
idk
if you switch to 1.17
paper /spigot whatever
it should work
since 1.17 requires java 16 to work
so the server is forced to update
so is the jre 16 ?
what is the jre on your server ?