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> <modelVersion>4.0.0</modelVersion>
<groupId>de.butzlabben.world</groupId> <groupId>de.butzlabben.world</groupId>
<artifactId>WorldSystem</artifactId> <artifactId>WorldSystem</artifactId>
<version>2.4.0.3</version> <version>2.4.0.3-Dev</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.number>-</project.build.number> <project.build.number>-</project.build.number>

View File

@ -24,6 +24,10 @@ public class WSTPCommand implements CommandExecutor {
WorldSystem.getInstance().getCommand("ws tp").getUsage())); WorldSystem.getInstance().getCommand("ws tp").getUsage()));
return true; 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]); DependenceConfig dc = new DependenceConfig(args[1]);
String worldname = dc.getWorldNamebyOfflinePlayer(); String worldname = dc.getWorldNamebyOfflinePlayer();
if (!dc.hasWorld()) { if (!dc.hasWorld()) {

View File

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