May fix an issue with /ws tp <Own world>

This commit is contained in:
Butzlabben 2018-12-07 23:03:34 +01:00
parent e48777bcc5
commit 55da382353
3 changed files with 5 additions and 2 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.butzlabben.world</groupId>
<artifactId>WorldSystem</artifactId>
<version>2.4.0.3</version>
<version>2.4.0.3-Dev</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.number>-</project.build.number>

View File

@ -24,6 +24,10 @@ public class WSTPCommand implements CommandExecutor {
WorldSystem.getInstance().getCommand("ws tp").getUsage()));
return true;
}
if(args[1].equalsIgnoreCase(p.getName()) || args[1].equalsIgnoreCase(p.getUniqueId().toString())) {
p.chat("/ws home");
return true;
}
DependenceConfig dc = new DependenceConfig(args[1]);
String worldname = dc.getWorldNamebyOfflinePlayer();
if (!dc.hasWorld()) {

View File

@ -85,7 +85,6 @@ public class DependenceConfig {
File dconfig = new File("plugins//WorldSystem//dependence.yml");
YamlConfiguration cfg = YamlConfiguration.loadConfiguration(dconfig);
String uuid = op.getUniqueId().toString();
//Fix for #40
if (cfg.isInt("Dependences." + uuid + ".ID"))
return true;