mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-03 00:37:55 +00:00
Temporary fix for null pointer
Only if the server provider doesn’t have the information about the crc32
This commit is contained in:
@@ -12,6 +12,7 @@ import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* Gets the information for the selected server provider
|
||||
@@ -77,7 +78,11 @@ public class ServerProviderInfo {
|
||||
}
|
||||
|
||||
public long getCRC32() {
|
||||
return Long.parseLong(properties.get("crc32"));
|
||||
if (properties.get("crc32") != null) {
|
||||
return Long.parseLong(properties.get("crc32"));
|
||||
}else{
|
||||
return (long) new Random().nextInt(2000) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
public long getClientCRC32() {
|
||||
|
||||
Reference in New Issue
Block a user