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