Skip to content

Commit

Permalink
fixed player not found exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
weaondara committed Dec 25, 2015
1 parent 61305bf commit 582e102
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
Expand Up @@ -24,7 +24,7 @@ public boolean test(CommandSender sender)
{
if (Bukkit.getPlayer(BukkitTestSuite.getTestplayer()) == null)
{
throw new RuntimeException("test " + BukkitTestSuite.getTestplayer() + " player not found");
throw new RuntimeException("test player " + BukkitTestSuite.getTestplayer() + " not found");
}

Map<String, Server> uservers = new HashMap();
Expand Down
Expand Up @@ -32,7 +32,7 @@ public boolean test(CommandSender sender)
{
if (Bukkit.getPlayer(BukkitTestSuite.getTestplayer()) == null)
{
throw new RuntimeException("test " + BukkitTestSuite.getTestplayer() + " player not found");
throw new RuntimeException("test player " + BukkitTestSuite.getTestplayer() + " not found");
}

//create user perm list
Expand Down
Expand Up @@ -18,13 +18,13 @@ public boolean test(CommandSender sender)
Player p = Bukkit.getPlayer(BukkitTestSuite.getTestplayer());
if (p == null)
{
throw new RuntimeException(BukkitTestSuite.getTestplayer() + " is not online!");
throw new RuntimeException("test player " + BukkitTestSuite.getTestplayer() + " not found");
}

User user = BungeePerms.getInstance().getPermissionsManager().getUser(BukkitTestSuite.getTestplayer());
if (user == null)
{
throw new RuntimeException(BukkitTestSuite.getTestplayer() + " is not online!");
throw new RuntimeException("test player " + BukkitTestSuite.getTestplayer() + " not found");
}
for (String perm : user.getEffectivePerms())
{
Expand Down
Expand Up @@ -16,7 +16,7 @@ public boolean test(CommandSender sender)
Player p = Bukkit.getPlayer(BukkitTestSuite.getTestplayer());
if (p == null)
{
throw new RuntimeException(BukkitTestSuite.getTestplayer() + " is not online!");
throw new RuntimeException("test player " + BukkitTestSuite.getTestplayer() + " not found");
}

for (PermissionAttachmentInfo perms : p.getEffectivePermissions())
Expand Down
Expand Up @@ -15,7 +15,7 @@ public boolean test(CommandSender sender)
Player p = Bukkit.getPlayer(BukkitTestSuite.getTestplayer());
if (p == null)
{
throw new RuntimeException(BukkitTestSuite.getTestplayer() + " is not online!");
throw new RuntimeException("test player " + BukkitTestSuite.getTestplayer() + " not found");
}

boolean wasop = p.isOp();
Expand Down
Expand Up @@ -2,8 +2,6 @@

import net.alpenblock.bungeeperms.BungeePerms;
import net.alpenblock.bungeeperms.User;
import net.alpenblock.bungeeperms.platform.bungee.BungeeEventListener;
import net.alpenblock.bungeeperms.platform.bungee.BungeeSender;
import net.alpenblock.bungeeperms.testsuite.bungee.BungeeTest;
import net.alpenblock.bungeeperms.testsuite.bungee.BungeeTestSuite;
import net.md_5.bungee.api.CommandSender;
Expand All @@ -17,13 +15,13 @@ public boolean test(CommandSender sender)
{
if (ProxyServer.getInstance().getPlayer(BungeeTestSuite.getTestplayer()) == null)
{
throw new RuntimeException("test " + BungeeTestSuite.getTestplayer() + " player not found");
throw new RuntimeException("test player " + BungeeTestSuite.getTestplayer() + " not found");
}

User u = BungeePerms.getInstance().getPermissionsManager().getUser(BungeeTestSuite.getTestplayer());
if (u == null)
{
throw new RuntimeException("test " + BungeeTestSuite.getTestplayer() + " player not found in db");
throw new RuntimeException("test player " + BungeeTestSuite.getTestplayer() + " not found");
}

sender.sendMessage("Prefix: " + u.buildPrefix());
Expand Down
Expand Up @@ -24,7 +24,7 @@ public boolean test(CommandSender sender)
{
if (ProxyServer.getInstance().getPlayer(BungeeTestSuite.getTestplayer()) == null)
{
throw new RuntimeException("test " + BungeeTestSuite.getTestplayer() + " player not found");
throw new RuntimeException("test player " + BungeeTestSuite.getTestplayer() + " not found");
}

Map<String, Server> uservers = new HashMap();
Expand Down

0 comments on commit 582e102

Please sign in to comment.