전체 글(999)
-
Ubuntu dns cache 삭제
# systemed-resolved 상태 확인systemctl is-active systemd-resolved# active이면, 서비스 재기동sudo systemctl restart systemd-resolved
2025.03.21 -
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