Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
Avatar for kennytv

Visualize your WorldEdit selection with particles!

Report WorldEditSUI?

About This Plugin

Broad overview

  • This plugin visualizes your current WorldEdit selection with some fancy particles!
  • You can customize the shown particle effect, their amount and enable an advanced grid (useful for bigger selections). To take a look at other options, look at the configuration section below! Covered are cuboid, spherical, ellipsoid, cylinder and 2D polygonal selections (see below for examples).
  • One of the other features is the display of your copied selection (of //copy), which can be toggled with the WESUI command. You can also show a specific WorldGuard region by using the /wesui showregion command

If you want to run this plugin on a 1.8.x server, you have to download a legacy version from the GitHub Releases page!

Motivation

... This plugin mimics the functionality of the popular WorldEditCUI client mod, but running as a serverside plugin, so that you/your users do not need to install any mods. The main difference I wanted to achieve compared to similar plugins is on simplicity, performance and memory impact by choosing a rather simplistic and direct approach to calculating vectors, but you can check these for yourself.

Compatibility

This plugin works with the following versions and forks of WorldEdit:

Commands

Available commands and their permissions are: \

  • /wesui - wesui.command
  • /wesui reload - wesui.command.reload
  • /wesui toggle - wesui.command.toggle
  • /wesui toggleclipboard - wesui.command.toggleclipboard
  • /wesui showregion <region> - wesui.command.showregion

wesui.maxselectionsize.bypass - bypass the selection size limit set in the config

Examples

Cuboid selection with advanced-grid enabled https://i.imgur.com/5UrVtfk.jpeg

Sphere/ellipsoid selection https://i.imgur.com/cWynlK6.jpeg

2D poly selection https://i.imgur.com/o2VIAvC.jpeg

Support

Found any bugs or want a new feature? Join my Discord guild.

Configuration

# If enabled, the positions for particles will only be calculated once per selection and then cached.
# This essentially entirely removes the higher CPU usage of the calculations, but results in some caching if many/big selections are being made.
#
# Disable this if you run into concurreny errors.
cache-calculated-positions: true

# A list of all particles can be found here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Particle.html
# Just note that newly introduced particles obviously won't work in older versions.
# Shown for the selection you currently have.
#
# If you want to use a particle that requires extra data (REDSTONE, FALLING_DUST, BLOCK_DUST, BLOCK_CRACK, ITEM_CRACK),
# you can read up on how to do that at the bottom of the plugin's Spigot page.
# The same applies to per-particle view-distance, speed, and offsets.
particle: FLAME
# Shown for the clipboard (after using WorldEdit's //copy command).
# Can be enabled with the '/wesui toggleclipboard' command.
clipboard-particle: VILLAGER_HAPPY
# Shown for the WG region view (when using '/wesui showregion <region>').
wg-region-particle: VILLAGER_HAPPY

# How many particles should be displayed for every block of length.
# The recommended amount is between 2 and 4. Can be set from 1 to 5.
particles-per-block: 3

# This number determines how many ticks should be between every sending of particles.
# Can be set from 5 to 200.
# For reference: 20 Minecraft ticks are equivalent to 1 second -> 10 ticks are 0.5 seconds -> 1 tick is 0.05 seconds.
particle-send-interval: 12

# Max ping a player can have before particles are no longer sent - this option only works on Paper servers.
# Set this to -1 to disable.
max-ping: 150

# Selecting giant areas may result in a high cpu usage or server lag.
# This limits the maximum number of blocks that can be displayed (default is 10 million, ~250*150*250 blocks).
# You could still go even higher if they can only be used by trusted people.
max-selection-size-to-display: 10_000_000
# If set to true, players with the 'wesui.maxselectionsize.bypass' permission ignore the limit from above.
enable-max-selection-bypass-perm: true

advanced-grid:
  # If enabled, the selection will not only be displayed by the outline,
  # but also with a grid between the outlines (the bigger the selection, the bigger the grid).
  # Requires more or less 2 to 3 times the amount of calculations, but looks amazing!
  enabled: false
  # How many particles should be displayed for every block of length.
  # The recommended amount is between 2 and 3. Can be set from 2 to 5.
  particles-per-block: 2

advanced-clipboard-grid:
  # You can also enable the grid for the clipboard view.
  # Same as advanced-grid settings, but for the clipboard.
  enabled: false
  particles-per-block: 2

advanced-wg-region-grid:
  # You can also enable the grid for the WG region view by using the '/wesui showregion <region>' command.
  # Same as advanced-grid settings, but for the WorldGuard regions.
  enabled: false
  particles-per-block: 2

particle-expiry:
  # If enabled and a selection isn't changed for the given amount of seconds, particles will stop being sent for it
  enabled: false
  expires-after-seconds: 180
  # If enabled, players are notified if their particles disappear after the expiry.
  expire-message: true

# If set to 'none', every player will have their selection displayed.
# Else, only players with the set permission will have particles for their selection.
permission: "none"

send-particles-to-all:
  # If enabled, the particles will be sent to all players, rather than just to the player having the WorldEdit selection.
  # Might be useful when building as a group.
  enabled: false
  # You can also limit those seeing the particles by a permission. Leave 'none' to let all players see them.
  # Warning: If you have a (bad) perm plugin that does not cache its checks / takes a while for permission checks, leave this at 'none'.
  view-others-particles-perm: "none"
  # If you want people to see different particles for another player's selections, you can set them here.
  others-particle: FLAME
  others-clipboard-particle: VILLAGER_HAPPY

# If set to false, players will have to use '/wesui toggle' first to be able to see the particles.
show-selection-by-default: true
# If set to false, players will have to use '/wesui toggleclipboard' first to be able to see the particles.
show-clipboard-by-default: false

# Saves toggles to a file, so that they stay changed after player quits and server restarts.
# This also includes the clipboard toggle.
persistent-toggles: false

# Changes the distance from which particles can be seen, can be set from 1 to 500 (if you for some reason want to see them 500 blocks away).
# This does NOT affect server performance in any way.
particle-viewdistance: 99

# Recommended to have this enabled, as you'd else miss out on new features and overall improvements.
update-checks: true

Setting Particles With Data

... If you want to use particles that require extra data (REDSTONE, FALLING_DUST, BLOCK_DUST, BLOCK_CRACK, ITEM_CRACK) or want to set speed, part-particle view-distance, or offsets, you also need to put that extra data in the config (note that the REDSTONE particle is only changeable for 1.13+ servers).

All of the below are examples - the important bits are what follows the X-particle-data key!

Let's say you want to set the normal selection particle to REDSTONE and change radius and offset; Then your config should look similar to this:


[...]
particle: REDSTONE
particle-data:
  # RGB color data - numbers from 0 to 255
  r: 0 # red
  g: 0 # green
  b: 0 # blue
  # Relative particle size
  size: 0.9
  # Generic settings
  radius: 50
  offX: 0.2
  offY: 0.1
  offZ: 1
[...]

You can also add the speed parameter to the -data section, being a decimal number from 0 to 1. [/SIZE]Note that some particles do not support setting their speed.

Now you want to set the clipboard particle to FALLING_DUST (works the same for BLOCK_DUST and BLOCK_CRACK):


[...]
clipboard-particle: FALLING_DUST
clipboard-particle-data:
  # Block material
  material: DIAMOND_BLOCK
[...]

Finally, you want to set the others-particle field in send-particles-to-all to ITEM_CRACK:


[...]
send-particles-to-all:
  others-particle: ITEM_CRACK
  others-particle-data:
    material: STICK
[...]

IMPORTANT: If you are running a server on 1.12 or lower, you need to note the following when using either BLOCK_CRACK, BLOCK_DUST, or FALLING_DUST:

  • after the material, you might also need the extra data/durability. E.g. brown wool is just YELLOW_WOOL in 1.13+, but in 1.12- it is WOOL with data 4, so you would write it as in the following example:

particle: FALLING_DUST
particle-data:
  material: WOOL
  data: 4

You can obviously put any of the particles in any of the fields; I just used different ones to illustrate its structure.

Information

CategoryAdmin Tools
Published onDecember 22, 2022
LicenseUnspecified
Downloads2,404
Stars29
Watchers18
Addon

Pinned Versions

Pages

Members

Avatar for kennytv

kennytv

Owner