PlayerChangeWorldListener

This commit is contained in:
Pupsi committed 2024-07-09 21:50:49 +02:00
1 parent d97cf35aed
commit 992cea92ef
2 files changed
+14 -1

No files matched your search

@@ -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();
}
}
@@ -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),