Skip to content

Commit f04dc53

Browse files
authored
Merge pull request #35 from retromcorg/CommandTPO-OfflinePlayersFix
remove offline player getter from CommandTPO
2 parents 4ea539c + c8bc900 commit f04dc53

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Essentials/src/main/java/com/earth2me/essentials/commands/Commandtpo.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.earth2me.essentials.commands;
22

3-
import com.earth2me.essentials.OfflinePlayer;
43
import com.earth2me.essentials.User;
54
import com.earth2me.essentials.Util;
65
import org.bukkit.Server;
@@ -18,11 +17,7 @@ public void run(Server server, User user, String commandLabel, String[] args) th
1817
}
1918

2019
//Just basically the old tp command
21-
User p = getPlayer(server, args, 0, true);
22-
// Check if user is offline
23-
if (p.getBase() instanceof OfflinePlayer) {
24-
throw new NoSuchFieldException(Util.i18n("playerNotFound"));
25-
}
20+
User p = getPlayer(server, args, 0);
2621

2722
// Verify permission
2823
if (!p.isHidden() || user.isAuthorized("essentials.teleport.hidden")) {

0 commit comments

Comments
 (0)