Coder Social home page Coder Social logo

lorekillcounter's Introduction

LoreKillCounter

Spigot 1.13 plugin that counts kills on enabled items

This plugin is not yet finished!

Downloading the Plugin pre-built

You can find released JARs (that can be added to your plugins folder) on the Releases tab of this project.

If you want something a bit more shiny, you can check out our development builds available through Jenkins CI.

Building the Project yourself

We've recently moved to using Maven! If you used build.xml or a Netbeans Project before, you may need to import the project again as a maven project / from existing POM.

This document may help you import the project in your IDE.

API

You can build your own plugins against LoreKillCounter by including the following in your configuration.

Respositories:

    <repository>
        <id>crashdemons-repo</id>
        <url>https://meme.tips/java-repos/</url>
    </repository>

Depend on LoreKillCounter:

    <dependency>
        <groupId>com.github.crashdemons</groupId>
        <artifactId>LoreKillCounter</artifactId>
        <version>0.0.2-SNAPSHOT</version>
    </dependency>

lorekillcounter's People

Contributors

crashdemons avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

lorekillcounter's Issues

exception when attempting to add an unknown counter type

minor bug though since it only shows an error and only happens when you type the wrong thing in a command.

26.09 00:37:21 [Server] ERROR null
26.09 00:37:21 [Server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'counter' in plugin LoreKillCounter v2.0.3-SNAPSHOT
26.09 00:37:21 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at org.bukkit.craftbukkit.v1_16_R2.CraftServer.dispatchCommand(CraftServer.java:800) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at net.minecraft.server.v1_16_R2.PlayerConnection.handleCommand(PlayerConnection.java:1908) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at net.minecraft.server.v1_16_R2.PlayerConnection.a(PlayerConnection.java:1719) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at net.minecraft.server.v1_16_R2.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at net.minecraft.server.v1_16_R2.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at net.minecraft.server.v1_16_R2.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:23) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at net.minecraft.server.v1_16_R2.TickTask.run(SourceFile:18) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at net.minecraft.server.v1_16_R2.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at net.minecraft.server.v1_16_R2.MinecraftServer.ba(MinecraftServer.java:1135) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at net.minecraft.server.v1_16_R2.MinecraftServer.executeNext(MinecraftServer.java:1128) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.executeAll(IAsyncTaskHandler.java:95) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at net.minecraft.server.v1_16_R2.MinecraftServer.a(MinecraftServer.java:1264) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:999) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.3.jar:git-Paper-191]
26.09 00:37:21 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_251]
26.09 00:37:21 [Server] INFO Caused by: java.lang.NullPointerException
26.09 00:37:21 [Server] INFO at com.github.crashdemons.lorekillcounter.CounterCommandExecutor.addCounter(CounterCommandExecutor.java:35) ~[?:?]
26.09 00:37:21 [Server] INFO at com.github.crashdemons.lorekillcounter.CounterCommandExecutor.onCommand(CounterCommandExecutor.java:110) ~[?:?]
26.09 00:37:21 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[patched_1.16.3.jar:git-Paper-191]

wither_skeleton beheadings do not give behead points

Wither skeletons dropping a skull is not counted in the Mobs Beheaded stat.
This bug is probably due to PH API considering wither skeleton behead events separately from mob behead events.

This could either be resolved on PH's end, or here in the PH integration with a separate event listener.

Edit: I would attach a bug label if I could, but it appears I don't have permission to

NPE on entity death under certain conditions (eg: Ghast Return-to-Sender)

The line causing the NPE is indicated by logs to be Line 69 of LKC in in v0.0.2:

public void applyCounterOperation(ItemStack stack, CounterOperation operation){
if(stack==null) return;
ItemMeta meta = stack.getItemMeta();
if(meta==null) meta = Bukkit.getItemFactory().getItemMeta(stack.getType());
List<String> lore = (meta.hasLore()? meta.getLore() : new ArrayList<>());

The NPE seems to imply the meta is null, however it is already checked and generated if null - additionally, Item.getItemMeta's code also now performs this same check/construction in spigot-api.

I am really confused by this.

The trace is below:

[15:24:54] [Server thread/ERROR]: Could not pass event EntityDeathEvent to LoreKillCounter v0.0.2-SNAPSHOT
java.lang.NullPointerException: null
	at com.github.crashdemons.lorekillcounter.LoreKillCounter.applyCounterOperation(LoreKillCounter.java:69) ~[?:?]
	at com.github.crashdemons.lorekillcounter.LoreKillCounter.applyCounterOperation(LoreKillCounter.java:77) ~[?:?]
	at com.github.crashdemons.lorekillcounter.LoreKillCounter.onEntityDeathEvent(LoreKillCounter.java:178) ~[?:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor20.execute(Unknown Source) ~[?:?]
	at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.13.2.jar:git-Paper-600]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.13.2.jar:git-Paper-600]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:66) ~[patched_1.13.2.jar:git-Paper-600]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:520) ~[patched_1.13.2.jar:git-Paper-600]
	at org.bukkit.craftbukkit.v1_13_R2.event.CraftEventFactory.callEntityDeathEvent(CraftEventFactory.java:607) ~[patched_1.13.2.jar:git-Paper-600]
	at net.minecraft.server.v1_13_R2.EntityLiving.die(EntityLiving.java:1243) ~[patched_1.13.2.jar:git-Paper-600]
	at net.minecraft.server.v1_13_R2.EntityLiving.damageEntity(EntityLiving.java:1088) ~[patched_1.13.2.jar:git-Paper-600]
	at net.minecraft.server.v1_13_R2.EntityGhast.damageEntity(EntityGhast.java:46) ~[patched_1.13.2.jar:git-Paper-600]
	at net.minecraft.server.v1_13_R2.EntityLargeFireball.a(EntityLargeFireball.java:22) ~[patched_1.13.2.jar:git-Paper-600]
	at net.minecraft.server.v1_13_R2.EntityFireball.tick(EntityFireball.java:81) ~[patched_1.13.2.jar:git-Paper-600]
	at net.minecraft.server.v1_13_R2.World.entityJoinedWorld(World.java:1569) ~[patched_1.13.2.jar:git-Paper-600]
	at net.minecraft.server.v1_13_R2.World.g(World.java:1536) ~[patched_1.13.2.jar:git-Paper-600]
	at net.minecraft.server.v1_13_R2.World.tickEntities(World.java:1343) ~[patched_1.13.2.jar:git-Paper-600]
	at net.minecraft.server.v1_13_R2.WorldServer.tickEntities(WorldServer.java:599) ~[patched_1.13.2.jar:git-Paper-600]
	at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1107) ~[patched_1.13.2.jar:git-Paper-600]
	at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:439) ~[patched_1.13.2.jar:git-Paper-600]
	at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:940) ~[patched_1.13.2.jar:git-Paper-600]
	at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:837) ~[patched_1.13.2.jar:git-Paper-600]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
[15:24:54] [Server thread/INFO]: Etherack has completed the challenge [Return to Sender]

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.