From ac6b4b27fc3a91214bb9e4801a738079ec22a267 Mon Sep 17 00:00:00 2001 From: j502647092 Date: Fri, 14 Aug 2015 15:51:19 +0800 Subject: [PATCH] add default Permission and Modify Tp Effect... Signed-off-by: j502647092 --- .../SimpleEssential/teleport/TeleportControl.java | 3 ++- src/cn/citycraft/SimpleEssential/utils/EffectUtil.java | 7 ++++--- src/cn/citycraft/SimpleEssential/utils/VersionChecker.java | 1 - src/plugin.yml | 2 ++ 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/cn/citycraft/SimpleEssential/teleport/TeleportControl.java b/src/cn/citycraft/SimpleEssential/teleport/TeleportControl.java index 0da5f79..3d4ea78 100644 --- a/src/cn/citycraft/SimpleEssential/teleport/TeleportControl.java +++ b/src/cn/citycraft/SimpleEssential/teleport/TeleportControl.java @@ -7,6 +7,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import org.bukkit.Effect; import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.potion.PotionEffect; @@ -148,7 +149,7 @@ public class TeleportControl { public void run() { while (System.currentTimeMillis() < timeoutmark) { if (player.isOnline()) { - EffectUtil.run(player.getLocation(), lrng); + EffectUtil.run(player.getLocation(), lrng, Effect.MOBSPAWNER_FLAMES, Effect.PORTAL); } lrng++; try { diff --git a/src/cn/citycraft/SimpleEssential/utils/EffectUtil.java b/src/cn/citycraft/SimpleEssential/utils/EffectUtil.java index 92ffd1c..dfa30bd 100644 --- a/src/cn/citycraft/SimpleEssential/utils/EffectUtil.java +++ b/src/cn/citycraft/SimpleEssential/utils/EffectUtil.java @@ -20,15 +20,16 @@ public class EffectUtil { * @param range * - 粒子的数量 */ - public static void run(Location loc, long range) { + public static void run(Location loc, long range, Effect... effects) { try { int i; if (range < 2) { range = 2; } for (i = 0; i < range; i++) { - loc.getWorld().playEffect(loc, Effect.LAVA_POP, 10, 100); - loc.getWorld().playEffect(loc, Effect.PORTAL, 10, 100); + for (Effect effect : effects) { + loc.getWorld().playEffect(loc, effect, 10, 100); + } } } catch (Exception e) { } diff --git a/src/cn/citycraft/SimpleEssential/utils/VersionChecker.java b/src/cn/citycraft/SimpleEssential/utils/VersionChecker.java index dd5b760..4723b5a 100644 --- a/src/cn/citycraft/SimpleEssential/utils/VersionChecker.java +++ b/src/cn/citycraft/SimpleEssential/utils/VersionChecker.java @@ -73,7 +73,6 @@ public class VersionChecker implements Listener { } } } catch (IOException e) { - e.printStackTrace(); plugin.getLogger().warning("版本更新检查失败!"); } } diff --git a/src/plugin.yml b/src/plugin.yml index 82bbcec..714a91d 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -78,5 +78,7 @@ permissions: se.tpaccept: true se.tpdeny: true se.back: true + se.sethome: true + se.home: true se.suicide: true