Cannot use the API: “SpectatorPlus cannot be resolved to a type”
Opened this issue · 14 comments
SpectatorPlus cannot be resolved to a type
when i want to use the api on my plugin
Setup? Dependency/repo used? Code? Useful title?
Can't help without that.
Le 28 août 2015 12:51:40 GMT+02:00, terrainwax [email protected] a écrit :
SpectatorPlus cannot be resolved to a type
when i want to use the api on my plugin
Reply to this email directly or view it on GitHub:
#54
Its when i want to setup the api
SpectateAPI api = ((SpectatorPlus) spTest).getAPI();
this ligne with SpectatorPlus is in red and its write SpectatorPlus cannot be resolved to a type
If you're using the latest development version, you can do SpectatorPlus.getAPI()
. This returns the SpectateAPI instance. It only works in the B2.1 development builds though.
I dont understand want you want :s i m french
I dont understand this "Dependency/repo used?"
Je suis français :) .
Cela correspond à la dépendance que vous avez importé, quel JAR (si il a été directement ajouté à votre IDE (Éclipse, IntelliJ...), ou au dépôt (“repo”, “repository”) Maven utilisé, si vous utilisez Maven.
En bref, comment vous avez intégré SPlus dans votre projet.
(Translation hidden below.)
I'm french :) .
It's the dependency you imported, either the JAR file, if directly imported with your IDE (Eclipse, IntelliJ...), or the Maven repository used (if you're using Maven).
In short, how you integrated SPlus into your project.
Je l ai ajouter en import sur eclipse j ai clique droit sur mon projet properties javabuildpath et je l es ajouter a la librarie
Cela correspond à la dépendance que vous avez importé, quel JAR (si il a été directement ajouté à votre IDE (Éclipse, IntelliJ...) [...].
c'est cette version que j ai ajouter SpectatorPlus-S1.9.2 car je fait un plugin pour bukkit 1.7.10
if i use the last dev version where i place this SpectatorPlus.getAPI()? and its this SpectatorPlus.getAPI() or this SpectateAPI.getAPI();
With the latest version from the build server, you check if SpectatorPlus is available (through a depend
entry in the plugin.yml
, or a soft-depends
and a check with code); then you use anywhere:
SpectatorPlus.getAPI()
to get the instance of the SpectateAPI class to use.
But this version is a 1.8 version. This said, CraftBukkit / Spigot 1.8+ work just fine.