thekeenant / tabbed

:book: Minecraft library for manipulating the tablist per player.
MIT License
50 stars 23 forks source link

Prefixes and suffixes #6

Closed danieltabrizian closed 8 years ago

danieltabrizian commented 8 years ago

I dont know for sure but can you implement the suffix and prefix feature to increase tablist entry lenght to 4-something?

thekeenant commented 8 years ago

It seems to support lengths up to what you want without prefix+suffix. Originally I had that implemented, but noticed the 16 length maximum didn't seem to be there anymore.

danieltabrizian commented 8 years ago

Alright i was going to test that but when i use the library in my project it has allot of errors with @getter and @setter on eclipse mars

thekeenant commented 8 years ago

If you aren't using maven like it has in the readme, you are going to need to download the compiled jar file from ci.avicus.net

thekeenant commented 8 years ago

https://ci.avicus.net/job/Tabbed/lastSuccessfulBuild/artifact/target/tabbed-1.7-SNAPSHOT.jar

danieltabrizian commented 8 years ago

Does installing lomblok work?

thekeenant commented 8 years ago

Yes, but if you're doing it this way, you'll have to add protocollib to your project as well.

thekeenant commented 8 years ago

It's much easier just to download the jar and add it as a library to your plugin.

danieltabrizian commented 8 years ago

Alright i have done that, i still need to implement protocollib correct?

thekeenant commented 8 years ago

It will just need to be installed as a plugin on the server.

danieltabrizian commented 8 years ago

I got an issue using the .jar I have dropped it in my project folder and exported it after copying one of the examples, but it throws an noClassDefFoundError

thekeenant commented 8 years ago

And the jar is bundled inside your plugin? Provide the login this is the case.

danieltabrizian commented 8 years ago

How would i go about doing that?

danieltabrizian commented 8 years ago

Even when importing it like it is a plugin.jar/spigot.jar it throws that error. It says it cant find Tabbed.class, In the tutorial you refrence it as tabbed without the capital T while it should be Tabbed.getTabbed(plugin) right?

thekeenant commented 8 years ago

Mhm it seems like the jar sources aren't being included in your plugin. I'd really advise using maven instead!

Otherwise I think this helps, though I don't use Eclipse: http://stackoverflow.com/questions/3280353/how-to-import-a-jar-in-eclipse

danieltabrizian commented 8 years ago

Alright so i switched to maven being sure its working as eclipse found the jar and it didnt give any errors but during execution the server still throws the following error: java.lang.NoClassDefFoundError: com/keenant/tabbed/Tabbed at solutions.elitedev.potionpvp.Tab.TabManager.createTab(TabManager.java:65) ~[?:?] at solutions.elitedev.potionpvp.Tab.TabManager$1.run(TabManager.java:41) ~[?:?] at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot.jar:git-Spigot-5f38d38-18fbb24] at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot.jar:git-Spigot-5f38d38-18fbb24] at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:723) [spigot.jar:git-Spigot-5f38d38-18fbb24] at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot.jar:git-Spigot-5f38d38-18fbb24] at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot.jar:git-Spigot-5f38d38-18fbb24] at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot.jar:git-Spigot-5f38d38-18fbb24] at java.lang.Thread.run(Unknown Source) [?:1.8.0_60] Caused by: java.lang.ClassNotFoundException: com.keenant.tabbed.Tabbed at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_60] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[spigot.jar:git-Spigot-5f38d38-18fbb24] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[spigot.jar:git-Spigot-5f38d38-18fbb24] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_60] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_60] ... 9 more

danieltabrizian commented 8 years ago

Is there a difference between the documentation and the maven repository? Because again the documentation says to stat with tabbed.newTableTabList(p); While i found it to be Tabbed.getTabbed(plugin).newTableTabList(p);

thekeenant commented 8 years ago

You create a tabbed instance with Tabbed tabbed = new Tabbed(plugin); then can use tabbed.newTableTabList(p). :+1: