Register join listener through Paper manager
This commit is contained in:
2
TODO.md
2
TODO.md
@@ -12,7 +12,7 @@
|
|||||||
| MET-008 | Done | Analyze Java sources for deprecated or removed Bukkit/Paper APIs and legacy patterns, including logging, event registration, configuration, player lookup, and player-keyed storage. |
|
| MET-008 | Done | Analyze Java sources for deprecated or removed Bukkit/Paper APIs and legacy patterns, including logging, event registration, configuration, player lookup, and player-keyed storage. |
|
||||||
| MET-009 | Done | Review custom scripts and resources for required updates to the Gradle build and modern Paper server workflow. |
|
| MET-009 | Done | Review custom scripts and resources for required updates to the Gradle build and modern Paper server workflow. |
|
||||||
| MET-010 | Done | Refactor plugin logging to use JavaPlugin.getLogger(). |
|
| MET-010 | Done | Refactor plugin logging to use JavaPlugin.getLogger(). |
|
||||||
| MET-011 | Ready | Refactor event listeners and registration to use Listener, @EventHandler, and the modern plugin manager API. |
|
| MET-011 | Done | Refactor event listeners and registration to use Listener, @EventHandler, and the modern plugin manager API. |
|
||||||
| MET-012 | Ready | Replace deprecated configuration APIs with the modern Bukkit/Paper configuration API, including load, save, and reload behavior. |
|
| MET-012 | Ready | Replace deprecated configuration APIs with the modern Bukkit/Paper configuration API, including load, save, and reload behavior. |
|
||||||
| MET-013 | Ready | Replace Player-keyed storage with UUID-based storage wherever player identity is persisted or tracked. |
|
| MET-013 | Ready | Replace Player-keyed storage with UUID-based storage wherever player identity is persisted or tracked. |
|
||||||
| MET-014 | Ready | Review player lookup logic and use exact or otherwise explicit name-matching behavior where appropriate. |
|
| MET-014 | Ready | Review player lookup logic and use exact or otherwise explicit name-matching behavior where appropriate. |
|
||||||
|
|||||||
@@ -274,9 +274,8 @@ public class MetropolisPlugin extends JavaPlugin {
|
|||||||
fillOccupiedPlots();
|
fillOccupiedPlots();
|
||||||
resizeCityRegion();
|
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()));
|
getLogger().info(String.format("%s enabled", pdf.getFullName()));
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ public class PlayerJoinListener implements Listener {
|
|||||||
|
|
||||||
public PlayerJoinListener(MetropolisPlugin plugin){
|
public PlayerJoinListener(MetropolisPlugin plugin){
|
||||||
_plugin = plugin;
|
_plugin = plugin;
|
||||||
plugin.getServer().getPluginManager().registerEvents(this, plugin);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority=EventPriority.MONITOR)
|
@EventHandler(priority=EventPriority.MONITOR)
|
||||||
|
|||||||
Reference in New Issue
Block a user