PlayerMagnet
PlayerMagnet is a simple plugin that describes itself. It offers a solution for the players who enjoy having the magnet feature from popular modpacks. When a player enables it, any items on the ground within a configurable amount of blocks will be pulled towards the player to be picked up.
Commands
- /magnet <on|off> - This turns the magnet on or off.
Configuration
- max-distance - This is the max distance that a block can be for a player to be able to pick it up. [Default is 8]
Permissions
- playermagnet.magnet - Will allow the use of the magnet command.
Works on 1.18.1
Works on 1.17
edit: Work on 1.18.x, 1.19.x, 1.20.x
Still works on 1.16.4 - thx :)
Works on 1.12 :)
Works on 1.10.2 :)
@Yorkforce
Its easy to fix:
Just put that bit of code before the final '}'
EDIT: Nop. I had to edit the functions.
This also works on 1.9 :)
And to point out I seen a comment on the other page with this mod that it works on at least 1.8.8 too incase that helps anyone else out... :)
Works on 1.9 as well...sweeeeet
Works even for my 1.8.1 (papicraft.mcalias.com) server!
Holy cow, I love this plugin.
A suggestion is to specify the radius by using /magnet <number> and you can set the max radius by using permissions. playermagnet.magnet.<number>
Does anyone get the occasional 'magnet ghost' left in certain places? Its like a player leaves behind thier magnet ability and everything that's thrown gets sucked towards these certain spots.
I highly doubt this plugin will ever be touched again, but my players love it and it occasionally just stops working, no errors in console, no logs, just stops altogether for all players.
@BChauv
In response to offered functions, I would like to add my desire for the following:
Per-player On/Off state saving
Automatically setting player to previous magnet on/off state
Another feature that might be desirable would be the option of a default state, provided a player meets the permission requirement.
Video Tutorial on the Plugin
https://www.youtube.com/watch?v=r-DT4lOdn4g
Credits: (AbsintoJ/PlayerMagnet)
Please, add support to Magnet Players!
@urworst
Ah you are correct! I just uploaded v1.01 to fix this issue but it needs approval. If you still experience problems after trying this new version please let me know and I will work it out ASAP.
PS: Thanks for using the plugin!
Hi I really like this plugin but am having a problem with it, I think it has to do with multivers I have several worlds, not including the normal mc ones faction,supplies,tntfriendy,builder here is the error 10:48:34 [WARNING] [PlayerMagnet] Task #10 for PlayerMagnet v1.0 generated an exception java.lang.IllegalArgumentException: Cannot measure distance between faction and supplies at org.bukkit.Location.distanceSquared(Location.java:381) at org.bukkit.Location.distance(Location.java:364) at com.bryanchauvin.playermagnet.PlayerMagnet$ItemSearch.run(PlayerMagnet.java:97) at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftTask.run(CraftTask.java:53) at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:524) at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227) at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488) at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421) at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
@AcePlugins
I'm also going to make one soon :)
I shall make you a cool youtube video and send the code to embedd
@GregoriusMC
Very cool, thanks for letting me know about this! Also I am glad you got it working. Let me know if you have any other issue with it.
@BChauv
Okay, it works now.
P.S : VariationVault made a video on this plugin :D http://www.youtube.com/watch?v=l-vmpzajjTY