Compare commits
3
Commits
1.7.1
...
1.8-support
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09be08aa77 | ||
|
|
e33fc4802d | ||
|
|
f22e9cd668 |
No files matched your search
@@ -9,7 +9,7 @@ You can read up on everything else and see examples on the [**Spigot page**](htt
|
||||
|
||||
## Compiling
|
||||
You need the Spigot server version 1.8.8-R0.1-SNAPSHOT installed (i.e. BuildTools/compiled source) to be able to compile the project.
|
||||
See the `without-1.8` branch to compile the project without it (done by simply dropping 1.8 support).
|
||||
See the `master` branch to compile the project without it (done by simply dropping 1.8 support).
|
||||
|
||||
Use Maven to compile the project (`mvn clean package`).
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>nms-compat</artifactId>
|
||||
<version>1.6</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>nms-compat-common</artifactId>
|
||||
|
||||
+1
-2
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>worldedit-sui-parent</artifactId>
|
||||
<version>1.6</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
@@ -15,6 +15,5 @@
|
||||
<modules>
|
||||
<module>nms-compat-common</module>
|
||||
<module>v1_8_R3-compat</module>
|
||||
<module>v1_9-compat</module>
|
||||
</modules>
|
||||
</project>
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>nms-compat</artifactId>
|
||||
<version>1.6</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>v1_8_R3-compat</artifactId>
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>nms-compat</artifactId>
|
||||
<version>1.6</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>v1_9-compat</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>nms-compat-common</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* WorldEditCUI - https://git.io/wecui
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eu.kennytv.worldeditsui.nms;
|
||||
|
||||
import eu.kennytv.worldeditsui.compat.nms.AbstractParticleHelper;
|
||||
import eu.kennytv.worldeditsui.compat.nms.ViaParticle;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Particle;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public final class ParticleHelper extends AbstractParticleHelper {
|
||||
|
||||
@Override
|
||||
public void playEffect(final ViaParticle particle, final Location location, final float offX, final float offY, final float offZ, final float speed, final int amount, final int radius, final Player player) {
|
||||
if (!location.getWorld().equals(player.getWorld())) return;
|
||||
|
||||
final int radiusSquared = radius * radius;
|
||||
if (player.getLocation().distanceSquared(location) > radiusSquared) return;
|
||||
|
||||
player.spawnParticle(Particle.valueOf(particle.name()), location, amount, offX, offY, offZ, speed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playEffectToAll(final ViaParticle particle, final ViaParticle othersParticle, final Location location, final float offX, final float offY, final float offZ, final float speed, final int amount, final int radius, final Player origin) {
|
||||
final int radiusSquared = radius * radius;
|
||||
final Particle bukkitParticle = Particle.valueOf(particle.name());
|
||||
final Particle othersBukkitParticle = particle == othersParticle ? bukkitParticle : Particle.valueOf(othersParticle.name());
|
||||
for (final Player player : Bukkit.getOnlinePlayers()) {
|
||||
if (!location.getWorld().equals(player.getWorld())
|
||||
|| player.getLocation().distanceSquared(location) > radiusSquared) continue;
|
||||
|
||||
final boolean originalPlayer = player.getUniqueId().equals(origin.getUniqueId());
|
||||
if (!originalPlayer && !canSeeOtherParticles(player)) continue;
|
||||
|
||||
player.spawnParticle(originalPlayer ? bukkitParticle : othersBukkitParticle, location, amount, offX, offY, offZ, speed);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,11 +7,10 @@
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>worldedit-sui-parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.6</version>
|
||||
<version>1.6.1</version>
|
||||
|
||||
<modules>
|
||||
<module>worldedit-sui</module>
|
||||
<module>we-compat</module>
|
||||
<module>nms-compat</module>
|
||||
</modules>
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>worldedit-sui-parent</artifactId>
|
||||
<version>1.6</version>
|
||||
</parent>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
<artifactId>we-compat</artifactId>
|
||||
|
||||
<modules>
|
||||
<module>we-compat-common</module>
|
||||
<module>we6-compat</module>
|
||||
<module>we7-compat</module>
|
||||
</modules>
|
||||
</project>
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>we-compat</artifactId>
|
||||
<version>1.6</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>we-compat-common</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.sk89q.worldedit</groupId>
|
||||
<artifactId>worldedit-bukkit</artifactId>
|
||||
<version>6.1.4-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* WorldEditSUI - https://git.io/wesui
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eu.kennytv.worldeditsui.compat;
|
||||
|
||||
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
import com.sk89q.worldedit.regions.CylinderRegion;
|
||||
import com.sk89q.worldedit.regions.EllipsoidRegion;
|
||||
import com.sk89q.worldedit.regions.Polygonal2DRegion;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.session.ClipboardHolder;
|
||||
import org.bukkit.Material;
|
||||
|
||||
public interface IRegionHelper {
|
||||
|
||||
SimpleVector getRadius(EllipsoidRegion region);
|
||||
|
||||
SimpleVector getRadius(EllipsoidRegion region, double offX, double offY, double offZ);
|
||||
|
||||
SimpleVector getRadius(CylinderRegion region, double offX, double offZ);
|
||||
|
||||
SimpleVector getCenter(Region region);
|
||||
|
||||
SimpleVector getCenter(Region region, double offX, double offY, double offZ);
|
||||
|
||||
SimpleVector getMinimumPoint(Region region);
|
||||
|
||||
SimpleVector getMaximumPoint(Region region);
|
||||
|
||||
SimpleVector getOrigin(Clipboard clipboard);
|
||||
|
||||
Region transformAndReShift(ClipboardHolder holder, Region region);
|
||||
|
||||
Region shift(Region region, double x, double y, double z);
|
||||
|
||||
Material getWand(WorldEditPlugin plugin);
|
||||
|
||||
Simple2DVector[] getPoints(Polygonal2DRegion region);
|
||||
}
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* WorldEditSUI - https://git.io/wesui
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eu.kennytv.worldeditsui.compat;
|
||||
|
||||
import org.bukkit.util.NumberConversions;
|
||||
|
||||
public final class Simple2DVector {
|
||||
private final double x;
|
||||
private final double z;
|
||||
|
||||
public Simple2DVector(final double x, final double z) {
|
||||
this.x = x;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public double getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public double getZ() {
|
||||
return z;
|
||||
}
|
||||
|
||||
public double length() {
|
||||
return Math.sqrt(lengthSquared());
|
||||
}
|
||||
|
||||
public double lengthSquared() {
|
||||
return NumberConversions.square(this.x) + NumberConversions.square(this.z);
|
||||
}
|
||||
|
||||
public Simple2DVector subtract(final Simple2DVector vector) {
|
||||
return new Simple2DVector(this.x - vector.x, this.z - vector.z);
|
||||
}
|
||||
}
|
||||
-64
@@ -1,64 +0,0 @@
|
||||
/*
|
||||
* WorldEditSUI - https://git.io/wesui
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eu.kennytv.worldeditsui.compat;
|
||||
|
||||
public final class SimpleVector {
|
||||
private final double x;
|
||||
private final double y;
|
||||
private final double z;
|
||||
|
||||
public SimpleVector(final double x, final double y, final double z) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public double getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public double getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
public double getZ() {
|
||||
return z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
final SimpleVector that = (SimpleVector) o;
|
||||
return this.x == that.x && this.y == that.y && this.z == that.z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result;
|
||||
long temp;
|
||||
temp = Double.doubleToLongBits(x);
|
||||
result = (int) (temp ^ (temp >>> 32));
|
||||
temp = Double.doubleToLongBits(y);
|
||||
result = 31 * result + (int) (temp ^ (temp >>> 32));
|
||||
temp = Double.doubleToLongBits(z);
|
||||
result = 31 * result + (int) (temp ^ (temp >>> 32));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>we-compat</artifactId>
|
||||
<version>1.6</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>we6-compat</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>we-compat-common</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sk89q.worldedit</groupId>
|
||||
<artifactId>worldedit-bukkit</artifactId>
|
||||
<version>6.1.4-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
-124
@@ -1,124 +0,0 @@
|
||||
/*
|
||||
* WorldEditSUI - https://git.io/wesui
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eu.kennytv.worldeditsui.compat.we6;
|
||||
|
||||
import com.sk89q.worldedit.BlockVector2D;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.Vector2D;
|
||||
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
import com.sk89q.worldedit.math.transform.Transform;
|
||||
import com.sk89q.worldedit.regions.*;
|
||||
import com.sk89q.worldedit.session.ClipboardHolder;
|
||||
import eu.kennytv.worldeditsui.compat.IRegionHelper;
|
||||
import eu.kennytv.worldeditsui.compat.Simple2DVector;
|
||||
import eu.kennytv.worldeditsui.compat.SimpleVector;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public final class RegionHelper implements IRegionHelper {
|
||||
|
||||
@Override
|
||||
public SimpleVector getRadius(final EllipsoidRegion region) {
|
||||
final Vector radius = region.getRadius();
|
||||
return new SimpleVector(radius.getX(), radius.getY(), radius.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleVector getRadius(final EllipsoidRegion region, final double offX, final double offY, final double offZ) {
|
||||
final Vector radius = region.getRadius();
|
||||
return new SimpleVector(radius.getX() + offX, radius.getY() + offY, radius.getZ() + offZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleVector getRadius(final CylinderRegion region, final double offX, final double offZ) {
|
||||
final Vector2D radius = region.getRadius();
|
||||
return new SimpleVector(radius.getX() + offX, region.getHeight(), radius.getZ() + offZ);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SimpleVector getCenter(final Region region) {
|
||||
final Vector center = region.getCenter();
|
||||
return new SimpleVector(center.getX(), center.getY(), center.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleVector getCenter(final Region region, final double offX, final double offY, final double offZ) {
|
||||
final Vector center = region.getCenter();
|
||||
return new SimpleVector(center.getX() + offX, center.getY() + offY, center.getZ() + offZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleVector getMinimumPoint(final Region region) {
|
||||
final Vector minimum = region.getMinimumPoint();
|
||||
return new SimpleVector(minimum.getX(), minimum.getY(), minimum.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleVector getMaximumPoint(final Region region) {
|
||||
final Vector maximum = region.getMaximumPoint();
|
||||
return new SimpleVector(maximum.getX(), maximum.getY(), maximum.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleVector getOrigin(final Clipboard clipboard) {
|
||||
final Vector origin = clipboard.getOrigin();
|
||||
return new SimpleVector(origin.getX(), origin.getY(), origin.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Region transformAndReShift(final ClipboardHolder holder, final Region region) {
|
||||
final Transform transform = holder.getTransform();
|
||||
final Vector origin = holder.getClipboard().getOrigin();
|
||||
final Vector oldMin = region.getMinimumPoint();
|
||||
final Vector oldMax = region.getMaximumPoint();
|
||||
final Vector offset = oldMin.subtract(origin);
|
||||
final Vector min = origin.add(transform.apply(offset));
|
||||
final Vector max = min.add(transform.apply(oldMax.subtract(oldMin)));
|
||||
return new CuboidRegion(region.getWorld(), min, max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Region shift(final Region region, final double x, final double y, final double z) {
|
||||
try {
|
||||
region.shift(new Vector(x, y, z));
|
||||
} catch (final RegionOperationException ignored) {
|
||||
}
|
||||
return region;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Material getWand(final WorldEditPlugin plugin) {
|
||||
return new ItemStack(plugin.getLocalConfiguration().wandItem).getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Simple2DVector[] getPoints(final Polygonal2DRegion region) {
|
||||
final List<BlockVector2D> originalVectors = region.polygonize(-1);
|
||||
final Simple2DVector[] vectors = new Simple2DVector[originalVectors.size()];
|
||||
int i = 0;
|
||||
for (final BlockVector2D vector : originalVectors) {
|
||||
vectors[i++] = new Simple2DVector(vector.getX(), vector.getZ());
|
||||
}
|
||||
return vectors;
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>we-compat</artifactId>
|
||||
<version>1.6</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>we7-compat</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>we-compat-common</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sk89q.worldedit</groupId>
|
||||
<artifactId>worldedit-bukkit</artifactId>
|
||||
<version>7.0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
-124
@@ -1,124 +0,0 @@
|
||||
/*
|
||||
* WorldEditSUI - https://git.io/wesui
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eu.kennytv.worldeditsui.compat.we7;
|
||||
|
||||
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
import com.sk89q.worldedit.math.BlockVector2;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.math.Vector2;
|
||||
import com.sk89q.worldedit.math.Vector3;
|
||||
import com.sk89q.worldedit.math.transform.Transform;
|
||||
import com.sk89q.worldedit.regions.*;
|
||||
import com.sk89q.worldedit.session.ClipboardHolder;
|
||||
import eu.kennytv.worldeditsui.compat.IRegionHelper;
|
||||
import eu.kennytv.worldeditsui.compat.Simple2DVector;
|
||||
import eu.kennytv.worldeditsui.compat.SimpleVector;
|
||||
import org.bukkit.Material;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public final class RegionHelper implements IRegionHelper {
|
||||
|
||||
@Override
|
||||
public SimpleVector getRadius(final EllipsoidRegion region) {
|
||||
final Vector3 radius = region.getRadius();
|
||||
return new SimpleVector(radius.getX(), radius.getY(), radius.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleVector getRadius(final EllipsoidRegion region, final double offX, final double offY, final double offZ) {
|
||||
final Vector3 radius = region.getRadius();
|
||||
return new SimpleVector(radius.getX() + offX, radius.getY() + offY, radius.getZ() + offZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleVector getRadius(final CylinderRegion region, final double offX, final double offZ) {
|
||||
final Vector2 radius = region.getRadius();
|
||||
return new SimpleVector(radius.getX() + offX, region.getHeight(), radius.getZ() + offZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleVector getCenter(final Region region) {
|
||||
final Vector3 center = region.getCenter();
|
||||
return new SimpleVector(center.getX(), center.getY(), center.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleVector getCenter(final Region region, final double offX, final double offY, final double offZ) {
|
||||
final Vector3 center = region.getCenter();
|
||||
return new SimpleVector(center.getX() + offX, center.getY() + offY, center.getZ() + offZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleVector getMinimumPoint(final Region region) {
|
||||
final BlockVector3 minimum = region.getMinimumPoint();
|
||||
return new SimpleVector(minimum.getX(), minimum.getY(), minimum.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleVector getMaximumPoint(final Region region) {
|
||||
final BlockVector3 maximum = region.getMaximumPoint();
|
||||
return new SimpleVector(maximum.getX(), maximum.getY(), maximum.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleVector getOrigin(final Clipboard clipboard) {
|
||||
final BlockVector3 origin = clipboard.getOrigin();
|
||||
return new SimpleVector(origin.getX(), origin.getY(), origin.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Region transformAndReShift(final ClipboardHolder holder, final Region region) {
|
||||
final Transform transform = holder.getTransform();
|
||||
final BlockVector3 origin = holder.getClipboard().getOrigin();
|
||||
final BlockVector3 oldMin = region.getMinimumPoint();
|
||||
final BlockVector3 oldMax = region.getMaximumPoint();
|
||||
final BlockVector3 offset = oldMin.subtract(origin);
|
||||
final BlockVector3 min = origin.add(transform.apply(offset.toVector3()).toBlockPoint());
|
||||
final BlockVector3 max = min.add(transform.apply(oldMax.subtract(oldMin).toVector3()).toBlockPoint());
|
||||
return new CuboidRegion(region.getWorld(), min, max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Region shift(final Region region, final double x, final double y, final double z) {
|
||||
final Region clone = region.clone();
|
||||
try {
|
||||
clone.shift(BlockVector3.at(x, y, z));
|
||||
} catch (final RegionOperationException ignored) {
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Material getWand(final WorldEditPlugin plugin) {
|
||||
return Material.getMaterial(plugin.getLocalConfiguration().wandItem.toUpperCase().replace("MINECRAFT:", ""));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Simple2DVector[] getPoints(final Polygonal2DRegion region) {
|
||||
final List<BlockVector2> originalVectors = region.polygonize(-1);
|
||||
final Simple2DVector[] vectors = new Simple2DVector[originalVectors.size()];
|
||||
int i = 0;
|
||||
for (final BlockVector2 vector : originalVectors) {
|
||||
vectors[i++] = new Simple2DVector(vector.getX(), vector.getZ());
|
||||
}
|
||||
return vectors;
|
||||
}
|
||||
}
|
||||
+2
-32
@@ -6,43 +6,19 @@
|
||||
<parent>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>worldedit-sui-parent</artifactId>
|
||||
<version>1.6</version>
|
||||
<version>1.6.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>worldedit-sui</artifactId>
|
||||
<name>WorldEditSUI</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>we-compat-common</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>we6-compat</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>we7-compat</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>nms-compat-common</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>v1_9-compat</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>eu.kennytv.worldeditsui</groupId>
|
||||
<artifactId>v1_8_R3-compat</artifactId>
|
||||
@@ -52,14 +28,8 @@
|
||||
<dependency>
|
||||
<groupId>com.sk89q.worldedit</groupId>
|
||||
<artifactId>worldedit-bukkit</artifactId>
|
||||
<version>7.0.1-SNAPSHOT</version>
|
||||
<version>6.1.4-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -37,18 +37,15 @@ public final class Settings {
|
||||
|
||||
private String permission;
|
||||
private String otherParticlesPermission;
|
||||
private String wandItem;
|
||||
private String wandItem; // optional value, exists for fallback/legacy reasons
|
||||
private double particleSpace;
|
||||
private double particleGridSpace;
|
||||
private int particlesPerBlock;
|
||||
private int particlesPerGridBlock;
|
||||
private int particleSendInterval;
|
||||
private int particleViewDistance;
|
||||
private long expiresAfterMillis;
|
||||
private boolean cacheLocations;
|
||||
private boolean expiryEnabled;
|
||||
private boolean expireMessage;
|
||||
private boolean advancedGrid;
|
||||
private boolean updateChecks;
|
||||
private boolean sendParticlesToAll;
|
||||
private boolean persistentToggles;
|
||||
@@ -58,6 +55,8 @@ public final class Settings {
|
||||
private ViaParticle clipboardParticle;
|
||||
private ViaParticle othersParticle;
|
||||
private ViaParticle othersClipboardParticle;
|
||||
private GridSettings advancedGrid;
|
||||
private GridSettings advancedClipboardGrid;
|
||||
|
||||
Settings(final WorldEditSUIPlugin plugin) {
|
||||
this.plugin = plugin;
|
||||
@@ -94,18 +93,12 @@ public final class Settings {
|
||||
this.particleSpace = 1D / particlesPerBlock;
|
||||
}
|
||||
|
||||
advancedGrid = config.getBoolean("advanced-grid.enabled", false);
|
||||
if (advancedGrid) {
|
||||
particlesPerGridBlock = config.getInt("advanced-grid.particles-per-block", 2);
|
||||
if (particlesPerGridBlock < 1 || particlesPerGridBlock > 5) {
|
||||
plugin.getLogger().warning("The value advanced-grid.particles-per-block has to be set between 2 and 5!");
|
||||
plugin.getLogger().warning("Switched to default advanced-grid.particles-per-block: 2");
|
||||
particlesPerGridBlock = 2;
|
||||
particleGridSpace = 0.5;
|
||||
} else {
|
||||
particleGridSpace = 1D / particlesPerGridBlock;
|
||||
}
|
||||
}
|
||||
final ConfigurationSection gridSection = config.getConfigurationSection("advanced-grid");
|
||||
advancedGrid = gridSection.getBoolean("enabled", false) ? new GridSettings(plugin, gridSection) : null;
|
||||
|
||||
final ConfigurationSection clipboardGridSection = config.getConfigurationSection("advanced-clipboard-grid");
|
||||
advancedClipboardGrid = clipboardGridSection != null && clipboardGridSection.getBoolean("enabled", false) ?
|
||||
new GridSettings(plugin, clipboardGridSection) : null;
|
||||
|
||||
particleSendInterval = config.getInt("particle-send-interval", 12);
|
||||
if (particleSendInterval < 5 || particleSendInterval > 200) {
|
||||
@@ -226,26 +219,55 @@ public final class Settings {
|
||||
return permission;
|
||||
}
|
||||
|
||||
// getter is unused since the perm is directly given to the particle helper class
|
||||
public String getOtherParticlesPermission() {
|
||||
return otherParticlesPermission;
|
||||
}
|
||||
|
||||
public boolean hasAdvancedGrid() {
|
||||
return advancedGrid != null;
|
||||
}
|
||||
|
||||
public boolean hasAdvancedGrid(final boolean clipboardSelection) {
|
||||
return clipboardSelection ? advancedClipboardGrid != null : advancedGrid != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see #hasAdvancedGrid()
|
||||
*/
|
||||
public double getParticleGridSpace() {
|
||||
return advancedGrid.getParticleGridSpace();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see #hasAdvancedGrid(boolean)
|
||||
*/
|
||||
public double getParticleGridSpace(final boolean clipboardSelection) {
|
||||
return clipboardSelection ? advancedClipboardGrid.getParticleGridSpace() : advancedGrid.getParticleGridSpace();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see #hasAdvancedGrid()
|
||||
*/
|
||||
public int getParticlesPerGridBlock() {
|
||||
return advancedGrid.getParticlesPerGridBlock();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see #hasAdvancedGrid(boolean)
|
||||
*/
|
||||
public int getParticlesPerGridBlock(final boolean clipboardSelection) {
|
||||
return clipboardSelection ? advancedClipboardGrid.getParticlesPerGridBlock() : advancedGrid.getParticlesPerGridBlock();
|
||||
}
|
||||
|
||||
public double getParticleSpace() {
|
||||
return particleSpace;
|
||||
}
|
||||
|
||||
public double getParticleGridSpace() {
|
||||
return particleGridSpace;
|
||||
}
|
||||
|
||||
public int getParticlesPerBlock() {
|
||||
return particlesPerBlock;
|
||||
}
|
||||
|
||||
public int getParticlesPerGridBlock() {
|
||||
return particlesPerGridBlock;
|
||||
}
|
||||
|
||||
public int getParticleSendInterval() {
|
||||
return particleSendInterval;
|
||||
}
|
||||
@@ -266,10 +288,6 @@ public final class Settings {
|
||||
return expireMessage;
|
||||
}
|
||||
|
||||
public boolean hasAdvancedGrid() {
|
||||
return advancedGrid;
|
||||
}
|
||||
|
||||
public boolean hasUpdateChecks() {
|
||||
return updateChecks;
|
||||
}
|
||||
@@ -317,4 +335,31 @@ public final class Settings {
|
||||
public YamlConfiguration getUserData() {
|
||||
return userData;
|
||||
}
|
||||
|
||||
public static final class GridSettings {
|
||||
|
||||
private final int particlesPerGridBlock;
|
||||
private final double particleGridSpace;
|
||||
|
||||
private GridSettings(final WorldEditSUIPlugin plugin, final ConfigurationSection section) {
|
||||
final int particlesPerGridBlock = section.getInt("particles-per-block", 2);
|
||||
if (particlesPerGridBlock < 1 || particlesPerGridBlock > 5) {
|
||||
plugin.getLogger().warning("The value particles-per-block in " + section.getCurrentPath() + " has to be set between 2 and 5!");
|
||||
plugin.getLogger().warning("Switched to default particles-per-block: 2");
|
||||
this.particlesPerGridBlock = 2;
|
||||
particleGridSpace = 0.5;
|
||||
} else {
|
||||
this.particlesPerGridBlock = particlesPerGridBlock;
|
||||
particleGridSpace = 1D / this.particlesPerGridBlock;
|
||||
}
|
||||
}
|
||||
|
||||
public int getParticlesPerGridBlock() {
|
||||
return particlesPerGridBlock;
|
||||
}
|
||||
|
||||
public double getParticleGridSpace() {
|
||||
return particleGridSpace;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,27 +21,26 @@ package eu.kennytv.worldeditsui;
|
||||
import com.sk89q.worldedit.EmptyClipboardException;
|
||||
import com.sk89q.worldedit.IncompleteRegionException;
|
||||
import com.sk89q.worldedit.LocalSession;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.bukkit.BukkitWorld;
|
||||
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
import com.sk89q.worldedit.math.transform.Transform;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.regions.RegionOperationException;
|
||||
import com.sk89q.worldedit.regions.RegionSelector;
|
||||
import com.sk89q.worldedit.session.ClipboardHolder;
|
||||
import eu.kennytv.worldeditsui.command.WESUICommand;
|
||||
import eu.kennytv.worldeditsui.compat.IRegionHelper;
|
||||
import eu.kennytv.worldeditsui.compat.SimpleVector;
|
||||
import eu.kennytv.worldeditsui.compat.nms.IParticleHelper;
|
||||
import eu.kennytv.worldeditsui.compat.we6.RegionHelper;
|
||||
import eu.kennytv.worldeditsui.drawer.DrawManager;
|
||||
import eu.kennytv.worldeditsui.listener.PlayerJoinListener;
|
||||
import eu.kennytv.worldeditsui.listener.PlayerQuitListener;
|
||||
import eu.kennytv.worldeditsui.listener.WESelectionListener;
|
||||
import eu.kennytv.worldeditsui.metrics.MetricsLite;
|
||||
import eu.kennytv.worldeditsui.nms.ParticleHelper;
|
||||
import eu.kennytv.worldeditsui.user.SelectionCache;
|
||||
import eu.kennytv.worldeditsui.user.User;
|
||||
import eu.kennytv.worldeditsui.user.UserManager;
|
||||
import eu.kennytv.worldeditsui.util.RegionHelper;
|
||||
import eu.kennytv.worldeditsui.util.SelectionType;
|
||||
import eu.kennytv.worldeditsui.util.Version;
|
||||
import org.bukkit.Location;
|
||||
@@ -60,7 +59,7 @@ import java.net.URL;
|
||||
public final class WorldEditSUIPlugin extends JavaPlugin {
|
||||
|
||||
private static final String PREFIX = "§8[§eWorldEditSUI§8] ";
|
||||
private IRegionHelper regionHelper;
|
||||
private RegionHelper regionHelper;
|
||||
private IParticleHelper particleHelper;
|
||||
private UserManager userManager;
|
||||
private Settings settings;
|
||||
@@ -76,26 +75,26 @@ public final class WorldEditSUIPlugin extends JavaPlugin {
|
||||
version = new Version(getDescription().getVersion());
|
||||
printEnableMessage();
|
||||
|
||||
regionHelper = new RegionHelper();
|
||||
|
||||
try {
|
||||
Class.forName("com.sk89q.worldedit.math.Vector2");
|
||||
regionHelper = new eu.kennytv.worldeditsui.compat.we7.RegionHelper();
|
||||
} catch (final ClassNotFoundException e) {
|
||||
regionHelper = new RegionHelper();
|
||||
}
|
||||
try {
|
||||
Class.forName("org.bukkit.Particle");
|
||||
particleHelper = new ParticleHelper();
|
||||
} catch (final ClassNotFoundException e) {
|
||||
Class.forName("net.minecraft.server.v1_8_R3.EnumParticle");
|
||||
particleHelper = new eu.kennytv.worldeditsui.compat.nms.v1_8_R3.ParticleHelper();
|
||||
} catch (ClassNotFoundException ex) {
|
||||
try {
|
||||
Class.forName("net.minecraft.server.v1_8_R3.EnumParticle");
|
||||
} catch (ClassNotFoundException ex) {
|
||||
Class.forName("org.bukkit.Particle");
|
||||
getLogger().severe("This version of the plugin only supports Minecraft versions from 1.8.4-1.8.9.");
|
||||
getLogger().severe("If you want 1.9+ support, use the version provided on the plugin's Spigot page (or the default version found on the GitHub Releases page).");
|
||||
getServer().getPluginManager().disablePlugin(this);
|
||||
return;
|
||||
} catch (final ClassNotFoundException e) {
|
||||
// If you want to support lower versions than 1.8(.4), feel free to add a new ParticleHelperModule ¯\_(ツ)_/¯
|
||||
getLogger().severe("Sorry - this plugin only supports Minecraft versions from 1.8.4 upwards.");
|
||||
getLogger().severe("Sorry - this plugin only supports Minecraft versions from 1.8.4-1.8.9.");
|
||||
getLogger().severe("If you want to support versions lower than 1.8.4, feel free to ask me on the support Discord guild or to pr support yourself.");
|
||||
getLogger().severe("If you want 1.9+ support, use the version provided on the plugin's Spigot page (or the default version found on the GitHub Releases page).");
|
||||
getServer().getPluginManager().disablePlugin(this);
|
||||
return;
|
||||
}
|
||||
|
||||
particleHelper = new eu.kennytv.worldeditsui.compat.nms.v1_8_R3.ParticleHelper();
|
||||
}
|
||||
|
||||
settings = new Settings(this);
|
||||
@@ -203,16 +202,18 @@ public final class WorldEditSUIPlugin extends JavaPlugin {
|
||||
final ClipboardHolder holder = session.getClipboard();
|
||||
final Clipboard clipboard = holder.getClipboard();
|
||||
final Location location = player.getLocation();
|
||||
final SimpleVector origin = regionHelper.getOrigin(clipboard);
|
||||
final Vector origin = clipboard.getOrigin();
|
||||
|
||||
// Transform the clipboard if necessary
|
||||
final Transform transform = holder.getTransform();
|
||||
final Region region = transform.isIdentity() ? clipboard.getRegion() : regionHelper.transformAndReShift(holder, clipboard.getRegion());
|
||||
|
||||
// Shift the transformed region relative to the player
|
||||
final Region shiftedRegion = regionHelper.shift(region,
|
||||
location.getBlockX() - origin.getX(), location.getBlockY() - origin.getY(), location.getBlockZ() - origin.getZ());
|
||||
drawManager.getDrawer(SelectionType.CUBOID).draw(player, shiftedRegion, true);
|
||||
try {
|
||||
region.shift(new Vector(location.getBlockX() - origin.getX(), location.getBlockY() - origin.getY(), location.getBlockZ() - origin.getZ()));
|
||||
} catch (final RegionOperationException ignored) {
|
||||
}
|
||||
drawManager.getDrawer(SelectionType.CUBOID).draw(player, region, true);
|
||||
} catch (final EmptyClipboardException ignored) {
|
||||
// Ignore if there's no clipboard
|
||||
}
|
||||
@@ -244,14 +245,14 @@ public final class WorldEditSUIPlugin extends JavaPlugin {
|
||||
|
||||
private void drawSelection(final Player player, final User user, final Region region, final SelectionType selectionType) {
|
||||
if (settings.cacheLocations()) {
|
||||
final SimpleVector minimumPoint = regionHelper.getMinimumPoint(region);
|
||||
final SimpleVector maximumPoint = regionHelper.getMaximumPoint(region);
|
||||
final Vector minimumPoint = region.getMinimumPoint();
|
||||
final Vector maximumPoint = region.getMaximumPoint();
|
||||
SelectionCache cache = user.getSelectionCache();
|
||||
if (cache != null) {
|
||||
if (selectionType == cache.getSelectionType()
|
||||
&& cache.getMinimum().equals(minimumPoint) && cache.getMaximum().equals(maximumPoint)) {
|
||||
final Location location = new Location(player.getWorld(), 0, 0, 0);
|
||||
for (final SimpleVector vector : cache.getVectors()) {
|
||||
for (final Vector vector : cache.getVectors()) {
|
||||
location.setX(vector.getX());
|
||||
location.setY(vector.getY());
|
||||
location.setZ(vector.getZ());
|
||||
@@ -302,7 +303,7 @@ public final class WorldEditSUIPlugin extends JavaPlugin {
|
||||
return newestVersion;
|
||||
}
|
||||
|
||||
public IRegionHelper getRegionHelper() {
|
||||
public RegionHelper getRegionHelper() {
|
||||
return regionHelper;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
package eu.kennytv.worldeditsui.drawer;
|
||||
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import eu.kennytv.worldeditsui.WorldEditSUIPlugin;
|
||||
import eu.kennytv.worldeditsui.compat.SimpleVector;
|
||||
import eu.kennytv.worldeditsui.drawer.base.DrawerBase;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -42,7 +42,7 @@ public final class CuboidDrawer extends DrawerBase {
|
||||
final double width = region.getWidth();
|
||||
final double length = region.getLength();
|
||||
final double height = region.getHeight();
|
||||
final SimpleVector minimumVector = plugin.getRegionHelper().getMinimumPoint(region);
|
||||
final Vector minimumVector = region.getMinimumPoint();
|
||||
final Location minimumPoint = new Location(player.getWorld(), minimumVector.getX(), minimumVector.getY(), minimumVector.getZ());
|
||||
|
||||
final double maxTicksX = width * settings.getParticlesPerBlock() - 1;
|
||||
@@ -53,13 +53,13 @@ public final class CuboidDrawer extends DrawerBase {
|
||||
int gridSpaceX = 0;
|
||||
int gridSpaceZ = 0;
|
||||
int topGridSpace = 0;
|
||||
if (settings.hasAdvancedGrid() && !copySelection) {
|
||||
if (settings.hasAdvancedGrid(copySelection)) {
|
||||
gridSpaceX = settings.getParticlesPerBlock() * ((int) ((width * height) / AREA_FACTOR) + 1);
|
||||
gridSpaceZ = settings.getParticlesPerBlock() * ((int) ((length * height) / AREA_FACTOR) + 1);
|
||||
topGridSpace = settings.getParticlesPerBlock() * ((int) ((width * length) / AREA_FACTOR) + 1);
|
||||
maxGridTicks = height * settings.getParticlesPerGridBlock() - 1;
|
||||
maxTopGridTicksX = length * settings.getParticlesPerGridBlock() - 1;
|
||||
maxTopGridTicksZ = width * settings.getParticlesPerGridBlock() - 1;
|
||||
maxGridTicks = height * settings.getParticlesPerGridBlock(copySelection) - 1;
|
||||
maxTopGridTicksX = length * settings.getParticlesPerGridBlock(copySelection) - 1;
|
||||
maxTopGridTicksZ = width * settings.getParticlesPerGridBlock(copySelection) - 1;
|
||||
}
|
||||
|
||||
drawLines(player, minimumPoint.clone(), gridSpaceX, topGridSpace, maxTicksX, maxGridTicks, maxTopGridTicksX, height, true, copySelection);
|
||||
@@ -77,23 +77,16 @@ public final class CuboidDrawer extends DrawerBase {
|
||||
final double oldZ = location.getZ();
|
||||
int blocks = 0;
|
||||
for (int i = 0; i < maxTicks; i++) {
|
||||
if (settings.hasAdvancedGrid() && !copySelection) {
|
||||
if (settings.hasAdvancedGrid(copySelection)) {
|
||||
if (blocks % gridSpace == 0 && i != 0) {
|
||||
final Location clone = location.clone();
|
||||
for (double j = 0; j < maxGridTicks; j++) {
|
||||
clone.add(0, settings.getParticleGridSpace(), 0);
|
||||
clone.add(0, settings.getParticleGridSpace(copySelection), 0);
|
||||
playEffect(clone, player, copySelection);
|
||||
}
|
||||
}
|
||||
if (topGridSpace != 0 && blocks % topGridSpace == 0 && i != 0) {
|
||||
final Location clone = location.clone();
|
||||
for (double j = 0; j < maxTopGridTicks; j++) {
|
||||
if (x)
|
||||
clone.add(0, 0, settings.getParticleGridSpace());
|
||||
else
|
||||
clone.add(settings.getParticleGridSpace(), 0, 0);
|
||||
playEffect(clone, player, copySelection);
|
||||
}
|
||||
tickGrid(player, location, maxTopGridTicks, x, copySelection);
|
||||
}
|
||||
blocks++;
|
||||
}
|
||||
@@ -111,15 +104,8 @@ public final class CuboidDrawer extends DrawerBase {
|
||||
location.setY(location.getY() + height);
|
||||
blocks = 0;
|
||||
for (double i = 0; i < maxTicks; i++) {
|
||||
if (settings.hasAdvancedGrid() && !copySelection && topGridSpace != 0 && blocks++ % topGridSpace == 0 && i != 0) {
|
||||
final Location clone = location.clone();
|
||||
for (double j = 0; j < maxTopGridTicks; j++) {
|
||||
if (x)
|
||||
clone.add(0, 0, settings.getParticleGridSpace());
|
||||
else
|
||||
clone.add(settings.getParticleGridSpace(), 0, 0);
|
||||
playEffect(clone, player);
|
||||
}
|
||||
if (settings.hasAdvancedGrid(copySelection) && topGridSpace != 0 && blocks++ % topGridSpace == 0 && i != 0) {
|
||||
tickGrid(player, location, maxTopGridTicks, x, copySelection);
|
||||
}
|
||||
|
||||
if (x)
|
||||
@@ -130,15 +116,28 @@ public final class CuboidDrawer extends DrawerBase {
|
||||
}
|
||||
}
|
||||
|
||||
private void tickGrid(final Player player, final Location location, final double maxTopGridTicks, final boolean x, final boolean copySelection) {
|
||||
final Location clone = location.clone();
|
||||
for (double j = 0; j < maxTopGridTicks; j++) {
|
||||
if (x)
|
||||
clone.add(0, 0, settings.getParticleGridSpace(copySelection));
|
||||
else
|
||||
clone.add(settings.getParticleGridSpace(copySelection), 0, 0);
|
||||
playEffect(clone, player, copySelection);
|
||||
}
|
||||
}
|
||||
|
||||
private void drawPillarsAndGrid(final Player player, final Location minimum, final int gridSpaceX, final int gridSpaceZ,
|
||||
final double height, final double width, final double length, final boolean copySelection) {
|
||||
final boolean advancedGridEnabled = settings.hasAdvancedGrid(copySelection);
|
||||
|
||||
final double x = minimum.getX();
|
||||
final double y = minimum.getY();
|
||||
final double z = minimum.getZ();
|
||||
final double gridSpace = settings.getParticleGridSpace();
|
||||
final double gridSpace = advancedGridEnabled ? settings.getParticleGridSpace(copySelection) : 0;
|
||||
final double maxTicks = height * settings.getParticlesPerBlock();
|
||||
final double maxGridTicksX = settings.hasAdvancedGrid() ? width * settings.getParticlesPerGridBlock() - 1 : 0;
|
||||
final double maxGridTicksZ = settings.hasAdvancedGrid() ? length * settings.getParticlesPerGridBlock() - 1 : 0;
|
||||
final double maxGridTicksX = advancedGridEnabled ? width * settings.getParticlesPerGridBlock(copySelection) - 1 : 0;
|
||||
final double maxGridTicksZ = advancedGridEnabled ? length * settings.getParticlesPerGridBlock(copySelection) - 1 : 0;
|
||||
setGrid(player, minimum, gridSpaceX, maxTicks, maxGridTicksX, gridSpace, 0, copySelection);
|
||||
minimum.setX(x + width);
|
||||
minimum.setY(y);
|
||||
@@ -158,11 +157,11 @@ public final class CuboidDrawer extends DrawerBase {
|
||||
int blocks = 0;
|
||||
for (int i = 0; i < maxTicks; i++) {
|
||||
// Horizontal grid
|
||||
if (settings.hasAdvancedGrid() && !copySelection && blocks++ % gridSpace == 0 && i != 0) {
|
||||
if (settings.hasAdvancedGrid(copySelection) && blocks++ % gridSpace == 0 && i != 0) {
|
||||
final Location clone = location.clone();
|
||||
for (double j = 0; j < maxGridTicks; j++) {
|
||||
clone.add(xAddition, 0, zAddition);
|
||||
playEffect(clone, player);
|
||||
playEffect(clone, player, copySelection);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,11 +18,12 @@
|
||||
|
||||
package eu.kennytv.worldeditsui.drawer;
|
||||
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.Vector2D;
|
||||
import com.sk89q.worldedit.regions.CylinderRegion;
|
||||
import com.sk89q.worldedit.regions.FlatRegion;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import eu.kennytv.worldeditsui.WorldEditSUIPlugin;
|
||||
import eu.kennytv.worldeditsui.compat.SimpleVector;
|
||||
import eu.kennytv.worldeditsui.drawer.base.DrawerBase;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -35,7 +36,9 @@ public final class CylinderDrawer extends DrawerBase {
|
||||
|
||||
@Override
|
||||
public void draw(final Player player, final Region region) {
|
||||
final SimpleVector radius = plugin.getRegionHelper().getRadius((CylinderRegion) region, 1.3, 1.3);
|
||||
final CylinderRegion cylinder = (CylinderRegion) region;
|
||||
final Vector2D radius2D = cylinder.getRadius();
|
||||
final Vector radius = new Vector(radius2D.getX() + 1.3, cylinder.getHeight(), radius2D.getZ() + 1.3);
|
||||
final int width = (int) radius.getX();
|
||||
final int length = (int) radius.getZ();
|
||||
final int height = (int) radius.getY();
|
||||
@@ -43,7 +46,8 @@ public final class CylinderDrawer extends DrawerBase {
|
||||
final int bottom = ((FlatRegion) region).getMinimumY();
|
||||
final int top = ((FlatRegion) region).getMaximumY() + 1;
|
||||
|
||||
final SimpleVector center = plugin.getRegionHelper().getCenter(region, 0.5, 0, 0.5);
|
||||
Vector center = region.getCenter();
|
||||
center = new Vector(center.getX() + 0.5, center.getY(), center.getZ() + 0.5);
|
||||
final Location location = new Location(player.getWorld(), center.getX(), bottom, center.getZ());
|
||||
final double wideGrid = Math.PI / (settings.getParticlesPerBlock() * max * 2);
|
||||
final int heightSpace = (int) (settings.getParticleSpace() * height);
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
|
||||
package eu.kennytv.worldeditsui.drawer;
|
||||
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.regions.EllipsoidRegion;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import eu.kennytv.worldeditsui.WorldEditSUIPlugin;
|
||||
import eu.kennytv.worldeditsui.compat.SimpleVector;
|
||||
import eu.kennytv.worldeditsui.drawer.base.DrawerBase;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -34,13 +34,16 @@ public final class EllipsoidDrawer extends DrawerBase {
|
||||
|
||||
@Override
|
||||
public void draw(final Player player, final Region region) {
|
||||
final SimpleVector radius = plugin.getRegionHelper().getRadius((EllipsoidRegion) region, 1.5, 1.4, 1.5);
|
||||
final EllipsoidRegion ellipsoid = (EllipsoidRegion) region;
|
||||
Vector radius = ellipsoid.getRadius();
|
||||
radius = new Vector(radius.getX() + 1.5, radius.getY() + 1.4, radius.getZ() + 1.5);
|
||||
final int width = (int) radius.getX();
|
||||
final int length = (int) radius.getZ();
|
||||
final int height = (int) radius.getY();
|
||||
final int max = Math.max(length, width);
|
||||
|
||||
final SimpleVector center = plugin.getRegionHelper().getCenter(region, 0.5, 0.5, 0.5);
|
||||
Vector center = region.getCenter();
|
||||
center = new Vector(center.getX() + 0.5, center.getY() + 0.5, center.getZ() + 0.5);
|
||||
final Location location = new Location(player.getWorld(), center.getX(), center.getY(), center.getZ());
|
||||
final double heightInterval = Math.PI / (settings.getParticlesPerBlock() * height);
|
||||
final double wideInterval = Math.PI / (settings.getParticlesPerBlock() * max / 10D);
|
||||
|
||||
@@ -18,11 +18,12 @@
|
||||
|
||||
package eu.kennytv.worldeditsui.drawer;
|
||||
|
||||
import com.sk89q.worldedit.BlockVector2D;
|
||||
import com.sk89q.worldedit.Vector2D;
|
||||
import com.sk89q.worldedit.regions.FlatRegion;
|
||||
import com.sk89q.worldedit.regions.Polygonal2DRegion;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import eu.kennytv.worldeditsui.WorldEditSUIPlugin;
|
||||
import eu.kennytv.worldeditsui.compat.Simple2DVector;
|
||||
import eu.kennytv.worldeditsui.drawer.base.DrawerBase;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -36,15 +37,15 @@ public final class PolygonalDrawer extends DrawerBase {
|
||||
@Override
|
||||
public void draw(final Player player, final Region region) {
|
||||
final Polygonal2DRegion polyRegion = (Polygonal2DRegion) region;
|
||||
final Simple2DVector[] points = plugin.getRegionHelper().getPoints(polyRegion);
|
||||
Simple2DVector last = points[0];
|
||||
final BlockVector2D[] points = plugin.getRegionHelper().getPoints(polyRegion);
|
||||
BlockVector2D last = points[0];
|
||||
final int bottom = ((FlatRegion) region).getMinimumY();
|
||||
final Location location = new Location(player.getWorld(), last.getX(), bottom, last.getZ());
|
||||
final int height = region.getHeight();
|
||||
final int top = bottom + height;
|
||||
final int upwardsTicks = height * settings.getParticlesPerBlock();
|
||||
boolean skip = true;
|
||||
for (final Simple2DVector point : points) {
|
||||
for (final BlockVector2D point : points) {
|
||||
if (skip) {
|
||||
skip = false;
|
||||
continue;
|
||||
@@ -59,7 +60,7 @@ public final class PolygonalDrawer extends DrawerBase {
|
||||
connect(points[0].subtract(points[points.length - 1]), bottom, top, upwardsTicks, location, player);
|
||||
}
|
||||
|
||||
private void connect(final Simple2DVector vector, final int bottom, final int top, final int upwardsTicks, final Location location, final Player player) {
|
||||
private void connect(final Vector2D vector, final int bottom, final int top, final int upwardsTicks, final Location location, final Player player) {
|
||||
final double length = vector.length();
|
||||
final double factor = length * settings.getParticlesPerBlock();
|
||||
final double x = vector.getX() / factor;
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
package eu.kennytv.worldeditsui.drawer.base;
|
||||
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import eu.kennytv.worldeditsui.Settings;
|
||||
import eu.kennytv.worldeditsui.WorldEditSUIPlugin;
|
||||
import eu.kennytv.worldeditsui.compat.SimpleVector;
|
||||
import eu.kennytv.worldeditsui.compat.nms.ViaParticle;
|
||||
import eu.kennytv.worldeditsui.user.User;
|
||||
import org.bukkit.Location;
|
||||
@@ -45,7 +45,7 @@ public abstract class DrawerBase implements Drawer {
|
||||
if (settings.cacheLocations() && !copySelection) {
|
||||
final User user = plugin.getUserManager().getUser(player);
|
||||
if (user == null) return;
|
||||
user.getSelectionCache().getVectors().add(new SimpleVector(location.getX(), location.getY(), location.getZ()));
|
||||
user.getSelectionCache().getVectors().add(new Vector(location.getX(), location.getY(), location.getZ()));
|
||||
}
|
||||
|
||||
final ViaParticle particle = copySelection ? settings.getClipboardParticle() : settings.getParticle();
|
||||
|
||||
+1
-18
@@ -19,10 +19,6 @@
|
||||
package eu.kennytv.worldeditsui.listener;
|
||||
|
||||
import eu.kennytv.worldeditsui.WorldEditSUIPlugin;
|
||||
import net.md_5.bungee.api.chat.ClickEvent;
|
||||
import net.md_5.bungee.api.chat.ComponentBuilder;
|
||||
import net.md_5.bungee.api.chat.HoverEvent;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
@@ -56,20 +52,7 @@ public final class PlayerJoinListener implements Listener {
|
||||
player.sendMessage(plugin.getPrefix() + "§cThere is a newer version available: §aVersion " + plugin.getNewestVersion() + "§c, you're on §a" + plugin.getDescription().getVersion());
|
||||
notified.add(player.getUniqueId());
|
||||
|
||||
try {
|
||||
final TextComponent tc1 = new TextComponent(TextComponent.fromLegacyText(plugin.getPrefix()));
|
||||
final TextComponent tc2 = new TextComponent(TextComponent.fromLegacyText("§cDownload it at: §6https://www.spigotmc.org/resources/worldeditsui.60726/"));
|
||||
final TextComponent click = new TextComponent(TextComponent.fromLegacyText(" §7§l§o(CLICK ME)"));
|
||||
click.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://www.spigotmc.org/resources/worldeditsui.60726/"));
|
||||
click.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§aDownload the latest version").create()));
|
||||
tc1.addExtra(tc2);
|
||||
tc1.addExtra(click);
|
||||
|
||||
player.spigot().sendMessage(tc1);
|
||||
} catch (final Exception e) {
|
||||
player.sendMessage(plugin.getPrefix() + "§cDownload it at: §6https://www.spigotmc.org/resources/worldeditsui.60726/");
|
||||
}
|
||||
player.sendMessage(plugin.getPrefix() + "§cDownload it at: §6https://www.spigotmc.org/resources/worldeditsui.60726/");
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -51,7 +51,7 @@ public final class WESelectionListener implements Listener {
|
||||
if (plugin.getSettings().getWandItem().isEmpty()) {
|
||||
plugin.getLogger().info("If you have set another item than the wooden axe as the WE wand, please write it into the WESUI config, for example:");
|
||||
plugin.getLogger().info("wand: WOODEN_SWORD");
|
||||
wand = Material.getMaterial("WOODEN_AXE");
|
||||
wand = Material.WOOD_AXE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
package eu.kennytv.worldeditsui.user;
|
||||
|
||||
import eu.kennytv.worldeditsui.compat.SimpleVector;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import eu.kennytv.worldeditsui.util.SelectionType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -26,12 +26,12 @@ import java.util.List;
|
||||
|
||||
public final class SelectionCache {
|
||||
|
||||
private final List<SimpleVector> vectors = new ArrayList<>();
|
||||
private final List<Vector> vectors = new ArrayList<>();
|
||||
private SelectionType selectionType = SelectionType.NONE;
|
||||
private SimpleVector minimum;
|
||||
private SimpleVector maximum;
|
||||
private Vector minimum;
|
||||
private Vector maximum;
|
||||
|
||||
public List<SimpleVector> getVectors() {
|
||||
public List<Vector> getVectors() {
|
||||
return vectors;
|
||||
}
|
||||
|
||||
@@ -43,19 +43,19 @@ public final class SelectionCache {
|
||||
this.selectionType = selectionType;
|
||||
}
|
||||
|
||||
public SimpleVector getMinimum() {
|
||||
public Vector getMinimum() {
|
||||
return minimum;
|
||||
}
|
||||
|
||||
public void setMinimum(final SimpleVector minimum) {
|
||||
public void setMinimum(final Vector minimum) {
|
||||
this.minimum = minimum;
|
||||
}
|
||||
|
||||
public SimpleVector getMaximum() {
|
||||
public Vector getMaximum() {
|
||||
return maximum;
|
||||
}
|
||||
|
||||
public void setMaximum(final SimpleVector maximum) {
|
||||
public void setMaximum(final Vector maximum) {
|
||||
this.maximum = maximum;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* WorldEditCUI - https://git.io/wecui
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eu.kennytv.worldeditsui.util;
|
||||
|
||||
import com.sk89q.worldedit.BlockVector2D;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
||||
import com.sk89q.worldedit.math.transform.Transform;
|
||||
import com.sk89q.worldedit.regions.CuboidRegion;
|
||||
import com.sk89q.worldedit.regions.Polygonal2DRegion;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.session.ClipboardHolder;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public final class RegionHelper {
|
||||
|
||||
private static final BlockVector2D[] A = new BlockVector2D[0];
|
||||
|
||||
public Region transformAndReShift(final ClipboardHolder holder, final Region region) {
|
||||
final Transform transform = holder.getTransform();
|
||||
final Vector origin = holder.getClipboard().getOrigin();
|
||||
final Vector oldMin = region.getMinimumPoint();
|
||||
final Vector oldMax = region.getMaximumPoint();
|
||||
final Vector offset = oldMin.subtract(origin);
|
||||
final Vector min = origin.add(transform.apply(offset));
|
||||
final Vector max = min.add(transform.apply(oldMax.subtract(oldMin)));
|
||||
return new CuboidRegion(region.getWorld(), min, max);
|
||||
}
|
||||
|
||||
|
||||
public Material getWand(final WorldEditPlugin plugin) {
|
||||
return new ItemStack(plugin.getLocalConfiguration().wandItem).getType();
|
||||
}
|
||||
|
||||
public BlockVector2D[] getPoints(final Polygonal2DRegion region) {
|
||||
final List<BlockVector2D> originalVectors = region.polygonize(-1);
|
||||
return originalVectors.toArray(A);
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,12 @@ advanced-grid:
|
||||
# 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
|
||||
|
||||
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
|
||||
@@ -43,9 +49,9 @@ particle-expiry:
|
||||
# Else, only players with the set permission will have particles for their selection.
|
||||
permission: "none"
|
||||
|
||||
# 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.
|
||||
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'.
|
||||
|
||||
Reference in new issue
Block a user