-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HologramManager is null & line width is 0 #1
Comments
Caused by: java.lang.NullPointerException: Cannot invoke "com.maximfiedler.hologramapi.hologram.HologramManager.removeAll(String)" because "this.hologramManager" is null |
So you have a global variable hologramManager right? Are you sure that first someone joined (to initilize the hologramManager variable) before someone left? |
I described how to do everything in the wiki |
I have It all. The plugon the dependency, all. The holograma is shown whe Simeone joins but when Simeone leaves It tells that. Sorry for my english btw im fron Spain |
And are you sure that you did not compile the api directly into your plugin (for example by using the shadow plugin)? You can open the .jar using winrar for example and look you have there a com package which contains a maximfiedler packages and if so remove it. Can you maybe also show me your pom or build.gradle file?
|
You can also take a look at my example plugin which uses the hologram api |
If you want i can add a check to the getter method and initilize the hologram api variable if its null even without the onEnable
|
If thats to complicated you can maybe just sent me your pom.xml file or build.gradle file and i can take a look |
¿Todavía estás aquí? Creo que tengo una solución para ti: Actualiza a la última versión de la api (1.1.4) en pom.xml o build.gradle o actualiza el jar que usas como librería en tu IDE/editor de código y elimina el plugin hologramapi de tu servidor. |
Than you so much for the effort or answering me Ill be back home in 20 min and Ill let you know |
Code:
Pom.xml
` Error: |
Ok one moment please i need to read and understand everything first... |
Sorry |
Okay so... you use the shade plugin you just need to exclude my api from it |
put this into the < configuration > tag |
Also if you already removed the hologramapi plugin jar from your server add it again |
Here is the full edited pom.xml (I did not tested it so if there is a problem tell me)
|
WORKS PERFECTLY!!!! Thank you so much and excuse me for bothering you. Btw any idea why they look like that? |
No problem! Actually i dont know why they look like that... which client are you using? Can you add this line after the hologram creation for debugging in the join event? |
Thats how it should look... can i join your server maybe and look by myself? |
Like how the holograms are there using my client |
Or can you stand nearby a hologram (max 2 blocks away) and use this command: |
It is running in localhost how do I change the ip |
/data get entity @e[type=minecraft:text_display,distance=..10,limit=1] |
You can use ngrok (port tunnel), open the port on the router or find a host/rent or buy a root, v or dedicated server.. But you dont have to do that I just thought the server is already public that's why I asked |
I mean i could host the server for you as long as i still have server capacity in surplus (but it would be a bit complicated i would need to give you access in some way) |
I will try to solve this problem tomorrow then I come back here again |
Add this line to your code: Or hologram.setLineWidth(200);
hologram.update(); Also use |
Still the same and it is 1.1.4 |
Can you share the code for spawning the hologram again? |
|
You need to set the line width before the spawn method call
|
``@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
The text was updated successfully, but these errors were encountered: