작성하기 - noonmaru/psychics GitHub Wiki

Ability 파일들을 /plugins/Psychics/abilities/에 넣었다면 Psychic을 작성할 차례입니다.

Psychic 파일의 포맷은 yaml입니다.

우선 /plugins/Psychics/psychics/ 디렉토리로 이동합시다.

이동했다면 해당 폴더 내에 sample.yml 이라는 파일을 만들고 수정합시다.

파일에 다음 내용을 입력하세요.

abilities:
  sample:
    ability: com.github.noonmaru.boomerang

여기서 abilities는 psychic의 ability 목록을 구성하는 섹션입니다.

그 아래 sample은 ability의 코드네임

ability는 아까 다운받은 능력 모듈 이름입니다. (.jar은 제외하고 적어주세요.)

다음과 같이 ability를 추가할수도 있습니다.

abilities:
  sample:
    ability: com.github.noonmaru.boomerang
  second-sample:
    ability: com.github.noonmaru.magic-arrow

작성을 완료했다면 저장 후 서버를 실행하세요.

서버를 실행하면 Psychics 플러그인이 방금 저장했던 파일을 다음과 같이 변경합니다.

abilities:
  sample:
    ability: .boomerang
    common:
      display-name: 부메랑
      type: ACTIVE
      cooldown-ticks: 1
      interruptible: false
      damage:
        type: RANGED
        stats:
          ATK: 2.0
      wand:
        v: 2580
        type: GOLD_INGOT
      supply-items: []
      description:
      - 지정한 방향으로 부메랑을 빠르게 발사합니다.
      - 발사된 부메랑은 부딪힌 적에게 피해를 입히고
      - 천천히 돌아옵니다.
      - 부메랑을 회수시 다시 사용 할 수 있습니다.
    boomerang:
      boomerang-items:
      - ==: org.bukkit.inventory.ItemStack
        v: 2580
        type: RED_WOOL
      - ==: org.bukkit.inventory.ItemStack
        v: 2580
        type: YELLOW_WOOL
      - ==: org.bukkit.inventory.ItemStack
        v: 2580
        type: GREEN_WOOL
      - ==: org.bukkit.inventory.ItemStack
        v: 2580
        type: BLUE_WOOL
      - ==: org.bukkit.inventory.ItemStack
        v: 2580
        type: PURPLE_WOOL
      projectile-launch-speed: 7.0
      projectile-ticks: 200
      projectile-returning-ticks: 8
      projectile-returning-speed: 0.4
      knockback: 0.75
      ray-size: 0.3
display-name: 블록 부메랑
health-bonus: 0.0
health-regen-per-tick: 0.0
mana: 0.0
mana-regen-per-tick: 0.0
mana-color: BLUE
description: []

내부 속성들의 이름의 순서는 이와 같지 않을 수 있으나 상관은 없습니다.

psychic 파일 작성 및 서버 로딩을 완료했습니다.

TIP

ability 를 지정할 때 전체이름 com.github.noonmaru.boomerang 이 아닌 Suffix인 .boomerang 만으로 지정할 수도 있습니다.

단 다음과 같이 Suffix가 동일한 Ability가 있을때는 충돌하며 로딩되지 않습니다.

  • com.github.noonmaru.boomerang
  • foo.bar.boomerang

이런 경우 Suffix를 .noonmaru.boomerang과 같이 늘려 해결할 수 있습니다.