Linked (Simple)

Discussion in 'Plugin Requests' started by bryansolis13, Aug 7, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    bryansolis13

    Plugin category: Fun

    Suggested name: Linked

    What I want: Linked is a plugin that links all players health and food together, so if one player takes damage all players take damage, if one player regains a heart all players regain a heart. If someone eats food all players food bar goes up.

    P.S: I need this to work for 1.7.10

    Ideas for permissions: No permissions

    When I'd like it by: Whenever you can do it, Preferably today.
     
    danieldirosa likes this.
  2. Offline

    bryansolis13

    bump

    Can anyone do it?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 11, 2016
  3. Offline

    Keubix

    I can do this when I get home.
     
  4. Offline

    bryansolis13

    Thanks for helping
     
  5. Offline

    Nokoa

    Would this make all the players have the same amount of food, and health, if someone dies should they all die too?
     
  6. Offline

    bryansolis13

    Yes
     
  7. Offline

    Keubix

  8. Offline

    bryansolis13

    The Food works but not the hearts

    It only detects if one of the player takes damage not the other

    so player1 takes damage it damages player2
    but if player2 takes damage player1 dosent

    Edit:
    P.s Im testing fall damage and player hitting and thats the bug

    A bug that i found if both players die and one respawn's it glitches the other

    EDIT by Timtower: merged posts
     
    Last edited by a moderator: Aug 9, 2015
  9. Offline

    Keubix

    How does it glitch the other? Please provide more details so I can fix it.
     
  10. Offline

    bryansolis13

    When player1 takes fall damage it damages player2
    but when player2 takes fall damage it dosent damage player1
     
  11. Offline

    Nokoa

    Hmm, the food level works fine, but the damage doesn't seem to. When I first hit a player both player's health goes up to max, then starts to go down.

    EDIT: I think you should add a death listener as when one player drowns the other will have 1/20 hearts.
     
  12. Offline

    bryansolis13

    Ya that's pretty much the same thing i wonder if i get a instant re-spawn plugin will help with the re-spawn glitch
     
  13. Offline

    bryansolis13

    @Keubix How are the bugs going?
     
  14. Offline

    Keubix

    @bryansolis13 Sorry, I have been busy with school starting up, I can finish it soon though.
     
  15. Offline

    bryansolis13

    @Keubix Thank you, i completely understand
     
  16. Offline

    bryansolis13

    Can anyone else go off @Keubix code and see if they can fix the bugs
     
  17. Offline

    Keubix

    Sorry, I have been way to busy with working on my own plugins for my server, and school. Here is the source code.
    http://pastebin.com/gYu66tV0
     
  18. Offline

    bryansolis13

    @Keubix its ok and thanks for the source code
     
  19. Offline

    timtower Administrator Administrator Moderator

    @bryansolis13 Will do this maybe, I don't guarantee anything.
     
  20. Offline

    bryansolis13

    timtower likes this.
  21. Offline

    bryansolis13

  22. Offline

    timtower Administrator Administrator Moderator

    @bryansolis13 Not yet, was busy with school stuff that had to be done first.

    @bryansolis13 Done, LinkedLifeLikeMe, link is in my signature, untested.
    Let me know if there are any issues.
     
    Last edited: Aug 19, 2015
  23. Offline

    bennyman123abc

    I will start developing the plugin since no one else seems to be able to. Seems like fun and I have a great idea for a minigame with this :D

    EDIT: I didn't see that Tim had finished the plugin. May I request permission to make something similar?
     
  24. Offline

    timtower Administrator Administrator Moderator

  25. Offline

    bryansolis13

    @timtower i testing it out the food works but the health is still not perfect but its acceptable since health is harder. May i ask what did u build this with since im getting thrown errors.

    @bennyman123abc I would love to see the mini-game u make with this

    @timtower Here is the error

    Code:
    [11:38:55 ERROR]: Could not pass event EntityRegainHealthEvent to LinkedLifeLikeMe v0.0.1
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:305) ~[craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.EntityLiving.heal(EntityLiving.java:667) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.FoodMetaData.a(FoodMetaData.java:65) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.EntityHuman.t_(EntityHuman.java:223) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.EntityPlayer.l(EntityPlayer.java:285) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.PlayerConnection.a(PlayerConnection.java:382) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.PacketPlayInFlying.a(SourceFile:126) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.PacketPlayInFlying.a(SourceFile:8) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.PlayerConnectionUtils$1.run(SourceFile:13) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_51]
            at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_51]
            at net.minecraft.server.v1_8_R2.SystemUtils.a(SourceFile:60) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.MinecraftServer.A(MinecraftServer.java:712) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.DedicatedServer.A(DedicatedServer.java:368) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.MinecraftServer.z(MinecraftServer.java:651) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.MinecraftServer.run(MinecraftServer.java:554) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_51]
    Caused by: java.lang.IllegalArgumentException: Health must be between 0 and 20.0
            at org.bukkit.craftbukkit.v1_8_R2.entity.CraftLivingEntity.setHealth(CraftLivingEntity.java:83) ~[craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at nl.timdebrouwer.linkedlifelikeme.LinkedLifeLikeMe.update(LinkedLifeLikeMe.java:40) ~[?:?]
            at nl.timdebrouwer.linkedlifelikeme.LinkedLifeLikeMe.updateAll(LinkedLifeLikeMe.java:35) ~[?:?]
            at nl.timdebrouwer.linkedlifelikeme.LinkedLifeLikeMe.onHealthRegen(LinkedLifeLikeMe.java:68) ~[?:?]
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51]
            at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_51]
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301) ~[craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            ... 19 more
    [11:38:59 ERROR]: Could not pass event EntityRegainHealthEvent to LinkedLifeLikeMe v0.0.1
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:305) ~[craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.EntityLiving.heal(EntityLiving.java:667) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.FoodMetaData.a(FoodMetaData.java:65) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.EntityHuman.t_(EntityHuman.java:223) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.EntityPlayer.l(EntityPlayer.java:285) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.PlayerConnection.a(PlayerConnection.java:382) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.PacketPlayInFlying.a(SourceFile:126) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.PacketPlayInFlying.a(SourceFile:8) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.PlayerConnectionUtils$1.run(SourceFile:13) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_51]
            at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_51]
            at net.minecraft.server.v1_8_R2.SystemUtils.a(SourceFile:60) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.MinecraftServer.A(MinecraftServer.java:712) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.DedicatedServer.A(DedicatedServer.java:368) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.MinecraftServer.z(MinecraftServer.java:651) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.MinecraftServer.run(MinecraftServer.java:554) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_51]
    Caused by: java.lang.IllegalArgumentException: Health must be between 0 and 20.0
            at org.bukkit.craftbukkit.v1_8_R2.entity.CraftLivingEntity.setHealth(CraftLivingEntity.java:83) ~[craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at nl.timdebrouwer.linkedlifelikeme.LinkedLifeLikeMe.update(LinkedLifeLikeMe.java:40) ~[?:?]
            at nl.timdebrouwer.linkedlifelikeme.LinkedLifeLikeMe.updateAll(LinkedLifeLikeMe.java:35) ~[?:?]
            at nl.timdebrouwer.linkedlifelikeme.LinkedLifeLikeMe.onHealthRegen(LinkedLifeLikeMe.java:68) ~[?:?]
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51]
            at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_51]
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301) ~[craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            ... 19 more
    [11:39:00 ERROR]: Could not pass event EntityRegainHealthEvent to LinkedLifeLikeMe v0.0.1
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:305) ~[craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.EntityLiving.heal(EntityLiving.java:667) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.FoodMetaData.a(FoodMetaData.java:65) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.EntityHuman.t_(EntityHuman.java:223) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.EntityPlayer.l(EntityPlayer.java:285) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.PlayerConnection.a(PlayerConnection.java:382) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.PacketPlayInFlying.a(SourceFile:126) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.PacketPlayInFlying$PacketPlayInPosition.a(SourceFile:57) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.PlayerConnectionUtils$1.run(SourceFile:13) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_51]
            at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_51]
            at net.minecraft.server.v1_8_R2.SystemUtils.a(SourceFile:60) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.MinecraftServer.A(MinecraftServer.java:712) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.DedicatedServer.A(DedicatedServer.java:368) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.MinecraftServer.z(MinecraftServer.java:651) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.MinecraftServer.run(MinecraftServer.java:554) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_51]
    Caused by: java.lang.IllegalArgumentException: Health must be between 0 and 20.0
            at org.bukkit.craftbukkit.v1_8_R2.entity.CraftLivingEntity.setHealth(CraftLivingEntity.java:83) ~[craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at nl.timdebrouwer.linkedlifelikeme.LinkedLifeLikeMe.update(LinkedLifeLikeMe.java:40) ~[?:?]
            at nl.timdebrouwer.linkedlifelikeme.LinkedLifeLikeMe.updateAll(LinkedLifeLikeMe.java:35) ~[?:?]
            at nl.timdebrouwer.linkedlifelikeme.LinkedLifeLikeMe.onHealthRegen(LinkedLifeLikeMe.java:68) ~[?:?]
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51]
            at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_51]
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301) ~[craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            ... 19 more
    [11:39:04 ERROR]: Could not pass event EntityRegainHealthEvent to LinkedLifeLikeMe v0.0.1
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:305) ~[craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.EntityLiving.heal(EntityLiving.java:667) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.FoodMetaData.a(FoodMetaData.java:65) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.EntityHuman.t_(EntityHuman.java:223) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.EntityPlayer.l(EntityPlayer.java:285) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.PlayerConnection.a(PlayerConnection.java:382) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.PacketPlayInFlying.a(SourceFile:126) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.PacketPlayInFlying.a(SourceFile:8) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.PlayerConnectionUtils$1.run(SourceFile:13) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_51]
            at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_51]
            at net.minecraft.server.v1_8_R2.SystemUtils.a(SourceFile:60) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.MinecraftServer.A(MinecraftServer.java:712) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.DedicatedServer.A(DedicatedServer.java:368) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.MinecraftServer.z(MinecraftServer.java:651) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at net.minecraft.server.v1_8_R2.MinecraftServer.run(MinecraftServer.java:554) [craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_51]
    Caused by: java.lang.IllegalArgumentException: Health must be between 0 and 20.0
            at org.bukkit.craftbukkit.v1_8_R2.entity.CraftLivingEntity.setHealth(CraftLivingEntity.java:83) ~[craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            at nl.timdebrouwer.linkedlifelikeme.LinkedLifeLikeMe.update(LinkedLifeLikeMe.java:40) ~[?:?]
            at nl.timdebrouwer.linkedlifelikeme.LinkedLifeLikeMe.updateAll(LinkedLifeLikeMe.java:35) ~[?:?]
            at nl.timdebrouwer.linkedlifelikeme.LinkedLifeLikeMe.onHealthRegen(LinkedLifeLikeMe.java:68) ~[?:?]
            at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) ~[?:?]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51]
            at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_51]
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301) ~[craftbukkit.jar:git-Spigot-2ec6f06-7722428]
            ... 19 more
    EDIT by Timtower: merged posts
     
    Last edited by a moderator: Aug 21, 2015
  26. Offline

    timtower Administrator Administrator Moderator

    @bryansolis13 Just with Bukkit, forgot a limit. Redownload for the updated version.
     
  27. Offline

    danieldirosa

    This plugin has great potential. May I suggest adding a functionality to set different groups/teams of players to be linked separately.
     
  28. Offline

    bennyman123abc

    That's what I was thinking of doing for maybe a sort of UHC Game. Maybe regen although that wouldn't be UHC. I don't know what I will do in the end but I will definitely improve/come up with something :)
     
    danieldirosa likes this.
  29. Offline

    LolDragonFire

    Done ^^ I created the plugin and it should work as expected (Tested it with 2 players on a test server (offline mode))
    Look at LinkedFates. Edit: Already uploaded a version 1.1 which fixes some little bugs and adds a config option to link the health/hunger of the whole server.

    LolDragonFire

    Btw I didn't check if it works on 1.7.9.. I don't know which parts of the api changed a lot between the two versions but you could try it if it works on 1.7.9
     
    Last edited: Aug 22, 2015
Thread Status:
Not open for further replies.

Share This Page