小更新,实现了动作传参,现在创建一个阵型起码50行json TvT
This commit is contained in:
@@ -16,11 +16,12 @@ public class CastDelay implements IActionBase{
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public boolean call(Location location, Player caller) {
|
||||
public boolean call(Location location, Player caller, ActionParam data) {
|
||||
int ticks = data.hasKey("ticks") ? data.getInt("ticks") : 20;
|
||||
int count = 0;
|
||||
while (count < 50) {
|
||||
while (count < ticks) {
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
Thread.sleep(50);
|
||||
}catch (InterruptedException ignored){}
|
||||
location.getWorld().spawnParticle(
|
||||
Particle.DUST,
|
||||
|
||||
Reference in New Issue
Block a user