PlayerChangeWorldListener

This commit is contained in:
Lars Neuhaus 2024-07-09 21:50:49 +02:00
parent d97cf35aed
commit 992cea92ef
3 changed files with 15 additions and 2 deletions

View File

@ -0,0 +1,13 @@
package eu.mhsl.minecraft.pixelblocks.listeners;
import org.bukkit.World;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerChangedWorldEvent;
public class PlayerChangeWorldListener implements Listener {
@EventHandler
static void onPlayerChangeWorld(PlayerChangedWorldEvent event) {
World worldLeft = event.getFrom();
}
}

View File

@ -49,7 +49,7 @@ public class PixelBlock {
} }
} }
pixelBlockLocation.getBlock().setType(Material.GLASS); // pixelBlockLocation.getBlock().setType(Material.GLASS);
hitbox = (Interaction) pixelBlockLocation.getWorld().spawnEntity( hitbox = (Interaction) pixelBlockLocation.getWorld().spawnEntity(
pixelBlockLocation.clone().add(0.5, -hitboxOffset, 0.5), pixelBlockLocation.clone().add(0.5, -hitboxOffset, 0.5),