Git Product home page Git Product logo

kelp's People

Contributors

davis-software avatar dependabot[bot] avatar dseelp avatar etrayed avatar paul2708 avatar pxav avatar shatuxy avatar sqlongithub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kelp's Issues

[feature]: Drag and Drop for inventories

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.

[feat]: KelpEvents

Describe the solution you'd like
Events like KelpPlayerSidebarUpdate or Render Event. With this you can get the scoreboard which the player has.

[bugreport]: kelp shows wrong version

Describe the bug

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

What do we have to do to reproduce this bug?

Steps to reproduce the behavior:

  1. Use Kelp 0.3.4

What would you expect to happen?

It should show version 0.3.4 instead of 0.3.3

Environment information

  • Operating system: Linux Ubuntu 20.10
  • Java-Version: 1.8
  • Kelp-Core-Version: v.0.3.4
  • Version-Implementation: 1.8

[bugreport]: KelpPlayer#setTabListName only works one time

Describe the bug

When the Player gets another prefix you need to restart the server. Because KelpPlayer#setTabListName not working. and not updates. A rejoin not helped.

What would you expect to happen?

The Tablistname should change.

Environment information

  • Operating system: Windows 10 20H1
  • Java-Version: 1.8
  • Kelp-Core-Version: v.0.0.3
  • Version-Implementation: 1.8

[bugreport]: NoSuchElementException when player quits during server reload

Describe the bug

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

What do we have to do to reproduce this bug?

Steps to reproduce the behavior:

  1. Join the server
  2. Execute /reload
  3. Quit the server while the reload has not completed

Environment information

  • Operating system: Linux Deepin 15.11 and Windows 10
  • Java-Version: 1.8
  • Kelp-Core-Version: v.0.0.3
  • Version-Implementation: 1.8

[bugreport]: Reload issues preventing NPCs from spawning

Describe the bug

The bug is an exception that occurs when reloading and rejoining the server, which leads to non-spawning NPCs.

What do we have to do to reproduce this bug?

Steps to reproduce the behavior:

  1. Install an application spawning a kelp NPC.
  2. Reload the server using /reload
  3. Quit the server while it's reloading
  4. Rejoin

Provide the stack trace if possible (server logs, etc.). If you can, use the debug mode for that so that debug messages are logged as well

An error message occurs in the console when quitting and joining the server. (provided in bug report on twitter)

Environment information

  • Operating system: Windows 10
  • Java-Version: unknown
  • Kelp-Core-Version: v.0.0.3
  • Version-Implementation: 1.8

Read nbt Tags in KelpItem

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.

[bugreport]: IllegalArgumentException on Scoreboard show/update

Describe the bug

The error occurs when you try to show the scoreboard

What do we have to do to reproduce this bug?

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;
    }
}

Provide the stack trace if possible (server logs, etc.). If you can, use the debug mode for that so that debug messages are logged as well

[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

Provide some additional info like screenshots or videos if needed

If applicable, add screenshots to help explain your problem.

Environment information

  • Operating system: WIndows 10 20H1
  • Java-Version: 1.8
  • Kelp-Core-Version: v.0.0.3
  • Version-Implementation: 1.8
  • Spigot-Version: PaperSpigot-1.8.8

[feature] A CommandSender interface like in bukkit

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.

[bugreport]: KelpCommand#onCommandRegister gets executed multiply times on the same instance

Describe the bug

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.

What do we have to do to reproduce this bug?

Steps to reproduce the behavior:

  1. Create a Command and a SubCommand
  2. In both Commands you put in the onCommandRegister method a unique output
  3. In the parent command you see the output on Kelp startup. In the sub command you see the output everytime it is executed.

What would you expect to happen?

The onCommandRegister method in the sub command should only be called once in the application lifecycle.

Environment information

  • Operating system: Linux Kubuntu 20.10
  • Java-Version: 1.8
  • Kelp-Core-Version: v.0.0.5
  • Version-Implementation: 1.8

[bugreport]: Scoreboard does not update

Describe the bug

The method in that the scoreboard is declared is called but the scoreboard is not changing. i need to reconnect to apply the changes

Environment information

  • Operating system: Windows 10
  • Java-Version: 1.8
  • Kelp-Core-Version: v.0.0.4
  • Version-Implementation: 1.8

[bugreport]: Commands not executed when executor type PLAYER_AND_CONSOLE is set

Describe the bug

A clear and concise description of what the bug is.

What do we have to do to reproduce this bug?

Steps to reproduce the behavior:

  1. Create a new command with the executor PLAYER_AND_CONSOLE
  2. allow custom parameters
  3. put this in the onCommand(KelpPlayer,String[]) method:
System.out.println(Arrays.toString(args));

What would you expect to happen?

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.

Environment information

  • Operating system: Windows 10 20H1
  • Java-Version: 1.8
  • Kelp-Core-Version: v.0.0.3
  • Version-Implementation: 1.8

[feat]: Use or remove name tag of NPCs

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.

Additional context
oBd7HoHP

Reported via twitter

[feature] Pagination widget with lazy loading

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.

Provide issues

Hey,
will you accept contributions?
And if so, could you provide some issues like bugs, features, ideas etc. to work on? :D

Greetings

[bugreport]: Fehler beim Laden des Cores

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.

  • Operating system: Linux Ubuntu 20.04
  • Java-Version: 1.8
  • Kelp-Core-Version: v.0.4.0
  • Version-Implementation: 1.8
    Danke für eure Aufmerksamkeit

Tip

Hey,

you could add an .editorconfig so it gets easier for other contributors to keep the styl guide.

Please provide JavaDoc

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

Make inventories reusable for multiple players

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.

[bugreport]: Harddepenencies on Kelp Apps not working

Describe the bug

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.

What do we have to do to reproduce this bug?

Steps to reproduce the behavior:

  1. Create 2 Kelp Apps.
  2. Hard Depent one of them.
  3. You should now see in the console when you reload that the hard dependency can not be found.

What would you expect to happen?

It should load normally.

Provide the stack trace if possible (server logs, etc.). If you can, use the debug mode for that so that debug messages are logged as well

[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

Environment information

  • Operating system: Linux Ubuntu 20.10
  • Java-Version: 11
  • Kelp-Core-Version: v.0.3.3
  • Version-Implementation: 1.8

[bugreport]: KelpItem#getItemStack returns an ItemStack without the Description/Lore

Describe the bug

KelpItem#getItemStack returns an ItemStack without the Description/Lore.

What do we have to do to reproduce this bug?

Steps to reproduce the behavior:

  1. Provide an item description to a KelpItem.
  2. Check if the ItemStack returned has a lore.

What would you expect to happen?

The returned ItemStack should contain a lore.

Environment information

  • Operating system: Linux Ubuntu 20.10
  • Java-Version: 1.8
  • Kelp-Core-Version: v.0.2.0
  • Version-Implementation: 1.8

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.