전체 글(974)
-
Lombok 설치
@Slf4j를 사용하기 위해서 필요jar 파일을 STS 실행파일이 있는 곳에 넣고 실행
2025.03.21 -
다른 몹이 나를 공격하면, 그 몹을 공격하는 좀비 코딩
@EventHandler public void onPlayerAttack(EntityDamageByEntityEvent event) { // Only care if a player attacked something if (!(event.getDamager() instanceof Player player)) return; if (!(event.getEntity() instanceof LivingEntity target)) return; // Loop through nearby entities to find the player's guardians for (Entity entity : player.getWorld().getNearbyEnti..
2025.03.19 -
블록을 깨면 나를 따라오지만, 공격하지 않는 좀비 코딩
@EventHandler public void onBlockBreak(BlockBreakEvent event) { Player player = event.getPlayer(); Location blockLocation = event.getBlock().getLocation(); World world = blockLocation.getWorld(); // Spawn a friendly zombie Zombie zombie = (Zombie) world.spawn(blockLocation.add(0, 1, 0), Zombie.class); zombie.setCustomName(player.getName() + "'s Friend..
2025.03.19 -
블록을 깨면 나를 공격하지 않는 좀비가 나오게 코딩
@EventHandler public void onBlockBreak(BlockBreakEvent event) { Player player = event.getPlayer(); Location blockLocation = event.getBlock().getLocation(); // Spawn a zombie at the block location Zombie zombie = (Zombie) blockLocation.getWorld().spawn(blockLocation.add(0, 1, 0), Zombie.class); // Set properties to make it friendly zombie.setCustomName..
2025.03.19 -
블록을 깨면 그 위치에 좀비가 나오게 코딩
@EventHandler public void onBlockBreak(BlockBreakEvent event) { Location loc = event.getBlock().getLocation(); World world = loc.getWorld(); if (world != null) { Zombie zombie = (Zombie) world.spawnEntity(loc.add(0.5, 0, 0.5), EntityType.ZOMBIE); zombie.setCustomName("Block Guardian"); zombie.setCustomNameVisible(true); } }
2025.03.19 -
spigot plugin 설정
Maven Project 생성Build Path: JDK17 설정/src/resources/config.ymlname: Pluginversion: 1.0main: hys.MobPluginapi-version: 1.20description: My first Spigot plugin!commands: hello: description: Say hello! usage: /hellopom.xml 4.0.0 mincraft plugin 0.0.1-SNAPSHOT plugin spigotmc-repo https://hub.spigotmc.org/nexus/content/repositories/snapshots/ true ..
2025.03.18