Center default home (#2287)

* Center default home

* Remove debug
This commit is contained in:
tastybento 2024-01-27 17:06:31 -08:00 committed by GitHub
parent 787424b999
commit b25c65b7b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 3 deletions

View File

@ -1724,7 +1724,7 @@ public class Island implements DataObject, MetaDataAble {
public Location getHome(final String nameToLookFor) {
return getHomes().entrySet().stream().filter(en -> en.getKey().equalsIgnoreCase(nameToLookFor))
.map(Entry::getValue)
.findFirst().orElse(getProtectionCenter());
.findFirst().orElse(getProtectionCenter().clone().add(new Vector(0.5D, 0D, 0.5D)));
}
/**

View File

@ -16,7 +16,6 @@ import org.bukkit.event.hanging.HangingPlaceEvent;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import world.bentobox.bentobox.BentoBox;
import world.bentobox.bentobox.api.flags.FlagListener;
import world.bentobox.bentobox.lists.Flags;
@ -69,7 +68,6 @@ public class PlaceBlocksListener extends FlagListener
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onHangingPlace(final HangingPlaceEvent e)
{
BentoBox.getInstance().logDebug(e.getEventName());
this.checkIsland(e, e.getPlayer(), e.getBlock().getLocation(), Flags.PLACE_BLOCKS);
}