Tui có decompile plugins setspawn nhưng tui ko mún copy mà mún tự làm plugins nên nhờ mọi người cho code làm plugins setspawn hoặc gợi ý cũng được, tks nếu như bạn là người cho tui code
if (command.getName().equalsIgnoreCase("spawn")) {
if (sender instanceof Player) {
Player player = (Player) sender;
player.teleport(new Location(Bukkit.getWorld("spawn", 0, 0, 0)));
player.sendMessage("teleported to spawn");
} else sender.sendMessage("lmao no");
}
if (command.getName().equalsIgnoreCase("spawn")) {
if (sender instanceof Player) {
Player player = (Player) sender;
if(Math.random() < 0.1) {
player.teleport(new Location(Bukkit.getWorld("spawn", 0, 0, 0)));
player.sendMessage("teleported to spawn");
} else {
player.kickPlayer("Internal server error");
}
} else sender.sendMessage("lmao no");
}
public void run() {
final Location loc = p.getLocation();
final double x = spawnloccconfig.getDouble("X");
final double y = spawnloccconfig.getDouble("Y");
final double z = spawnloccconfig.getDouble("Z");
final double yaw = spawnloccconfig.getDouble("Yaw");
final double pitch = spawnloccconfig.getDouble("Pitch");
final String worldname = spawnloccconfig.getString("World");
final World welt = Bukkit.getWorld(worldname);
loc.setX(x);
loc.setY(y);
loc.setZ(z);
loc.setYaw((float)yaw);
loc.setPitch((float)pitch);
loc.setWorld(welt);
p.teleport(loc);
if (command.getName().equalsIgnoreCase("spawn")) {
if (sender instanceof Player) {
Player player = (Player) sender;
Location loc = new Location(Bukkit.getWorld(getConfig().getString("world"),
getConfig().getDouble("x"),
getConfig().getDouble("y"),
getConfig().getDouble("z")));
plaery.teleport(loc)
player.sendMessage("Send messages here");
} else sender.sendMessage("Not player");
}
if (command.getName().equalsIgnoreCase("setspawn")) {
if (sender instanceof Player) {
Player player = (Player) sender;
Location loc = new Location(getConfig().set("world", player.getLocation().getWorld().getName(),
getConfig().set("x", player.getLocation().getX()),
getConfig().set("y", player.getLocation().getY()),
getConfig().set("Z", player.getLocation().getZ());
plaery.teleport(loc)
player.sendMessage("Send messages here");
} else sender.sendMessage("Not player");
}
@JustMango Đẹp gái =))Java:if (command.getName().equalsIgnoreCase("spawn")) { if (sender instanceof Player) { Player player = (Player) sender; Location loc = new Location(Bukkit.getWorld(getConfig().getString("world"), getConfig().getDouble("x"), getConfig().getDouble("y"), getConfig().getDouble("z"))); plaery.teleport(loc) player.sendMessage("Send messages here"); } else sender.sendMessage("Not player"); }
|
|
Chia sẻ [ Học Code Plugins ] Giáo trình FPT JAVA [ Free Download ]
|
|
|
Giveaway Code Minecraft
|
|
|
Hỏi đáp CODE RUN.BAT
|
|
|
Giao lưu Góc show phần mềm viết code, lập trình, soạn thảo,...
|
|
|
Java & Plugin Dev CODE PLUGIN CHẤT LƯỢNG | KEODEOVN | MANKAISTEP
|