Check for null uuid before attempting to get offline player. #2

This commit is contained in:
cnaude 2015-01-24 09:32:22 -07:00
parent 6b81d2094f
commit abb7b75920
3 changed files with 5 additions and 7 deletions

View File

@ -140,8 +140,8 @@
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
<version>15.0</version> <version>17.0</version>
<scope>provided</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.cnaude.essentials</groupId> <groupId>com.cnaude.essentials</groupId>

View File

@ -89,9 +89,7 @@
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
<version>15.0</version> <version>17.0</version>
<type>jar</type>
<scope>provided</scope>
</dependency> </dependency>
<!-- Essentials --> <!-- Essentials -->

View File

@ -1195,7 +1195,7 @@ public class PurpleIRC extends JavaPlugin {
public String getGroupPrefix(String worldName, String player) { public String getGroupPrefix(String worldName, String player) {
String prefix = ""; String prefix = "";
UUID uuid = getPlayerUuid(player); UUID uuid = getPlayerUuid(player);
if (vaultHelpers != null) { if (vaultHelpers != null && uuid != null) {
if (vaultHelpers.chat != null) { if (vaultHelpers.chat != null) {
String group = ""; String group = "";
OfflinePlayer offlinePlayer = getServer().getOfflinePlayer(uuid); OfflinePlayer offlinePlayer = getServer().getOfflinePlayer(uuid);
@ -1381,7 +1381,7 @@ public class PurpleIRC extends JavaPlugin {
logError(e.getMessage()); logError(e.getMessage());
} }
} }
public String getPlayerHost(final String playerIP) { public String getPlayerHost(final String playerIP) {
if (playerIP == null) { if (playerIP == null) {
return "unknown"; return "unknown";