Merge pull request #10 from Harry5573OP/patch-2
Replace getName with hasPlayedBefore as offlineplayer will never be null...
This commit is contained in:
commit
47e3c523ae
@ -132,7 +132,7 @@ public abstract class FCommand extends MCommand<P> {
|
|||||||
|
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
OfflinePlayer player = Bukkit.getOfflinePlayer(name);
|
OfflinePlayer player = Bukkit.getOfflinePlayer(name);
|
||||||
if (player.getName() != null) {
|
if (player.hasPlayedBefore()) {
|
||||||
FPlayer fplayer = FPlayers.i.get(player);
|
FPlayer fplayer = FPlayers.i.get(player);
|
||||||
if (fplayer != null) {
|
if (fplayer != null) {
|
||||||
ret = fplayer;
|
ret = fplayer;
|
||||||
@ -196,7 +196,7 @@ public abstract class FCommand extends MCommand<P> {
|
|||||||
// Next we match player names
|
// Next we match player names
|
||||||
if (faction == null) {
|
if (faction == null) {
|
||||||
OfflinePlayer player = Bukkit.getOfflinePlayer(name);
|
OfflinePlayer player = Bukkit.getOfflinePlayer(name);
|
||||||
if (player.getName() != null) {
|
if (player.hasPlayedBefore()) {
|
||||||
FPlayer fplayer = FPlayers.i.get(player);
|
FPlayer fplayer = FPlayers.i.get(player);
|
||||||
if (fplayer != null) {
|
if (fplayer != null) {
|
||||||
faction = fplayer.getFaction();
|
faction = fplayer.getFaction();
|
||||||
|
Loading…
Reference in New Issue
Block a user