problème concernant la class Javaplugin sur Eclipse

Mun

Aventurier
21 Avril 2023
13
0
1
23
Merci Alex, je vais essayer de me débrouiller avec ce que tu m'a conseiller tkt pour ton code je ne fais pas mieux :)

j'ai fais comme tu m'a dis mais bref...
et pourtant j'ai bien mis le fichier spigot dans les librairies
 

Fichiers joints

  • image_2023-04-25_234237509.png
    image_2023-04-25_234237509.png
    9.9 KB · Affichages: 46
  • image_2023-04-25_234329303.png
    image_2023-04-25_234329303.png
    26.9 KB · Affichages: 39
  • image_2023-04-25_234432718.png
    image_2023-04-25_234432718.png
    4.6 KB · Affichages: 40
  • image_2023-04-25_234621112.png
    image_2023-04-25_234621112.png
    9.4 KB · Affichages: 39
  • image_2023-04-26_014307213.png
    image_2023-04-26_014307213.png
    9.9 KB · Affichages: 38
Dernière édition:

Mun

Aventurier
21 Avril 2023
13
0
1
23
bonjour j'ai rechercher un moyen de faire quand même mon plugin et j'ai utiliser Maven ( Spigot) et là miracle Java plugin est trouvée mais je me demandais si l'arborescence est correct car j'ai créer mon package "fr.mun.pluginserv" dans le fichier Spigot-master
 

Fichiers joints

  • image_2023-04-26_091545211.png
    image_2023-04-26_091545211.png
    29.5 KB · Affichages: 43

ShE3py

Enbogueuse
Support
26 Septembre 2015
4 137
162
463
247
21
Mìlhüsa
My bad, j'avais oublié la notif.

Essaye de faire un nouveau projet directement avec Maven et de rajouter spigot-api en dépendance. Ce n'est pas la bonne méthode de faire ton plugin directement dans Spigot.
 

Mun

Aventurier
21 Avril 2023
13
0
1
23
En gros si j'ai bien compris je dois créer un projet maven et je dois mettre spigot en dépendance ?
 

Mun

Aventurier
21 Avril 2023
13
0
1
23
c bien comme ça ?
 

Fichiers joints

  • image_2023-04-26_203901235.png
    image_2023-04-26_203901235.png
    36.1 KB · Affichages: 40

ShE3py

Enbogueuse
Support
26 Septembre 2015
4 137
162
463
247
21
Mìlhüsa
Oui, mais tu dois déplacer plugin.yml dans src/main/resources.
Et préfère nommer ta classe principale MyPlugin plutôt que Main.
 

Mun

Aventurier
21 Avril 2023
13
0
1
23
j'ai un petit problème le serveur n'arrive pas à trouver le plugins et m'affiche un message d'erreur:

[20:58:25] [Server thread/ERROR]: Could not load 'plugins\Mavenplugin.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:170) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:144) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R3.CraftServer.loadPlugins(CraftServer.java:423) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f]
at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:219) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:975) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml

que dois je faire ?
 

ShE3py

Enbogueuse
Support
26 Septembre 2015
4 137
162
463
247
21
Mìlhüsa
Ton .jar ne contient pas ton plugin.yml, as-tu bien déplacé ce fichier dans src/main/resources ?