Filled Worldedit and Voxelsniper expansion (BrushInfo)

Discussion in 'Plugin Requests' started by tspierer2, Oct 10, 2018.

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


    Plugin category: world management and editing

    Minecraft version: 1.12.2+

    Suggested name: BrushInfo

    What I want: When you use worldedit //brush or voxelsniper /b I want the tool you're using to be renamed and have a lore of the brush information, that way when you are using multiple brushes in your inventory you know which one is which if you forget. This really helps with creative servers and has not been done before. When you do /none the item name resets back to default. I hope there is a good way to sync the brushes with this plugin instead of having it be renamed based on worldedit commands.

    When holding a diamond shovel and setting it to: //brush sphere grass 5
    name of shovel turns into: &3Sphere &b(5)
    lore of shovel turns into:
    Line 1: &7&m-----------------
    Line 2: &cBrush: &7Sphere
    Line 3: &cPattern: &72:0
    Line 4: &cMask: &7None
    Line 5: &cSize: &75
    Line 8: &7&m-----------------
    Ideas for commands:

    /brushinfo enable/disable (for player)

    -If possible a config for customizing the name and lore of the brushes or at least the colors.

    Ideas for permissions: unnecessary

    When I'd like it by: Yesterday.

    Simple concept but hopefully not difficult to make, thank you all, ask me in the comments if you need me to clarify anything, I know there is a lot more to it than one brush example.
    If this is too much work, I would be very happy with even just the name part, without the whole lore concept.
    Last edited: Nov 20, 2018
  2. Offline


  3. Offline


    Bump 2
  4. Offline


    Hi tspierer2,

    Do you still need it? If so and no one else made it before next weekend, I'll see what i can do.
    (I currently haven't that much time because of exams.)

  5. Offline


    Yes I still very much need it, thank you so much! (no rush, take as much time as you need.)
  6. Offline


    I gave it a try in a short break.
    I couldn't figure out a way to let /brush listen to 2 commandexecutors. (I never used a duplicated commandname before.)
    So I made an extra command /ibrush.
    This command needs the same parameters. (It adds lore to your current item and then executes the same command as /brush.)
    Currently, this command works perfectly for a sphere. The lore and the name are configureable in the config with custom variables.
    Which other commands should absolutely affect the lore for WE and voxelsniper?
    (I'm not familiar with voxelsniper)
    I thought about /brush sphere, /brush cylinder, /brush smooth and /mask but I'm not a good builder so there'll probably much more important commands :D.
    Is the /ibrush (and /ibr) good or should I change it? (Please tell me to change it to something you want, it's fixed in less then a second.)
    Let me know if you want some things to be changed :).

  7. Offline


    ok, don't worry about voxelsniper, let's do only worldedit brushes. the best way to do this is to import the brush type, brush size, pattern and it's set mask from the public api, because if it is a command it will be much more complicated, reason being there are so many different brush commands, some of which don't have the same syntax, and you would have to know if the command was successfully executed. Let's say player 1 did //br sphere stone 5x (5x would be an invalid size and the command wouldn't work.) I think it would be better to do something on command instead of creating a new command. I am not sure what approach you've taken or how it works exactly, but if it gets the job done then I am all for it. Here is a list of all the worldedit brushes:
  8. Offline


    Oke. Do you know how I can import the brush type etc. from the worldedit API? Right now, I'm indeed adding each command and checking for each parameter whether it's valid or not. It would be much easier to just get the information from WE itself, like you said. If i now type /ibrush sphere stone (default size is 2) or /ibrush sphere -h stone 2, then /mask grass_block, then /ibrush sphere sand 5, etc.,it works fine. I can override the short form /br, but not the /brush command. (I have no idea why.) I'm done with my exams next Monday, so from then, I've got much more time to think about it :).


    [Edit] Just found out how I can use the WE methods to get the brush and mask.

    A small update:
    The plugin is now able to detect the brushtype, size and pattern materials from WE.
    I only have to figure out how I can get the mask materials.
    I'll also have to recode it a bit to fit the older version.
    It was quite hard for me to figure it out without correct source-code, so if it's done, I'll change it to the older version to know what I should change.
    Thank you for giving me this experience! This way, I learn much more than just the easy small plugins I made for myself :D.

    Last edited: Dec 15, 2018
  9. Offline


    Awesome, if u ever need help we and fawe has discord server and the devs are active they r helpful. Also, take as much time as u need, i am in no rush at all. Thank you for doing this plugin ❤️

    -- edit
    If u get stuck with the specific settings of the brush, u can try to getBrushTool instead and just set that as lore. BrushTool contains a size, mask, pattern, and the specific brush class (stored in LocalSession). You need to know which item the tool is assigned to - and sessions are per player so you'd need to get the session for that player. Also i think u need to use the FAWE api, as im not sure if worldedit api would work with fawe or 1.12.2 (i could be very wrong)
    Last edited: Dec 13, 2018
  10. Offline


Thread Status:
Not open for further replies.

Share This Page