mirror of
https://e.coding.net/circlecloud/TeleportRandom.git
synced 2024-12-25 16:28:49 +00:00
update config file ...
Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
parent
38642ca752
commit
52472fbf80
@ -83,8 +83,8 @@ public class TeleportRandom extends JavaPlugin implements CommandExecutor {
|
||||
}
|
||||
int y = world.getHighestBlockYAt(x, z);
|
||||
final Location trl = new Location(world, x, y - 1, z);
|
||||
String blockname = trl.getBlock().getType().name();
|
||||
final Material rbm = trl.getBlock().getType();
|
||||
String blockname = rbm.name();
|
||||
for (String protectblock : Config.getInstance().getStringList(
|
||||
"ProtectBlock")) {
|
||||
if (protectblock.equalsIgnoreCase(blockname)) {
|
||||
@ -99,14 +99,13 @@ public class TeleportRandom extends JavaPlugin implements CommandExecutor {
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
Location nrl = new Location(world, x, y + 2, z);
|
||||
Location nrl = new Location(world, x, y + 3, z);
|
||||
p.teleport(nrl);
|
||||
p.sendMessage(servername
|
||||
+ pluginname
|
||||
+ getmessage("Message.Tip").replace(
|
||||
"%world%",
|
||||
world.getName().replace("%x%", x + "")
|
||||
.replace("%z%", z + "")));
|
||||
+ getmessage("Message.Tip")
|
||||
.replaceAll("%world%", world.getName())
|
||||
.replaceAll("%x%", x + "").replaceAll("%z%", z + ""));
|
||||
}
|
||||
|
||||
public String getmessage(String path) {
|
||||
|
@ -15,7 +15,7 @@ Message:
|
||||
default1: '&5未指定随机范围 使用默认值1000!'
|
||||
default2: '&c正确使用方法/tpr [随机传送范围]!'
|
||||
#提示
|
||||
Tip: '&a您被传送至 &a世界%world% &dX:%x% Z:%z%!'
|
||||
Tip: '&a您被传送至 &6世界: %world% &dX: %x% Z: %z%!'
|
||||
#警告
|
||||
Wran: '&c超过最大允许传送范围 已限制为%limit%!'
|
||||
#传送保护提示
|
||||
|
Loading…
Reference in New Issue
Block a user