[Inactive] [EDIT] PaintingSwitch v0.4 - Scroll through paintings [1185]

Discussion in 'Inactive/Unsupported Plugins' started by MadMonkeyCo, Jul 4, 2011.

  1. Offline


    This plugin was originally created by Edward Hand (credits go to him!) but I updated it due to a request. It simplifies the selecting of paintings and saves alot of time. Permissions are supported.

    • Allows you to scroll through paintings by aiming at them and using the mouse wheel.
    • Permissions support ("PaintingSwitch.use").
    • Configurable!
    • useSneak: If set to true (default) it will only switch paintings if you sneak, false means it will only switch paintings if you are not sneaking.
    • itemID: If set to -1 (default) it will switch paintings no matter what item you have in hand. Otherwise it will only scroll when you have the specified item in hand. I have yet to find a way to make sure you don't switch items when using this function.
    Version 0.4
    • Permissions are once again supported :)
    Version 0.3
    • Added a configuration file.
    • Option to use sneak and a certain item in hand.
    • No permissions with the 1.8 update. :(
    Version 0.2
    • Permissions support!
    Version 0.1
    • Re-releasing this awesome plugin.
  2. Offline


    ya same here you get the error (in the server window) that I posted above
  3. Offline


    Any alternative to this plugin?
  4. Offline


    Sadly it looks like this is abandoned... too bad too I used this a ton! So, I redesigned and totally rewrote it. It was linking into far too much net.mincraft and very little of it was with the bukkit api. So, I converted it to totally use the bukkit api. It was just too easy to break before.

    The basic idea is the same, but instead of crouching you right click on a painting and scroll through the painting. If you right click again or look away from the painting the plugin disengages control.

    The only piece of code I saved out of the entire source was:
            if (((previousSlot == 0) && (newSlot == 8)) || ((previousSlot == 8) && (newSlot == 0))) {
                reverse = !reverse;

    <shrugs> anyway, I'll be putting up a submission maybe tomorrow for bukkitdev. But here is a quick update for now:

    Permissions support is GroupManager, BukkitPerms, niji based permissions.

    The only node is: neopaintingswitch.use

    Let paintingswitch live on! :)

    Submission page up here
    RGadelha and khamseen_air like this.
  5. Offline


    You, my friend get free cookies* for life!

    *The cookies are not real.

    Edit: I believe you've uploaded the wrong file, its a zip not a jar file.
  6. Offline


    Just rename de zip to jar.
  7. Offline


    This is what I did yeah, though some people don't know how to rename file extensions. :)
  8. Offline


    It saves
  9. Offline


    yea, sorry, either Opera or the forum wouldn't let me upload a jar file :-/

    Just rename it like you said. When I get the bukkit dev page up it will be jar again...

    Submission page up here
    khamseen_air likes this.
  10. Offline


    05:53:42 [WARNING] Task of 'PaintingSwitch' generated an exception
    java.lang.NoSuchMethodError: net.minecraft.server.EntityPainting.i()Z
    at is.madmonkeyco.PaintingSwitch.PaintingRespawner.run(PaintingRespawner.java:27)
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:493)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
  11. Offline

    Celtic Minstrel

    To be fair, I didn't implement the Bukkit API for this until after this plugin was released. ;)

    @ScottSpittle – Go here
  12. Offline


    Not trying to be unfair to any party. After looking at the source for this it was a incredible piece of work digging into all that obfuscated code to tease out the needed hooks.. :confused:

    I actually made an attempt to retrace how it worked with the "a" methods and the "b" classes and the "c" that aint going to work.... but damned if it didnt stump me. So, a rewrite.. :)

    Guess it takes a special kind of augmented human to get something like that working. Jeez... I'm glad the api was updated to include methods for just this kind of plugin. I have more then a few houses that... well lets just say would take days of random painting swapping to get to look right. This plugin was a UBER time saver. I couldnt let it die. Needed it too much. Seriously, it was inconceivable to let it die.
  13. Offline


    Just checked my server logs before performing my daily restart and noticed that even though the plugin is doing what it's meant to, it's logging this every time it's used.

    [SEVERE] Could not pass event PLAYER_MOVE to neoPaintingSwitch[/LEFT]
    [LEFT]java.lang.IllegalStateException: Start block missed in BlockIterator[/LEFT]
    [LEFT]	at org.bukkit.util.BlockIterator.<init>(BlockIterator.java:167)[/LEFT]
    [LEFT]	at org.bukkit.util.BlockIterator.<init>(BlockIterator.java:254)[/LEFT]
    [LEFT]	at org.bukkit.util.BlockIterator.<init>(BlockIterator.java:289)[/LEFT]
    [LEFT]	at org.bukkit.craftbukkit.entity.CraftLivingEntity.getLineOfSight(CraftLivingEntity.java:85)[/LEFT]
    [LEFT]	at org.bukkit.craftbukkit.entity.CraftLivingEntity.getTargetBlock(CraftLivingEntity.java:111)[/LEFT]
    [LEFT]	at plugin.arcwolf.neopaintingswitch.npPlayerEvent.onPlayerMove(npPlayerEvent.java:54)[/LEFT]
    [LEFT]	at org.bukkit.plugin.java.JavaPluginLoader$7.execute(JavaPluginLoader.java:307)[/LEFT]
    [LEFT]	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)[/LEFT]
    [LEFT]	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)[/LEFT]
    [LEFT]	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:182)[/LEFT]
    [LEFT]	at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:679)[/LEFT]
    [LEFT]	at net.minecraft.server.Packet10Flying.a(SourceFile:126)[/LEFT]
    [LEFT]	at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)[/LEFT]
    [LEFT]	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:93)[/LEFT]
    [LEFT]	at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:550)[/LEFT]
    [LEFT]	at net.minecraft.server.NetworkListenThread.a(SourceFile:108)[/LEFT]
    [LEFT]	at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527)[/LEFT]
    [LEFT]	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)[/LEFT]
    [LEFT]	at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
  14. Offline


    strange... been using it for weeks now and havent seen that before. I'll have to look into it later today. Seems as though the bug is starting in the BlockIterator from bukkit. And my plugin is getting caught up in the problem. Seeings as how the only line of code that is in my plugin is mentioned like 9 lines down and is related to "block.equals(player.getTargetBlock(null, 100))"

    That little piece of code is straight up bukkit api there. I see you have spout loaded. Maybe something to do with that? IDK, I dont use spout. I'll investigate and get back to you..​

    One other think. Please post bug reports or questions on the new thread I made for neoPaintingSwitch. I dont check this thread.​


    I'm not sure how I can fix this TBO. It seems like its a bukkit bug... or spout bug. The problem lies in the iteration located in CraftLivingEntity.getTargetBlock method. Something is going wrong up the chain from my plugin it seems. I'm not even sure if I place this in a try catch block and let it fail silently would at least shut it up :).​

    Because its happening before my plugin gets the message. I make the call but the call fails up inside bukkit and throws an exception I dont know if I can catch. :-/ hmmmm very odd.​

    Strokes beard....​
    khamseen_air likes this.
  15. Offline


    Very strange indeed, what's more strange is that I can't get it to do it again after the server restart. I shall keep an eye on it though and if anything shows up again I'll post it in the new thread, don't know why I forgot about that thread haha. Thanks for looking into it though. :)
  16. Offline

    Celtic Minstrel

    You're welcome. ;)
  17. Offline


    I could take over this project if anybody wanted.. But for some reason when the Player Item Held event doesn't seem to fire anymore.. hmm
  18. Offline


  19. Offline

    Celtic Minstrel

Share This Page