2 MB bug fixes

This commit is contained in:
Seth 2020-07-10 02:09:47 -07:00
parent f6bf485c0d
commit da1bec6cc0
No known key found for this signature in database
GPG Key ID: A7BAB4E14F089CF3
2 changed files with 17 additions and 6 deletions

View File

@ -46,7 +46,22 @@ public class Command_mbconfig extends FreedomCommand
}
final Player player = getPlayer(args[1]);
PlayerData data = plugin.pl.getData(player);
PlayerData data;
if (player == null)
{
data = plugin.pl.getData(args[1]);
if (data == null)
{
msg(PLAYER_NOT_FOUND);
return true;
}
}
else
{
data = plugin.pl.getData(player);
}
if (data.isMasterBuilder() && plugin.pl.isPlayerImpostor(player))
{

View File

@ -334,11 +334,7 @@ public class SQLite extends FreedomService
{
try
{
ResultSet resultSet = connection.createStatement().executeQuery("SELECT * FROM players WHERE master_builder=true");
if (resultSet.next())
{
return resultSet;
}
return connection.createStatement().executeQuery("SELECT * FROM players WHERE master_builder=true");
}
catch (SQLException e)
{