mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-10-04 09:37:29 +02:00
Fix NPE in WorldGuardPlugin.wrapOfflinePlayer()
The constructor of BukkitOfflinePlayer calls the constructor of BukkitPlayer with a null player. So without this fix it is not possible to create any BukkitOfflinePlayer.
This commit is contained in:
parent
a6261b9071
commit
be426e92df
@ -41,7 +41,7 @@ public BukkitPlayer(WorldGuardPlugin plugin, Player player) {
|
||||
super((WorldEditPlugin) Bukkit.getPluginManager().getPlugin("WorldEdit"), player);
|
||||
this.plugin = plugin;
|
||||
// getName() takes longer than before in newer versions of Minecraft
|
||||
this.name = player.getName();
|
||||
this.name = player == null ? null : player.getName();
|
||||
this.silenced = silenced;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user