Register join listener through Paper manager
This commit is contained in:
@@ -274,9 +274,8 @@ public class MetropolisPlugin extends JavaPlugin {
|
||||
fillOccupiedPlots();
|
||||
resizeCityRegion();
|
||||
|
||||
if(_playerJoinListener == null){
|
||||
_playerJoinListener = new PlayerJoinListener(this);
|
||||
}
|
||||
_playerJoinListener = new PlayerJoinListener(this);
|
||||
getServer().getPluginManager().registerEvents(_playerJoinListener, this);
|
||||
|
||||
getLogger().info(String.format("%s enabled", pdf.getFullName()));
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ public class PlayerJoinListener implements Listener {
|
||||
|
||||
public PlayerJoinListener(MetropolisPlugin plugin){
|
||||
_plugin = plugin;
|
||||
plugin.getServer().getPluginManager().registerEvents(this, plugin);
|
||||
}
|
||||
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
|
||||
Reference in New Issue
Block a user