增加一些动作/结构并且补注释:( 呜呜呜补注释好累头号疼

This commit is contained in:
Starrysky
2026-02-17 00:07:42 +08:00
parent 65f516a11f
commit 67e286981e
26 changed files with 572 additions and 34 deletions

View File

@@ -0,0 +1,35 @@
package top.sunsetlab.actions;
import org.bukkit.Color;
import org.bukkit.Location;
import org.bukkit.Particle;
import org.bukkit.entity.Player;
/// 施放延迟
public class CastDelay implements IActionBase{
/**
* 调用动作
* @param location 动作执行位置
* @param caller 动作执行者
* @return 是否成功
*/
@Override
public boolean call(Location location, Player caller) {
int count = 0;
while (count < 50) {
try {
Thread.sleep(100);
}catch (InterruptedException ignored){}
location.getWorld().spawnParticle(
Particle.DUST,
location,
20,
1.0,
0.0,
1.0,
new Particle.DustOptions(Color.RED, 1.0f));
count++;
}
return true;
}
}