SnowballGameは、プラグインによって追加されるカスタムアイテムを使用し、Minecraft内で野球のようなゲームをプレイできるようにすることを目的としたプラグインです。
追加されるのはボール・バット・グラブの3種類で、それぞれ現実でのそれらの用具と同じような使い方が可能です。
解説動画
解説動画2
アイテム
・ボール

ベースは雪玉ですが、ブロックに当たるとバウンドし(一定速度以下でアイテム化します)、エンティティに当たるとアイテム化します。
何も名前を付けていない状態であれば通常の雪玉と同じ速度、同じ軌道で飛んでいきます。
・グラブ

ボールを捕球することができるようになります。
通常、投げられたボールがプレイヤーに当たった場合、他のエンティティに当たった時と同じようにプレイヤーがノックバックしてボールがアイテムとしてドロップしますが、当てられたプレイヤーがオフハンドにグラブを持っていた場合はノックバックが起こらず、そのプレイヤーのインベントリーにボールが入ります。(インベントリーに空きがなかった場合はドロップします。)
また、オフハンドにグラブを持ち、メインハンドに何もない状態で近くのボールに対して右クリックを行うことでもボールの捕球が可能です。ただしこの方法で捕球を試みた場合、低確率でボールを弾いたりこぼしたりします。捕球しようとしたボールが自分から遠い位置にあるほどエラーの確率は高まります。
・バット

弓の形をしていますが、引き絞って放っても矢を打つことはできません。
放つと一瞬だけ雪玉が現れます。(これはいわゆる「ミートカーソル」だと思ってください)
投げられたボールを狙って放つとボールを打ち返すことができます。打球の方向や強さは、ボールとミートカーソルの位置関係で決定されます。(ボールの下を打てばフライに、上を打てばゴロに、一塁側を打てば三塁側に、三塁側を打てば一塁側に飛びます。また、ミートカーソルとボールの位置が近いほど強い打球になります。)
また、打球の強さは弓の引き絞り具合によっても変わります。ほんの少しだけ引いて上手く打てば、バントのような打球を打つことも可能です。
※サバイバルモードで使う場合、弓を引き絞るために矢を一本以上持っている必要があります。矢を放つわけではないので消費されることはありませんが、見かけ上毎回減っているように見えます。(耐久値が0になったツールのような感じ)
・アンパイア

本来はネザークォーツブロックです。球場のホームベースとして使います。
このブロックの上、指定された高さ(その高さはコンフィグから設定可能)の範囲内を投球が通過すると、チャットにストライクがコールされます。
実際のゲームで見逃した時のストライク判定がどうにも不便だったので追加しました。
・ベース

本来はネザークォーツのハーフブロックです。球場のベースとして利用できます。
このブロックの上に立ってバットで左クリックをすると「ベースに到達した」というメッセージが、グラブをつけた選手がこのブロック上で捕球するかボールを持った状態で左クリックをすると「ベースを踏んだ」というメッセージが表示されます。塁上のセーフ/アウト判定にどうぞ。
また、グラブをつけた選手が何も手に持たない状態で塁上から左クリックをすると、「ベースの上に立っている」というメッセージが出ます。こちらは外野手などに送球先を指示する場合に使えるかもしれません。
・コーチ

見た目はクリーパーの頭と革防具を装備した防具立です。ボールを投げるか、/sbg pleaseコマンドを実行すると、あなたに向かってノックを打ってくれます。
打球の強さや方向はランダムですが、頑張って追えば捕球できる範囲に収まってくれていると思います。
守備の要素が一番難易度が高く、しかも練習を行うのがなかなか難しいと感じたので追加しました。
また、手に持たせた道具によって、このコーチにボールをぶつけた時にする挙動が変わります。
・バットを持たせた場合
投げたプレイヤーに対してノックを打ちます。ディスペンサーから投げられたボールをぶつけた場合、「一定範囲内にいるグラブをつけたプレイヤー」一人をランダムに選んでノックを打ちます。
・グラブを持たせた場合
ボールの捕球メッセージを表示し、投げたプレイヤーの付近に対応するアイテムのボールをドロップします。ディスペンサーから投げられたボールの場合、ディスペンサーの1.2ブロック上にボールをドロップします。(上にホッパーをつけておくと回収できます)
・ボールを持たせた場合
目線が向いている方向に向かってボールを投げます。
・ティー
これは特殊なレシピがあるアイテムではなく、バニラの醸造台をそのまま使います。メインハンドにボールを持った状態で醸造台を右クリックすると、手に持っているボールを醸造台の上に「置く」ことができます。この置かれたボールも、投げられたボールと同じようにバットを使って打つことができます。
バッティングの感覚をつかむための練習や、ノックなどの守備練習にお使い下さい。
ボールの反発力について

マイクラ内で球場を作るような企画などを見ていると、作成者やサーバーによってわりと大きさにばらつきがあるように見受けられたので、バットで打った際の反発力(打球の速度)がそれぞれ異なるボールを5種類用意しました。上の「アイテム」の項目で紹介したものが上記画像の一番上のものです。これの反発力を仮に1.0とすると、その他のものは上から2番目から順番に0.6→0.8→1.2→1.4となっています。
「変化球」について
金床でボールに特定の名前を付けて投げると、その名前に応じて軌道や速度が変化します。現在は速球(通常よりも1.1倍速い)、スライダー(通常と同じ速度でオフハンド側に曲がる)、カーブ(通常の0.9倍速でオフハンド側に曲がり落ちる)、フォーク(通常と同じ速度で下に落ちる)、シンカー(通常の0.9倍速でメインハンド側に曲がり落ちる)、シュート(通常と同じ速度でメインハンド側に曲がる)の5種類の球種があります。
なお、「どのような名前をつければ変化するか」は、コンフィグファイルから設定が可能です。
※名前を付けたボールでも、投げてから何かに当たったりバットで打たれたり捕球されたりすると、元のボールに戻ります。そのため、一球変化球を投げるたびにボールを名付け直す必要があります。持っている経験値の量を「スタミナ」のようにみなして駆け引きのある野球を楽しむのもいいかもしれません。
コンフィグについて
- コード: 全て選択
# SnowballGame Config
####
# SnowballGame Config
####
# true/false (If true, snowballs will cause knockback to players when they hits.)
Knockback_For_Players: true
Ball:
# true/false(If true, players can use custom snowball which behave like a ball for baseball.)
Enabled_Ball: true
# 'BallName' (Default name to display for the custom snowball)
Ball_Name: 'Ball'
# Natural number (Once you threw ball, you can't throw the next ball in this time.(Ticks))
Cool_Time: 30
Move:
# The type of moving balls.
Type:
- 'Fast'
- 'Slider'
- 'Curve'
- 'Folk'
- 'Sinker'
- 'Shuuto'
- 'Knuckle'
# The feature of each type of moving balls defined above lines.
# Velocity: positive number which will be multiplied by default ball's velocity(the default is about 108-110km/h.)
# Vertical: the vertical movement of the ball. a positive value makes the ball move up.
# Horizontal: the horizontal movement of the ball. a positive value means the direction of your main-hand side.
# Acceleration: the acceleration of the ball. If this value is positive, the ball will lose less speed than the ordinal snowball.
# Random: the movement with random direction.
Fast:
Velocity: 1.1
Vertical: 0.01
Horizontal: 0
Acceleration: 0.01
Slider:
Velocity: 1
Vertical: -0.005
Horizontal: -0.02
Acceleration: 0
Curve:
Velocity: 0.9
Vertical: -0.02
Horizontal: -0.02
Acceleration: -0.01
Folk:
Velocity: 1
Vertical: -0.02
Horizontal: 0
Acceleration: 0
Sinker:
Velocity: 0.9
Vertical: -0.02
Horizontal: 0.02
Acceleration: -0.01
Shuuto:
Velocity: 1
Vertical: -0.005
Horizontal: 0.02
Acceleration: 0
Knuckle:
Velocity: 0.9
Random: 0.02
Vertical: -0.02
Horizontal: 0
Acceleration: -0.02
# the names of the balls which have different repulsion with being hit.
Repulsion:
Highest: 'Ball'
Higher: 'Ball'
Lower: 'Ball'
Lowest: 'Ball'
Bat:
# true/false (If true, players can use custom bow which behave like a bat for baseball.)
Enabled_Bat: true
# 'BatName' (Default name to display for the custom bow)
Bat_Name: 'Bat'
# You can change your swing by naming special name(set below) to your bat.
# Fly: (-1~1) Bigger value means you can hit high-fly easily, and smaller means batted-ball tends to be grounder. Default value is 0.
Swing:
Type:
- UPPER
- DOWN
UPPER:
Fly: 0.3
DOWN:
Fly: -0.3
Glove:
# true/false (If true, players can use custom leather which behave like a bat for baseball.)
Enabled_Glove: true
# 'GloveName' (Default name to display for the custom leather)
Glove_Name: 'Glove'
Custom:
Type:
- SIDE
- SUBMARINE
# You can custom your release-point in pitching.A named glove make you other type of pitcher.
# Vertical: 0 means the height of your eye. positive value means above.
# Horizontal: 0 means the position of your eye. positive value means your main-hand side..
# Closeness: Increasing this value means you can pitch from closer to batter.
SIDE:
Vertical: -0.5
Horizontal: 0.3
Closeness: 0
SUBMARINE:
Vertical: -1.3
Horizontal: 0
Closeness: 0
Umpire:
# true/false (If true, players can summon custom Armor_Stand which call "Strike" when the ball through Strike-zone.)
Enabled_Umpire: true
# 'UmpireName' (Default name to display for the custom Armor_Stand)
Umpire_Name: 'Umpire'
# the height(from the ground) of the top of the strike-zone.
Top: 1.7
# the height(from the ground) of the bottom of the strike-zone.
Bottom: 0.5
Coach:
# true/false (If true, players can summon custom Armor_Stand which hit the ball when you practice fielding.)
Enabled_Coach: true
# 'CoachName' (Default name to display for the custom Armor_Stand)
Coach_Name: 'Coach'
Broadcast:
# About the message of swinging a bat.
Swing:
Enabled: true
Range: 50
Message: '[[YELLOW]][[BOLD]]*** [[PLAYER]] SWINGS ***'
# About the message of trying to bunt(swing gently)
Bunt:
Enabled: true
Range: 50
Message: '[[GREEN]][[BOLD]]*** [[PLAYER]] TRIES TO BUNT ***'
# About the message of hitting a ball with a bat.
Hit:
Enabled: true
Range: 100
Message: '[[DARK_RED]][[BOLD]]*** [[PLAYER]] HITS THE BALL ***'
# About the message of tagging a runner (hit a runner with a ball in main-hand)
Tag:
Enabled: true
Range: 50
Message: '[[BLUE]][[BOLD]]*** [[PLAYER]] TAGS [[RUNNER]] ***'
# About the message of catching a batted-ball in flight.
Catch:
Enabled: true
Range: 100
Message: '[[LIGHT_PURPLE]][[BOLD]]*** [[PLAYER]] CATCHES THE BALL ***'
# About the message of "Strike" call.
Strike:
Range: 100
Message: '[[YELLOW]][[BOLD]]*** STRIKE [[SPEED]] [[TYPE]] PITCHED BY [[PLAYER]]***'
#If you want to know about the format of "Particle" section, you should see https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html
Particle:
# When a player catch the ball with his glove.
Catch_Ball:
Enabled: false
Particle: CRIT_MAGIC
Throw_Ball:
Enabled: false
Particle: SNOWBALL
# When a ball hit to a player.
Hit_to_Players:
Enabled: false
Particle: CRIT
# When a player swings his bat.
Swing_Bat:
Enabled: true
Particle: SWEEP_ATTACK
# If true, the particle will track your swing(But it's just a guide.)
Swing_Bat_Sequent:
Enabled: false
Particle: VILLAGER_HAPPY
# When a player slugs a ball with his bat.
Hit_by_Bat:
Enabled: false
Particle: EXPLOSION_LARGE
# During a batted-ball is going in flight.
BattedBall_InFlight:
Enabled: false
Particle: FIREWORKS_SPARK
# When a batted-Ball ground on something at the first time."Time" value means how long the particle will being shown.
BattedBall_Ground:
Enabled: true
Particle: SNOW_SHOVEL
Time: 200
# When a player pitch a specific moving-ball.You can set the type of particles in each ball's section.
MovingBall:
Enabled: true
変化球の追加・編集は、Ballの中のmovingセクション内を編集して行います。
例えば「SENGA」という名前をボールにつけると、140キロくらいのお化けフォークが投げられるようにしたいという場合には、Type:の末尾に「- 'SENGA'」という行を追加した上で、Shuutoを定義している部分の後ろに、
- コード: 全て選択
SENGA:
Velocity: 1.3
Vertical: -0.06
Horizontal: 0
Acceleration: 0.01
といった感じでそのボールの性質を設定します。各パラメーターについては、Velocityはそのボールの球速がデフォルトの雪玉の球速(大体108-110km/hくらい)の何倍かを示し、Verticalは縦方向、Horizontalは横方向の変化量を示します。(Verticalは値の正の数が上方向、負の数が下方向を、Horizontalは正が利き手方向、負がオフハンド方向の変化をそれぞれ表している)また、Acceleraitonは、ボールの進行方向への変化(そのボールが通常の雪玉に比べてどれだけ加速/減速するか)を表しています。
また、Broadcastセクションでは、[[色名]]のような形で文字色の変更が可能です。
指定できる色は、
[[BLACK]],[[DARK_BLUE]],[[DARK_GREEN]],[[DARK_AQUA]],
[[DARK_RED]],[[DARK_PURPLE]],[[GOLD]],[[GRAY]],
[[DARK_GRAY]],[[BLUE]],[[GREEN]],[[AQUA]],
[[RED]],[[LIGHT_PURPLE]],[[YELLOW]],[[WHITE]]
の16種類です。
また、文字に装飾をつけることも可能であり、
[[BOLD]],[[UNDERLINE]],[[ITALIC]],[[STRIKE]],[[MAGIC]]
といった形式で指定できます。指定した装飾や色は[[RESET]]と書くことでリセットされます。
ちなみに[[PLAYER]][[RUNNER]]といった記述もありますが、これについては通知メッセージ内で、[[PLAYER]]はその指定項目に該当するアクション(バットを振ったりボールを打ったり)を行ったプレイヤーの名前に、[[RUNNER]]はそのアクションを受けたプレイヤーの名前(現在は"Tag"=「タッチ」の項目内にのみ存在する。守備側のプレイヤーが攻撃側の走者にあたるプレイヤーを、メインハンドにボールを持った状態で殴ったときに「タッチした」ことになる。)に変換されます。
Strikeの項目内に存在する[[SPEED]][[TYPE]]については、[[SPEED]]はそのボールの通過時の時速(ゲームtickからの概算。単位はkm/h)を、[[TYPE]]は球種(投げられたボールについていた名前)を示しています。
Particleセクションでは、いくつかのプレーの際に表示するパーティクルを設定することができます。利用可能なパーティクルの一覧は、https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html#enum.constant.summaryで確認できます。
ちなみにこのセクション内のMovingBallのEnabledをtrueに設定した上で、以下のように球種を追加すると、
- コード: 全て選択
Move:
# The type of moving balls.
Type:
- 'Fast'
- 'Slider'
- 'Curve'
- 'Folk'
- 'Sinker'
- 'Shuuto'
- 'ライジングキャノン'
# The feature of each type of moving balls defined above lines.
# Velocity: positive number which will be multiplied by default ball's velocity(the default is about 108-110km/h.)
# Vertical: the vertical movement of the ball. a positive value makes the ball move up.
# Horizontal: the horizontal movement of the ball. a positive value means the direction of your main-hand side.
# Acceleration: the acceleration of the ball. If this value is positive, the ball will lose less speed than the ordinal snowball.
Fast:
Velocity: 1.1
Vertical: 0.01
Horizontal: 0
Acceleration: 0.01
Slider:
Velocity: 1
Vertical: -0.005
Horizontal: -0.02
Acceleration: 0
Curve:
Velocity: 0.9
Vertical: -0.02
Horizontal: -0.02
Acceleration: -0.01
Folk:
Velocity: 1
Vertical: -0.02
Horizontal: 0
Acceleration: 0
Sinker:
Velocity: 0.9
Vertical: -0.02
Horizontal: 0.02
Acceleration: -0.01
Shuuto:
Velocity: 1
Vertical: -0.005
Horizontal: 0.02
Acceleration: 0
ライジングキャノン:
Velocity: 1.4
Vertical: 0.06
Horizontal: 0
Acceleration: 0.03
Particle: FLAME
炎を纏いながら浮き上がる豪速球「ライジングキャノン」を投げることができます。(コンフィグ内に日本語を書くときは文字コードをUTF-8で保存できるエディタを使って下さい。)