Compare commits
No commits in common. "727769a17058bddb756f039e2fd583c4c0eb349e" and "1d65bd0ac8a37aaff78cbddabba80845f92f5b8a" have entirely different histories.
727769a170
...
1d65bd0ac8
2 changed files with 43 additions and 48 deletions
|
|
@ -10,13 +10,13 @@
|
|||
|
||||
## ✨ 주요 기능
|
||||
|
||||
- 📍 **좌표 관리** - 좌표 저장 및 텔레포트
|
||||
- 📍 **좌표 관리** - GUI 기반 좌표 저장 및 텔레포트
|
||||
- 🏷️ **닉네임 시스템** - 플레이어 닉네임 설정
|
||||
- 🏠 **스폰 관리** - 커스텀 스폰 지점 설정
|
||||
- 🚀 **텔레포트** - 플레이어 간 텔레포트
|
||||
- 🛡️ **안티몹** - 특정 몹 패턴 비활성화
|
||||
- 🌾 **밭 보호** - 밟아도 밭이 망가지지 않도록 보호
|
||||
- 💬 **채팅 관리** - 채팅 형식 변경
|
||||
- 🛡️ **안티몹** - 특정 몹 비활성화
|
||||
- 🌾 **밭 보호** - 밟아도 밭 안 망가짐
|
||||
- 💬 **채팅 관리** - 채팅 형식 및 비우기
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
| 명령어 | 설명 |
|
||||
| ------------------ | -------------------- |
|
||||
| `/좌표` | 저장된 좌표 목록 |
|
||||
| `/좌표추가 <이름>` | 현재 위치 좌표 저장 |
|
||||
| `/좌표` | 저장된 좌표 목록 GUI |
|
||||
| `/좌표추가 <이름>` | 현재 위치 저장 |
|
||||
| `/좌표제거 <이름>` | 저장된 좌표 삭제 |
|
||||
| `/좌표이동 <이름>` | 해당 좌표로 텔레포트 |
|
||||
|
||||
|
|
@ -58,8 +58,8 @@
|
|||
### 안티몹
|
||||
|
||||
| 명령어 | 설명 |
|
||||
| --------------------- | ----------- |
|
||||
| `/안티몹`, `/antimob` | 안티몹 설정 |
|
||||
| --------------------- | --------------- |
|
||||
| `/안티몹`, `/antimob` | 안티몹 설정 GUI |
|
||||
|
||||
### 밭 보호
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,8 @@ object ChatCommand {
|
|||
private fun hasPermissionOrSend(player: ServerPlayer?, requiredLevel: Int = 2): Boolean {
|
||||
if (player != null && !player.hasPermissions(requiredLevel)) {
|
||||
player.sendSystemMessage(
|
||||
Component.literal("해당 명령어를 실행할 권한이 없습니다.").withStyle {
|
||||
it.withColor(ChatFormatting.RED)
|
||||
}
|
||||
Component.literal("해당 명령어를 실행할 권한이 없습니다.")
|
||||
.withStyle { it.withColor(ChatFormatting.RED) }
|
||||
)
|
||||
return false
|
||||
}
|
||||
|
|
@ -43,22 +42,20 @@ object ChatCommand {
|
|||
|
||||
private fun registerReloadCommand(root: String, sub: String, event: RegisterCommandsEvent) {
|
||||
event.dispatcher.register(
|
||||
Commands.literal(root)
|
||||
.then(
|
||||
Commands.literal(root).then(
|
||||
Commands.literal(sub).executes { context ->
|
||||
val player = getPlayerOrNull(context.source)
|
||||
if (!hasPermissionOrSend(player)) return@executes 0
|
||||
|
||||
ChatConfig.loadConfig()
|
||||
|
||||
val success =
|
||||
Component.literal("채팅 형식을 새로고침했습니다.").withStyle {
|
||||
it.withColor(ChatFormatting.GOLD)
|
||||
}
|
||||
val success = Component.literal("채팅 형식을 새로고침했습니다.")
|
||||
.withStyle { it.withColor(ChatFormatting.GOLD) }
|
||||
|
||||
if (player == null)
|
||||
context.source.sendSuccess({ success }, false)
|
||||
else player.sendSystemMessage(success)
|
||||
else
|
||||
player.sendSystemMessage(success)
|
||||
|
||||
1
|
||||
}
|
||||
|
|
@ -68,22 +65,20 @@ object ChatCommand {
|
|||
|
||||
private fun registerClearCommand(root: String, sub: String, event: RegisterCommandsEvent) {
|
||||
event.dispatcher.register(
|
||||
Commands.literal(root)
|
||||
.then(
|
||||
Commands.literal(root).then(
|
||||
Commands.literal(sub).executes { context ->
|
||||
val player = getPlayerOrNull(context.source)
|
||||
if (!hasPermissionOrSend(player)) return@executes 0
|
||||
|
||||
val server = context.source.server
|
||||
val allPlayers =
|
||||
server.playerList.players.filterIsInstance<
|
||||
ServerPlayer>()
|
||||
val allPlayers = server.playerList.players.filterIsInstance<ServerPlayer>()
|
||||
ChatUtils.clearChatForAll(allPlayers)
|
||||
|
||||
server.playerList.broadcastSystemMessage(
|
||||
Component.literal("\u00A0\u00A0채팅창을 비웠습니다.").withStyle {
|
||||
it.withColor(ChatFormatting.AQUA)
|
||||
},
|
||||
Component.literal("📢")
|
||||
.append(Component.literal("\u00A0\u00A0채팅창을 비웠습니다.")
|
||||
.withStyle { it.withColor(ChatFormatting.AQUA) }
|
||||
),
|
||||
false
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue