kelpframework / kelp Goto Github PK
View Code? Open in Web Editor NEWA cross-version spigot framework to avoid boilerplate code and make your plugin compatible with multiple spigot versions easily
License: MIT License
A cross-version spigot framework to avoid boilerplate code and make your plugin compatible with multiple spigot versions easily
License: MIT License
Is your feature request related to a problem? Please describe
With the current implementation its hard to build things that use drag and drop like a filebrowser. Because you have to manually save the last clicked itemstack.
Describe the solution you'd like
Add a method to get the last itemstack that was on the cursor.
Describe the solution you'd like
Events like KelpPlayerSidebarUpdate or Render Event. With this you can get the scoreboard which the player has.
A clear and concise description of what the bug is.
In the console kelp uses the version 0.3.3 instead of 0.3.4
Steps to reproduce the behavior:
It should show version 0.3.4 instead of 0.3.3
When the Player gets another prefix you need to restart the server. Because KelpPlayer#setTabListName not working. and not updates. A rejoin not helped.
The Tablistname should change.
When a player performs a server reload and quits while the reload process has not finished, an exception occurs saying that the packet_handler
could not be injected
Steps to reproduce the behavior:
/reload
The bug is an exception that occurs when reloading and rejoining the server, which leads to non-spawning NPCs.
Steps to reproduce the behavior:
/reload
An error message occurs in the console when quitting and joining the server. (provided in bug report on twitter)
Is your feature request related to a problem? Please describe.
At the moment you can only add and remove nbt tags. But you can't get the nbt Tags. For example i want to store an id as an nbt tag so i can identify that item. The problem is i can't read it later, when i get the kelp item from the itemstack in the inventory of the player.
Describe the solution you'd like
A method like hasTag(String tag) to check if the item has the tag and something like getTag(String tag) that returns the tag or null.
Hi there, when I was reading the code of the function "public Object getValue(Object object, String fieldName)" in core/src/main/java/de/pxav/kelp/core/reflect/ReflectionUtil.java, I found it has no Javadoc. My understanding is “get value of the specified field @param object the object whose field should be extracted from the object". Can you please check if this is correct? Thanks.
The error occurs when you try to show the scoreboard
Steps to reproduce the behavior:
Use the code below.
This is the code i used:
import com.google.inject.Inject;
import com.google.inject.Singleton;
import de.pxav.kelp.core.animation.TextAnimationFactory;
import de.pxav.kelp.core.sidebar.CreateSidebar;
import de.pxav.kelp.core.sidebar.component.SidebarComponentFactory;
import de.pxav.kelp.core.sidebar.type.AnimatedSidebar;
import de.pxav.kelp.core.sidebar.type.SidebarFactory;
import de.pxav.kelp.core.sidebar.type.SimpleSidebar;
import org.bukkit.entity.Player;
@Singleton
public class DefaultSidebar {
private SidebarFactory sidebarFactory;
private SidebarComponentFactory componentFactory;
@Inject
public DefaultSidebar(SidebarFactory sidebarFactory, SidebarComponentFactory componentFactory) {
this.sidebarFactory = sidebarFactory;
this.componentFactory = componentFactory;
}
@CreateSidebar(identifier = "default", setOnJoin = true)
public SimpleSidebar defaultSidebar(Player player) {
SimpleSidebar sidebar = sidebarFactory.newSimpleSidebar();
sidebar.withTitle("§6\\u2022§e\\u25cf §eMy Server");
sidebar.addComponent(componentFactory.simpleTextComponent("§6\\u2022§e\\u25cf Username§8"));
sidebar.addComponent(componentFactory.simpleTextComponent("§8\\u27a5 §7"+player.getName()));
return sidebar;
}
}
[20:30:18 WARN]: java.lang.reflect.InvocationTargetException
[20:30:18 WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[20:30:18 WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[20:30:18 WARN]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[20:30:18 WARN]: at java.lang.reflect.Method.invoke(Unknown Source)
[20:30:18 WARN]: at de.pxav.kelp.core.listener.EventRegistration.lambda$null$0(EventRegistration.java:86)
[20:30:18 WARN]: at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78)
[20:30:18 WARN]: at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
[20:30:18 WARN]: at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517)
[20:30:18 WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502)
[20:30:18 WARN]: at net.minecraft.server.v1_8_R3.PlayerList.onPlayerJoin(PlayerList.java:314)
[20:30:18 WARN]: at net.minecraft.server.v1_8_R3.PlayerList.a(PlayerList.java:173)
[20:30:18 WARN]: at net.minecraft.server.v1_8_R3.LoginListener.b(LoginListener.java:144)
[20:30:18 WARN]: at net.minecraft.server.v1_8_R3.LoginListener.c(LoginListener.java:54)
[20:30:18 WARN]: at net.minecraft.server.v1_8_R3.NetworkManager.a(NetworkManager.java:231)
[20:30:18 WARN]: at net.minecraft.server.v1_8_R3.ServerConnection.c(ServerConnection.java:148)
[20:30:18 WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:875)
[20:30:18 WARN]: at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:378)
[20:30:18 WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:713)
[20:30:18 WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:616)
[20:30:18 WARN]: at java.lang.Thread.run(Unknown Source)
[20:30:18 WARN]: Caused by: java.lang.IllegalArgumentException: Team name 'entry_0' is already in use
[20:30:18 WARN]: at org.apache.commons.lang.Validate.isTrue(Validate.java:136)
[20:30:18 WARN]: at org.bukkit.craftbukkit.v1_8_R3.scoreboard.CraftScoreboard.registerNewTeam(CraftScoreboard.java:140)
[20:30:18 WARN]: at de.pxav.kelp.core.sidebar.component.SimpleTextComponent.render(SimpleTextComponent.java:54)
[20:30:18 WARN]: at de.pxav.kelp.core.sidebar.type.SimpleSidebar.renderSidebar(SimpleSidebar.java:83)
[20:30:18 WARN]: at de.pxav.kelp.core.sidebar.type.SimpleSidebar.renderAndOpenSidebar(SimpleSidebar.java:91)
[20:30:18 WARN]: at de.pxav.kelp.core.sidebar.SidebarRepository.openSidebar(SidebarRepository.java:211)
[20:30:18 WARN]: at de.pxav.kelp.core.sidebar.SidebarStateListener.onPlayerJoin(SidebarStateListener.java:44)
[20:30:18 WARN]: ... 20 more
If applicable, add screenshots to help explain your problem.
Is your feature request related to a problem? Please describe.
You currently multiple util methods for the same thing because there is no unified CommandSender, where you for example send Messages to.
Describe the solution you'd like
A interface that is implemented by KelpConsoleSender and KelpPlayer which has for example hasPermission and sendMessage methods.
Hey,
I'm not sure if I'm right, but I tell you anway.
Don't you have a redundant Preconditions at VersionBinderModule in line 65? You check in the line above if it is null.
The onCommandRegister method on a SubCommand gets executed everytime the sub command is called.
I didn't forget the @singleton annotation. The instance is the same.
Steps to reproduce the behavior:
The onCommandRegister method in the sub command should only be called once in the application lifecycle.
The method in that the scoreboard is declared is called but the scoreboard is not changing. i need to reconnect to apply the changes
A clear and concise description of what the bug is.
Steps to reproduce the behavior:
System.out.println(Arrays.toString(args));
When the executorType is PLAYER_AND_CONSOLE and you execute the command with parameters, you see nothing in the console. But when the executorType is PLAYER_ONLY then everything works and you see the args in the console.
Is your feature request related to a problem? Please describe.
When giving multiple title lines to an NPC, you can see the original name tag of it. This sometimes looks buggy or weird and is not always wanted.
Describe the solution you'd like
It would be good to either give an option to use this line of text or be able to completely remove it.
Reported via twitter
Is your feature request related to a problem? Please describe.
Currently to use the pagination with a database you need to load all entries and map them to a kelp item.
Describe the solution you'd like
A lazy Pagination class which has a type argument and needs an supplier and two functions.
The supplier returns the max page and the first function takes an int as the page and returns an array or list of the type. The second function takes an object of the type and returns a kelp item.
Hey,
will you accept contributions?
And if so, could you provide some issues like bugs, features, ideas etc. to work on? :D
Greetings
Wenn der Kelp-Core im Pluginordner ist und man den Server startet, dann erscheint eine Fehlermeldung.
ERROR]: Error occurred while enabling Kelp v0.4.0 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "com.google.inject.Injector.getInstance(java.lang.Class)" because "de.pxav.kelp.core.KelpPlugin.injector" is null
at de.pxav.kelp.core.KelpPlugin.logKelpLogo(KelpPlugin.java:149) ~[?:?]
at de.pxav.kelp.core.KelpPlugin.onEnable(KelpPlugin.java:73) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-1.17.1.jar:3284-Spigot-3892929-0ebef35]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-1.17.1.jar:3284-Spigot-3892929-0ebef35]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-1.17.1.jar:3284-Spigot-3892929-0ebef35]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:520) ~[spigot-1.17.1.jar:3284-Spigot-3892929-0ebef35]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:434) ~[spigot-1.17.1.jar:3284-Spigot-3892929-0ebef35]
at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:619) ~[spigot-1.17.1.jar:3284-Spigot-3892929-0ebef35]
at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:266) ~[spigot-1.17.1.jar:3284-Spigot-3892929-0ebef35]
at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1010) ~[spigot-1.17.1.jar:3284-Spigot-3892929-0ebef35]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:305) ~[spigot-1.17.1.jar:3284-Spigot-3892929-0ebef35]
at java.lang.Thread.run(Thread.java:833) [?:?]
Das ist die Fehlermeldung.
Hey,
you could add an .editorconfig
so it gets easier for other contributors to keep the styl guide.
Is your feature request related to a problem? Please describe.
You project is self explainatory for the most part, but if you're new to it, you might want to be able fo look into the funktion of some modules. No pressure tho. If that's not possible, because the project is already to big or something, just close this feature request.
Kind regards,
Trqhxrd
Is your feature request related to a problem? Please describe.
For every Widget that needs a player you need to call the Widget#player method. With this setup Inventories/Widgets can't be reused.
Describe the solution you'd like
A player parameter would be added to the KelpInventory#render and Widget#render method so the inventory can be reused.
Is your feature request related to a problem? Please describe.
Currently for complex commands you need to create lots of classes. My Command System uses a Brigadier like Builder.
Describe the solution you'd like
I can implement the logic for my system myself in Kelp and create a pull request for it.
Additional context
Here's the link to my system: https://github.com/DSeeLP/Kommon/tree/development/command
I have a kelp app which depends on another Kelp App. The depent is registered as a hard dependency. Kelp fails to enable the App with the notice that the hard dependency can not be found.
Steps to reproduce the behavior:
It should load normally.
[18:17:48 INFO]: [Kelp] [APP] Detecting KelpApplications.
[18:17:48 INFO]: [Kelp] [APP] Successfully loaded DatabaseProvider
[18:17:48 WARN]: [Kelp] [APP] Dependency DatabaseProvider (required by CityLife) is unavailable
[18:17:48 ERROR]: [Kelp] [APP] Failed to enable CityLife
[18:17:48 INFO]: [Kelp] [APP] Loading application DatabaseProvider with version 1.0
KelpItem#getItemStack returns an ItemStack without the Description/Lore.
Steps to reproduce the behavior:
The returned ItemStack should contain a lore.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.