Skip to content

Commit

Permalink
Fix some bugs in the player properties api
Browse files Browse the repository at this point in the history
  • Loading branch information
Brokkonaut committed May 18, 2019
1 parent 0b441ed commit acee363
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -182,7 +182,7 @@ public void setPropertyValue(GlobalPlayer player, String property, String value)
} catch (IOException ex) {
throw new Error("impossible");
}
player.sendData(CHANNEL, baos.toByteArray());
plugin.getConnectionAPI().sendData(CHANNEL, baos.toByteArray());
}
}
} else { // value != null
Expand All @@ -204,8 +204,8 @@ public void setPropertyValue(GlobalPlayer player, String property, String value)
} catch (IOException ex) {
throw new Error("impossible");
}
player.sendData(CHANNEL, baos.toByteArray());
plugin.getConnectionAPI().sendData(CHANNEL, baos.toByteArray());
}
plugin.getServer().getPluginManager().callEvent(new GlobalPlayerPropertyChangedEvent(plugin.getConnectionAPI().getThisServer(), player, property, null));
plugin.getServer().getPluginManager().callEvent(new GlobalPlayerPropertyChangedEvent(plugin.getConnectionAPI().getThisServer(), player, property, value));
}
}

0 comments on commit acee363

Please sign in to comment.