add default Permission and Modify Tp Effect...

Signed-off-by: j502647092 <jtb1@163.com>
pull/1/HEAD
j502647092 2015-08-14 15:51:19 +08:00
parent 01f8e10e4f
commit ac6b4b27fc
4 changed files with 8 additions and 5 deletions

View File

@ -7,6 +7,7 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.bukkit.Effect;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffect;
@ -148,7 +149,7 @@ public class TeleportControl {
public void run() { public void run() {
while (System.currentTimeMillis() < timeoutmark) { while (System.currentTimeMillis() < timeoutmark) {
if (player.isOnline()) { if (player.isOnline()) {
EffectUtil.run(player.getLocation(), lrng); EffectUtil.run(player.getLocation(), lrng, Effect.MOBSPAWNER_FLAMES, Effect.PORTAL);
} }
lrng++; lrng++;
try { try {

View File

@ -20,15 +20,16 @@ public class EffectUtil {
* @param range * @param range
* - * -
*/ */
public static void run(Location loc, long range) { public static void run(Location loc, long range, Effect... effects) {
try { try {
int i; int i;
if (range < 2) { if (range < 2) {
range = 2; range = 2;
} }
for (i = 0; i < range; i++) { for (i = 0; i < range; i++) {
loc.getWorld().playEffect(loc, Effect.LAVA_POP, 10, 100); for (Effect effect : effects) {
loc.getWorld().playEffect(loc, Effect.PORTAL, 10, 100); loc.getWorld().playEffect(loc, effect, 10, 100);
}
} }
} catch (Exception e) { } catch (Exception e) {
} }

View File

@ -73,7 +73,6 @@ public class VersionChecker implements Listener {
} }
} }
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace();
plugin.getLogger().warning("版本更新检查失败!"); plugin.getLogger().warning("版本更新检查失败!");
} }
} }

View File

@ -78,5 +78,7 @@ permissions:
se.tpaccept: true se.tpaccept: true
se.tpdeny: true se.tpdeny: true
se.back: true se.back: true
se.sethome: true
se.home: true
se.suicide: true se.suicide: true