[MECH/SEC] CreativeStick v0.8 - Build, replace, or remove blocks at a distance [1317]

Discussion in 'Inactive/Unsupported Plugins' started by sunkid, Mar 2, 2011.

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

    sunkid

    CreativeStick
    Build, replace, or remove blocks at a distance

    All updates and project support is now handled on our DevBukkit site!
     
    Rwembee, andrewkm, Freakmiko and 3 others like this.
  2. Offline

    Nijikokun

    The latest version, you told me to test it. I did, and it's laggier than the previous one that I was on, but I don't know that version because I overwrote it..

    In any case, I just forked it. I'm going to clean it up. I'm just going to write my own. This is too cluttered.
     
  3. Offline

    Jandalf

    0.5.3 works fine for me, i think we dont need another splitting-.-
     
    sunkid likes this.
  4. Offline

    sunkid

    Are you on a server by yourself? Do you have drops enabled?

    You're sounding more and more like a concern troll, Niji! Send me an email with some concrete suggestions on how to better organize the code and I would be happy to "clean it up" or explain to you the reason behind the current organization.
     
  5. Offline

    plage

    Nijikokun, I had the same problem (and it looks like others had a similar issue with VoxelSniper), I think the problem lies with Bukkit, not the plugin. From reading elsewhere, it seems it was fixed in version 552 or later, so I'd suggest updating Bukkit and then trying again.

    Since updating to 559, CreativeStick appears to work as intended with no remaining problems.

    I do feel I need to say though that while I greatly appreciate the work by sunkid (and previously by nijikokun), I find myself missing the simplicity of the older stick plugins. With each new author and/or version update, more things get added to the plugin and it loses some of its efficiency and speed. For example, while it's nice that you can multi-function between left and right-clicking, in previous versions where you could build/replace only via right-clicking the action was signifcantly faster. I also miss the ability to swing the stick plainly via the left-click (knocking down torches, tapping on blocks, swinging at your annoying friends on the server, etc) without having to worry about what block it may or may not build/replace.

    My ideal "SimpleStick" would be as follows:

    - all construction actions performed via right-click (in-game toggle via chat commands for deletion/build/replace, similar to -b, -r)
    - config file that enables/disables drops, automatic placement in inventory, etc
    - simple permissions within the plugin (one line of a txt file is all that's needed)
    - left-clicking of the stick (swinging it) remains unchanged from its default action, with one exception, if you hit a monster/animal, it immediately kills it

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  6. Offline

    sunkid

    I like the idea of a "simple mode"! If I understand you correctly, you want it to simply be a long-distance stick with insta-kill powers on mobs!? How would you feel about this simply being a mode?

    In terms of efficiency, the only slow down compared to the code I inherited is probably caused by the compatibility with protection plugins. I was thinking about making this optional, which should speed up performance somewhat, however, I doubt it will be by much.

    All the other additions I made only "complicate" configuration and use somewhat, they shouldn't really affect performance.

    It would be great to hear from others about how they would like to use this plugin and what other features (if any) they would like to see implemented.
     
  7. Offline

    Nijikokun

    I'm not trolling, or anything like that. Your code base is way cluttered and not needed, half of the files don't attribute to the code or are there for testing, and the libraries I don't see a need for including half of the things that are already inside bukkit.

    I've already gotten the entire base done, with 80% less files and a better way of managing history / queue:
    http://eypic.com/sx54e2794.png

    new Stick(player name).history.next();
    new Stick(player name).history.pop();
    new Stick(player name).history.add(block);

    The item database is external instead of internal and now located inside the iStick folder rather than in the main directory or inside the internal code as static; Following suit from General's new item database (Which I re-coded a bit to make it not static and more efficient). The internal's structure is nice until an update where you will have to update multiple lines and such where as this the only changes needed are in files that server owners can add themselves.
     
  8. Offline

    sunkid

    The "item database" is bukkit internal code, so you seem to be contradicting yourself. You should also have a look at the build file: none of the test classes or libraries needed to compile the code are included in the distribution. None of the libraries are included in bukkit and I did not want to make the code dependent on craftbukkit, which is why there are 5 external libraries included on github.

    I am not going to defend having test cases as part of my code. Calling them clutter or not needed is a clear sign of youthful foolishness and you will learn with time that cutting such corners will only make your development cycles longer and more error prone. Actually, I wish it was easier to create test cases for bukkit and I would have many more, if I had my druthers.

    If there are truly pieces of code that replicate what is already in bukkit, I would appreciate pointers to that. You and I both know that bukkit is very fluid and not always organized intuitively. I may well have missed stuff and you certainly know your way around that code better than I do.

    Once you have your code ready and working with both major permission plugins and with protection plugins like AntiGrief, make your code public. It's easy to boast with a screen shot ;)
     
  9. Offline

    Nijikokun

    Re-read my post and then maybe you will understand it, each point you made is far off the base of which I was talking of.
     
  10. Offline

    sunkid

    Let's take this offline as it has nothing to do with the plugin. Send me an email if you have any constructive feedback on the code.
     
  11. Offline

    Astrognome

    This interferes with WorldEdit. It uses /cs already. Could you make it /cstick?
     
  12. Offline

    sunkid

    You can use /is, /cstick, and /istick as alternative aliases.
     
  13. Offline

    Astrognome

  14. Offline

    sunkid

    I am proud to report that my pull request for bukkit was accepted and that the 'log:birch' item selection now actually works (along with the other tree types). :)

    I have also tested CS extensively on a server with other folks logged in and actively mining. I have found no lag issues or other problems. Please let me know if CS still behaves weirdly for you.
     
  15. Offline

    Rilly

    Thanks - this is perfect for removing 'misplaced' TNT ! works great
     
  16. Offline

    sunkid

    Yup! Of course, you can also use it to place TNT, then switch to a flint and steel ('/cs -b FAS') and set the whole pile off from a safe distance ;)
     
  17. Offline

    plage

    I'm having trouble with the permissions, as it seems everyone on the server can use CreativeStick. I don't use groupmanager or another permission system (I've gotten tired of them constantly breaking/updating), instead using the ops list and the built-in permissions in the config.yml file. It'd be greatly appreciated if someone could look over my attached config file and see if I have an error somewhere.
     

    Attached Files:

  18. Offline

    Jandalf

    new CB 561:
    Code:
    2011-03-23 17:35:05 [SEVERE] PLAYER_ITEM loading CreativeStick v0.5.4 (Is it up to date?)
    java.lang.NoSuchFieldError: PLAYER_ITEM
        at com.iminurnetz.bukkit.plugin.creativestick.CSPlugin.registerEvents(Unknown Source)
        at com.iminurnetz.bukkit.plugin.creativestick.CSPlugin.onEnable(Unknown Source)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:453)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:217)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:92)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:70)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:203)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:190)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:130)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:245)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
     
  19. is it possible to destroy more than one block at once?
     
  20. Offline

    sunkid

    The problem was a bug with the handling of CS's own permissions and is now fixed in the latest release. Looking at your permissions, if all those users are ops, they don't need to be listed there at all. And giving them both 'creativestick.use' and 'creativestick.config' is the same as 'creativestick.*'.

    Don't I know it :)

    Unfortunately, the 556 build has some problems, AFAIK (e.g. http://leaky.bukkit.org/issues/592) and I don't think I can support it right now. The double-firing of events is too big of a headache to try to work around and is apparently not intended. If you really want to use this build, you will need to build CS from source, which is updated to work with it.

    Currently, no. That's not to say it couldn't do that though, but I am not sure how to best implement it. Can you give me a use case for this? For example, how many blocks you would want to remove and what kinds of blocks in one go.

    I am hesitant to move too far into the VoxelSniper territory, but I can see how building with multiple blocks or removing more than one block would be of some use.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  21. thought about like:
    XXX
    XXX
    XXX

    at once
     
  22. Offline

    Meldanor

    I've tried your plugin and it workds great.
    But I've found a bug:
    You can specify the color of wool, but not of a log.
    When I tip :
    /cs -r log:birch (or redwood) or set the bits manuel( /cs-r log:1 )
    nothing happens.
     
  23. Offline

    brinck9

    Hey cant you change the size of the replacer?? :)
     
  24. Offline

    sunkid

    This should work as of craftbukkit build 552, as it is an issue with bukkit and not CS. In other words, if you upgrade craftbukkit, wood-type selection should work. Please note that only 552 is supported at the moment, but the latest builds have been less "problematic" and I think I will have something for them by early next week. The code on github should already work but I have to test it more.

    PS: you can work around this by turning on 'right-click-select' and then right-clicking the type of wood you want to build with.

    It's a can of worms in regards to the user interface. That's the part about VoxelSniper that I abhor: it is way too complicated. Changing what is placed or removed in the plugin code is straight forward, but having a simple way for the user to specify 2- or 3-dimensional structures is not. I am open to suggestions though!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  25. Offline

    brinck9

    Okay thanks anyway
     
  26. Offline

    Matty11

    I try to use it with Group Manager and it gets this:
    2011-03-26 17:44:47 [SEVERE] org.anjocaido.groupmanager.GroupManager.getWorldsHolder()Lorg/anjocaido/groupmanager/dataholder/worlds/WorldsHolder; (Is it up to date?)
    java.lang.NoSuchMethodError: org.anjocaido.groupmanager.GroupManager.getWorldsHolder()Lorg/anjocaido/groupmanager/dataholder/worlds/WorldsHolder;
    at com.iminurnetz.bukkit.permissions.PermissionHandlerService.getHandler(Unknown Source)
    at com.iminurnetz.bukkit.plugin.creativestick.CSPermissionHandler.<init>(Unknown Source)
    at com.iminurnetz.bukkit.plugin.creativestick.ConfigurationService.getPermissionHandler(Unknown Source)
    at com.iminurnetz.bukkit.plugin.creativestick.CSPlugin.setup(Unknown Source)
    at com.iminurnetz.bukkit.plugin.creativestick.CSPlugin.onEnable(Unknown Source)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:426)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:79)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:60)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)

    and then group manager does not work or any other pluggins
     
  27. Offline

    the1980man

    I really love this plugin but it seems to me that the plugin is not stable in the long run. I often come to a place when the right-click remove function starts to remove blocks behind the first apperance and recently build blocks is impossible to remove. I also got some error:

    2011-03-26 23:31:28 [SEVERE] Could not pass event PLAYER_ANIMATION to CreativeStick
    java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
    at java.util.ArrayList.rangeCheck(ArrayList.java:571)
    at java.util.ArrayList.get(ArrayList.java:349)
    at com.iminurnetz.bukkit.plugin.creativestick.CSPlayerListener.onPlayerAnimation(Unknown Source)
    at org.bukkit.plugin.java.JavaPluginLoader$13.execute(JavaPluginLoader.java:190)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:699)
    at net.minecraft.server.Packet18ArmAnimation.a(SourceFile:35)
    at net.minecraft.server.NetworkManager.a(SourceFile:230)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)

    I hope this can help you to get an even more stable and better plugin. God luck with the developement!
     
  28. Offline

    Espionage724

    Is it normal for CS to be removing and building 2 blocks at a time?
     
  29. Offline

    sunkid

    Try the new version with the latest recommended build of CraftBukkit. There are still some potential glitches due to how things work inside of CB, but the new version of CS should be a bit more stable.

    It now does limit you to 500 undos by default, which may have been causing the "degrade over time" issue you are reporting (can be configured in config.yml).

    Let me know if you run into these problems again.

    No! However, it's quite possible. ;)

    Seriously, the update I posted should address for most known cases. However, there are some issues outside of CraftBukkits (and by extension, CS's) control, that may still occasionally cause this problem. The latest version tries to address it, please give it a go and let me know how it works!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  30. Offline

    Espionage724

    Yea ever since I started using CS, deleting and building blocks have always done it in 2's (torches would get placed side by side, TnT as well, deleting blocks would go 2 blocks in front of my crosshair, etc)

    Edit: Err, well my fix was simple, I thought it was a good idea to use both CS and CS-Debug at the same time :p (deleted the CS-Debug plugin and now I can do single blocks)
     
  31. Offline

    Black_Jack

    Latest recommended build on the startup:
    Code:
    20:49:31 [SEVERE] PLAYER_INTERACT loading CreativeStick v0.6.0 (Is it up to date
    ?)
    java.lang.NoSuchFieldError: PLAYER_INTERACT
            at com.iminurnetz.bukkit.plugin.creativestick.CSPlugin.registerEvents(Un
    known Source)
            at com.iminurnetz.bukkit.plugin.creativestick.CSPlugin.onEnable(Unknown
    Source)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:451)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:217)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:92)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:70)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    
    On the leftclicking:
    Code:
    20:51:45 [SEVERE] Exception in thread "Thread-5"
    20:51:45 [SEVERE] java.lang.NoClassDefFoundError: org/bukkit/event/player/Player
    InteractEvent
    20:51:45 [SEVERE]       at com.iminurnetz.bukkit.plugin.creativestick.CSPlayerLi
    stener$2.run(Unknown Source)
    20:51:45 [SEVERE]       at java.lang.Thread.run(Unknown Source)
    20:51:45 [SEVERE] Caused by: java.lang.ClassNotFoundException: org.bukkit.event.
    player.PlayerInteractEvent
    20:51:45 [SEVERE]       at java.net.URLClassLoader$1.run(Unknown Source)
    20:51:45 [SEVERE]       at java.security.AccessController.doPrivileged(Native Me
    thod)
    20:51:45 [SEVERE]       at java.net.URLClassLoader.findClass(Unknown Source)
    20:51:45 [SEVERE]       at org.bukkit.plugin.java.PluginClassLoader.findClass(Pl
    uginClassLoader.java:30)
    20:51:45 [SEVERE]       at java.lang.ClassLoader.loadClass(Unknown Source)
    20:51:45 [SEVERE]       at java.lang.ClassLoader.loadClass(Unknown Source)
    20:51:45 [SEVERE]       ... 2 more
    
     
Thread Status:
Not open for further replies.

Share This Page