Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jan 8, 2022
1 parent e16ebad commit 6414972
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Expand Up @@ -122,6 +122,9 @@ public void sitInternal(Location location) {
}

public void safetyCleanup(Location loc) {
if (loc.getWorld() == null) {
return;
}
for (Entity entity : loc.getWorld().getNearbyEntities(loc, 3, 3, 3)) {
if (entity.getType() == EntityType.ARMOR_STAND && entity.getCustomName() != null && entity.getCustomName().equals(SIT_STAND_NAME) && entity.getPassengers().isEmpty()) {
ArmorStand stand = (ArmorStand) entity;
Expand Down
Expand Up @@ -127,6 +127,7 @@ else if (!scriptEntry.hasObject("effect") &&
else if (arg.matches("barrier") && NMSHandler.getVersion().isAtLeast(NMSVersion.v1_18)) {
scriptEntry.addObject("particleeffect", particleHelper.getParticle("block_marker"));
scriptEntry.addObject("special_data", new ElementTag("barrier"));
continue;
}
else if (arg.matches("random")) {
// Get another effect if "RANDOM" is used
Expand Down
Expand Up @@ -1061,6 +1061,9 @@ public SocketAddress getRemoteAddress() {

@Override
public void disconnect(Component ichatbasecomponent) {
if (!player.getBukkitEntity().isOnline()) { // Workaround Paper duplicate quit event issue
return;
}
oldManager.disconnect(ichatbasecomponent);
}

Expand Down

0 comments on commit 6414972

Please sign in to comment.