mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-01-08 09:17:38 +01:00
parent
21571bf54b
commit
bf76b77cf6
@ -628,6 +628,14 @@ public class MVWorld implements MultiverseWorld {
|
|||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String getPermissibleName() {
|
||||||
|
return this.name.toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
@ -64,7 +64,7 @@ import java.util.logging.Logger;
|
|||||||
* The implementation of the Multiverse-{@link Core}.
|
* The implementation of the Multiverse-{@link Core}.
|
||||||
*/
|
*/
|
||||||
public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
|
public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
|
||||||
private static final int PROTOCOL = 11;
|
private static final int PROTOCOL = 12;
|
||||||
// Global Multiverse config variable, states whether or not
|
// Global Multiverse config variable, states whether or not
|
||||||
// Multiverse should stop other plugins from teleporting players
|
// Multiverse should stop other plugins from teleporting players
|
||||||
// to worlds.
|
// to worlds.
|
||||||
|
@ -145,6 +145,18 @@ public interface MultiverseWorld {
|
|||||||
*/
|
*/
|
||||||
String getName();
|
String getName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the lowercased name of the world. This method is required, since the permissables
|
||||||
|
* lowercase all permissions when recalculating.
|
||||||
|
* <p>
|
||||||
|
* Note: This also means if a user has worlds named: world and WORLD, that they can both
|
||||||
|
* exist, and both be teleported to independently, but their permissions **cannot** be
|
||||||
|
* uniqueified at this time. See bug report #.
|
||||||
|
*
|
||||||
|
* @return The lowercased name of the world.
|
||||||
|
*/
|
||||||
|
String getPermissibleName();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the alias of this world.
|
* Gets the alias of this world.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -17,6 +17,7 @@ import org.bukkit.util.Vector;
|
|||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -57,7 +58,10 @@ public class LocationManipulation {
|
|||||||
if (location == null) {
|
if (location == null) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
return String.format("%s:%.2f,%.2f,%.2f:%.2f:%.2f", location.getWorld().getName(),
|
// We set the locale to ENGLISH here so we always save with the format:
|
||||||
|
// world:1.2,5.4,3.6:1.8:21.3
|
||||||
|
// Otherwise we blow up when parsing!
|
||||||
|
return String.format(Locale.ENGLISH, "%s:%.2f,%.2f,%.2f:%.2f:%.2f", location.getWorld().getName(),
|
||||||
location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user