mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 12:06:41 +00:00
Merge remote-tracking branch 'origin/master' into mapping
This commit is contained in:
@ -817,6 +817,7 @@ public class BukkitWorld extends LocalWorld {
|
||||
boolean withLightning = (flags & KillFlags.WITH_LIGHTNING) != 0;
|
||||
boolean killGolems = (flags & KillFlags.GOLEMS) != 0;
|
||||
boolean killAmbient = (flags & KillFlags.AMBIENT) != 0;
|
||||
boolean killTagged = (flags & KillFlags.TAGGED) != 0;
|
||||
|
||||
int num = 0;
|
||||
double radiusSq = radius * radius;
|
||||
@ -848,6 +849,10 @@ public class BukkitWorld extends LocalWorld {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!killTagged && isTagged(ent)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (radius < 0 || bukkitOrigin.distanceSquared(ent.getLocation()) <= radiusSq) {
|
||||
if (withLightning) {
|
||||
world.strikeLightningEffect(ent.getLocation());
|
||||
@ -860,6 +865,10 @@ public class BukkitWorld extends LocalWorld {
|
||||
return num;
|
||||
}
|
||||
|
||||
private static boolean isTagged(LivingEntity ent) {
|
||||
return ent.getCustomName() != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove entities in an area.
|
||||
*
|
||||
|
@ -40,11 +40,8 @@ public class CUIChannelListener implements PluginMessageListener {
|
||||
@Override
|
||||
public void onPluginMessageReceived(String channel, Player player, byte[] message) {
|
||||
LocalSession session = plugin.getSession(player);
|
||||
if (session.hasCUISupport()) { // Already initialized
|
||||
return;
|
||||
}
|
||||
|
||||
String text = new String(message, UTF_8_CHARSET);
|
||||
session.handleCUIInitializationMessage(text);
|
||||
session.describeCUI(plugin.wrapPlayer(player));
|
||||
}
|
||||
}
|
||||
|
@ -23,11 +23,13 @@ import com.sk89q.util.yaml.YAMLProcessor;
|
||||
import com.sk89q.wepif.PermissionsResolverManager;
|
||||
import com.sk89q.worldedit.*;
|
||||
import com.sk89q.worldedit.bukkit.selections.CuboidSelection;
|
||||
import com.sk89q.worldedit.bukkit.selections.CylinderSelection;
|
||||
import com.sk89q.worldedit.bukkit.selections.Polygonal2DSelection;
|
||||
import com.sk89q.worldedit.bukkit.selections.Selection;
|
||||
import com.sk89q.worldedit.extension.platform.PlatformRejectionException;
|
||||
import com.sk89q.worldedit.extent.inventory.BlockBag;
|
||||
import com.sk89q.worldedit.regions.CuboidRegion;
|
||||
import com.sk89q.worldedit.regions.CylinderRegion;
|
||||
import com.sk89q.worldedit.regions.Polygonal2DRegion;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.regions.RegionSelector;
|
||||
@ -389,6 +391,8 @@ public class WorldEditPlugin extends JavaPlugin {
|
||||
return new CuboidSelection(world, selector, (CuboidRegion) region);
|
||||
} else if (region instanceof Polygonal2DRegion) {
|
||||
return new Polygonal2DSelection(world, selector, (Polygonal2DRegion) region);
|
||||
} else if (region instanceof CylinderRegion) {
|
||||
return new CylinderSelection(world, selector, (CylinderRegion) region);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user