Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-10 05:20:04 +01:00
Added a new utility method to BukkitUtil to do the common task of shifting coordinates for an entity to the center of a block.
Dieser Commit ist enthalten in:
Ursprung
4aaa127efe
Commit
1784b29f02
@ -71,6 +71,17 @@ public class BukkitUtil {
|
|||||||
return new Location(world, pt.getX(), pt.getY(), pt.getZ());
|
return new Location(world, pt.getX(), pt.getY(), pt.getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Location center(Location loc) {
|
||||||
|
return new Location(
|
||||||
|
loc.getWorld(),
|
||||||
|
loc.getBlockX()+0.5,
|
||||||
|
loc.getBlockY()+0.5,
|
||||||
|
loc.getBlockZ()+0.5,
|
||||||
|
loc.getPitch(),
|
||||||
|
loc.getYaw()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public static Player matchSinglePlayer(Server server, String name) {
|
public static Player matchSinglePlayer(Server server, String name) {
|
||||||
List<Player> players = server.matchPlayer(name);
|
List<Player> players = server.matchPlayer(name);
|
||||||
if (players.size() == 0) {
|
if (players.size() == 0) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren