Spigot PayForDeath 2.5

a death penalty plugin, let your players pay money to keep their inventory and levels on death

  1. KevynTang submitted a new resource:

    PayForDeath-1.6 - let your players pay money to keep their inventory and level on death

    Read more about this resource...
     
  2. [plugin version 1.6] Hi! You mention that versions 1.12 - 1.17 work with this plugin but when I try to load it on 1.16.5 I get:
    (I have also posted an issue like this on the discussion area of your other plugin SwapHotBar, because there appears to be the same issue)

    " [ERROR] .... Could not load 'plugins/PayForDeath-1.6.jar' in folder 'plugins'

    org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.17

    at org.bukkit.craftbukkit.v1_16_R3.util.CraftMagicNumbers.checkSupported(CraftMagicNumbers.java:317) ~[patched_1.16.4.jar:git-Paper-416]

    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[patched_1.16.4.jar:git-Paper-416]

    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:397) ~[patched_1.16.4.jar:git-Paper-416]

    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:305) ~[patched_1.16.4.jar:git-Paper-416]

    at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:389) ~[patched_1.16.4.jar:git-Paper-416]

    at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:206) ~[patched_1.16.4.jar:git-Paper-416]

    at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:935) ~[patched_1.16.4.jar:git-Paper-416]

    at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:173) ~[patched_1.16.4.jar:git-Paper-416]

    at java.lang.Thread.run(Unknown Source) [?:?] "
     
    • Like Like x 1
  3. error!

    [00:15:21 ERROR]: Could not pass event PlayerRespawnEvent to PayForDeath v2.5
    >java.lang.NullPointerException: Cannot invoke "String.replace(java.lang.CharSequence, java.lang.CharSequence)" because "message" is null
    at cn.kevyn.payfordeath.PFDListener.noticePlayer(PFDListener.java:139) ~[PayForDeath-2.5.jar:?]
    at cn.kevyn.payfordeath.PFDListener.onPlayerRespawn(PFDListener.java:121) ~[PayForDeath-2.5.jar:?]
    at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor164.execute(Unknown Source) ~[?:?]
    at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.17.1.jar:git-Paper-257]
    at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.17.1.jar:git-Paper-257]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.17.1.jar:git-Paper-257]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.server.players.PlayerList.moveToWorld(PlayerList.java:913) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.server.players.PlayerList.moveToWorld(PlayerList.java:817) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.server.players.PlayerList.moveToWorld(PlayerList.java:812) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2541) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.network.protocol.game.PacketPlayInClientCommand.a(PacketPlayInClientCommand.java:24) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.network.protocol.game.PacketPlayInClientCommand.a(PacketPlayInClientCommand.java:6) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$ensureRunningOnSameThread$1(PlayerConnectionUtils.java:56) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.server.TickTask.run(TickTask.java:18) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.util.thread.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:149) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.executeTask(IAsyncTaskHandlerReentrant.java:23) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:1418) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:192) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.util.thread.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:122) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.server.MinecraftServer.bf(MinecraftServer.java:1396) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.server.MinecraftServer.executeNext(MinecraftServer.java:1389) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.util.thread.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:132) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.server.MinecraftServer.sleepForTick(MinecraftServer.java:1367) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1278) ~[patched_1.17.1.jar:git-Paper-257]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[patched_1.17.1.jar:git-Paper-257]
    at java.lang.Thread.run(Thread.java:831) [?:?]
     
  4. All right so show your config file to me first
     
  5. java 16
    paper 1.17.1 #257
    vault 1.7.3
    EssentialsX 2.19.0
    Luckperms v5.3.67

    Config:

    default:
    enable: false
    # formulas
    # supported operations: + - * / ()
    # placeholders you can use:
    # [lv] : the player's level
    # [bal] : the player's balance
    # invalid formula will always return 0.0
    # see the [exampleResourceWorld] below for an example
    deduct-formula: 0
    # -1 to switch off this check
    upper-limit-formula: -1
    keep-inventory: false
    keep-level: false
    clear-instead-of-drop: false
    notice-by-action-bar: false
    notice-by-console: false
    # placeholders you can use in messages:
    # [player] : the player's name
    # [death-world] : the world the player death
    # [respawn-world] : the world the player respawn
    # [ransom] : the money deducted
    # [old-balance] : the player's balance before the deduction
    # [new-balance] : the player's balance after the deduction
    kept-message: §l§byou paid §e$[ransom]§b, inventory and levels kept。now u have §e$[new-balance] §9^_^
    unkept-message: §l§cyou didn't have §e$[ransom]§c, inventory and levels lost in §e[death-world] §9x_x
    exempt-message: §l§eyou have the privilege to keep items and levels for free in §e[death-world] §9^_^

    # write your world-specific config below
    # just write the settings you want to override in this world
    # missing settings will read from default
    exampleResourceWorld:
    enable: true
    deduct-formula: 10 + 10 * [lv]
    upper-limit-formula: 10 + 0.5 * [bal]
    keep-inventory: true
    keep-level: true
    notice-by-action-bar: true

    exampleMainWorld:
    enable: true
    keep-inventory: true
    keep-level: true
    notice-by-action-bar: true
    kept-message: §l§bFree to keep all things in main world §9^_^

    exampleDangerWorld:
    enable: true
    notice-by-action-bar: true
    kept-message: §l§cpay for death is not allowed in this world §9c_c
     
  6. in my test, PayForDeath 2.5 work well on paper 1.17 server
    upload_2021-9-12_0-35-46.png
    upload_2021-9-12_0-35-29.png

    so i don't know what exactly happened on your server
    maybe you could tell me what you have done after dragging the jar to your plugins folder, did you create the config file yourself? or you have done some modifications in the auto-generated config file? And pay attention to one thing: the INDENT is very important in the config file, have you kept the indent?
     


  7. I think maybe because this plugin is not working:

    AngelChest:
    https://www.spigotmc.org/resources/angelchest-free.60383/

    ReviveMe:
    https://www.spigotmc.org/resources/reviveme-beta.78184/
     
  8. I don't think so. Generally, these plugins and PayForDeath would not have any mutual impact. And I cannot see Vault on the plugin list picture you attached, please make sure you have installed Vault correctly, and hope you can finally successfully use PFD on your server.
    more detials are needed if you need further assistance.
     
    #12 KevynTang, Sep 12, 2021
    Last edited: Sep 12, 2021
  9. i have installed the vault plugin in the lastest version and i didn't change anything in the vault plugin file [default]
     
  10. Tried on 1.18 and nothing worked, received only these errors:
    using the paper experimental build

    Please update for 1.18 :)
    Holding the players items and experience ransom for ingame $$$ is a great fun game mechanic.



    09.12 10:28:55 [Server] ERROR Could not pass event PlayerRespawnEvent to PayForDeath v2.5
    09.12 10:28:55 [Server] INFO java.lang.NullPointerException: Cannot invoke "String.replace(java.lang.CharSequence, java.lang.CharSequence)" because "message" is null
    09.12 10:28:55 [Server] INFO at cn.kevyn.payfordeath.PFDListener.noticePlayer(PFDListener.java:139) ~[PayForDeath-2.5.jar:?]
    09.12 10:28:55 [Server] INFO at cn.kevyn.payfordeath.PFDListener.onPlayerRespawn(PFDListener.java:121) ~[PayForDeath-2.5.jar:?]
    09.12 10:28:55 [Server] INFO at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor31.execute(Unknown Source) ~[?:?]
    09.12 10:28:55 [Server] INFO at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[paper-api-1.18-R0.1-SNAPSHOT.jar:?]
    09.12 10:28:55 [Server] INFO at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-api-1.18-R0.1-SNAPSHOT.jar:git-Paper-23]
    09.12 10:28:55 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.18-R0.1-SNAPSHOT.jar:?]
    09.12 10:28:55 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-api-1.18-R0.1-SNAPSHOT.jar:?]
    09.12 10:28:55 [Server] INFO at net.minecraft.server.players.PlayerList.respawn(PlayerList.java:912) ~[paper-1.18.jar:git-Paper-23]
    09.12 10:28:55 [Server] INFO at net.minecraft.server.players.PlayerList.respawn(PlayerList.java:815) ~[paper-1.18.jar:git-Paper-23]
    09.12 10:28:55 [Server] INFO at net.minecraft.server.players.PlayerList.respawn(PlayerList.java:810) ~[paper-1.18.jar:git-Paper-23]
    09.12 10:28:55 [Server] INFO at net.minecraft.server.network.ServerGamePacketListenerImpl.handleClientCommand(ServerGamePacketListenerImpl.java:2498) ~[?:?]
    09.12 10:28:55 [Server] INFO at net.minecraft.network.protocol.game.ServerboundClientCommandPacket.handle(ServerboundClientCommandPacket.java:24) ~[?:?]
    09.12 10:28:55 [Server] INFO at net.minecraft.network.protocol.game.ServerboundClientCommandPacket.handle(ServerboundClientCommandPacket.java:6) ~[?:?]
    09.12 10:28:55 [Server] INFO at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:56) ~[?:?]
    09.12 10:28:55 [Server] INFO at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.18.jar:git-Paper-23]
    09.12 10:28:55 [Server] INFO at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:149) ~[?:?]
    09.12 10:28:55 [Server] INFO at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[?:?]
    09.12 10:28:55 [Server] INFO at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1412) ~[paper-1.18.jar:git-Paper-23]
    09.12 10:28:55 [Server] INFO at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:189) ~[paper-1.18.jar:git-Paper-23]
    09.12 10:28:55 [Server] INFO at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:122) ~[?:?]
    09.12 10:28:55 [Server] INFO at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1390) ~[paper-1.18.jar:git-Paper-23]
    09.12 10:28:55 [Server] INFO at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1383) ~[paper-1.18.jar:git-Paper-23]
    09.12 10:28:55 [Server] INFO at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:110) ~[?:?]
    09.12 10:28:55 [Server] INFO at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1517) ~[paper-1.18.jar:git-Paper-23]
    09.12 10:28:55 [Server] INFO at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1263) ~[paper-1.18.jar:git-Paper-23]
    09.12 10:28:55 [Server] INFO at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[paper-1.18.jar:git-Paper-23]
    09.12 10:28:55 [Server] INFO at java.lang.Thread.run(Thread.java:833) ~[?:?]
    09.12 10:29:15 [Plugin Installation] Removing plugin spigot/94328
    09.12 10:29:15 [Plugin Installation] Removing files for plugin spigot/94328
    09.12 10:29:15 [Plugin Installation] Removed file PayForDeath-2.5.jar
    09.12 10:29:15 [Plugin Installation] Plugin spigot/94328 removed.
    09.12 10:29:47 [Server] INFO CONSOLE issued server command: /list

    Clear log
     
    #14 Archie978, Dec 9, 2021
    Last edited: Dec 9, 2021