mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2025-12-24 00:59:18 +00:00
Paper plugin support, save player itemsToKeep rather than drops if not empty (#179)
* Paper plugin support, save itemsToKeep if present, close #172 * Fixup wrong packages, suppress a warning * Update docs, add settings for death saving, reorganise config slightly * Improve default server name lookup * docs: Add note on Unsupported Versions * docs: Minor Sync Modes tweaks
This commit is contained in:
@@ -168,7 +168,7 @@ public class BukkitHuskSync extends JavaPlugin implements HuskSync, BukkitTask.S
|
||||
});
|
||||
|
||||
// Register events
|
||||
initialize("events", (plugin) -> this.eventListener = new BukkitEventListener(this));
|
||||
initialize("events", (plugin) -> this.eventListener = createEventListener());
|
||||
|
||||
// Register commands
|
||||
initialize("commands", (plugin) -> BukkitCommand.Type.registerCommands(this));
|
||||
@@ -209,6 +209,11 @@ public class BukkitHuskSync extends JavaPlugin implements HuskSync, BukkitTask.S
|
||||
log(Level.INFO, "Successfully disabled HuskSync v" + getPluginVersion());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected BukkitEventListener createEventListener() {
|
||||
return new BukkitEventListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public Set<OnlineUser> getOnlineUsers() {
|
||||
@@ -259,6 +264,7 @@ public class BukkitHuskSync extends JavaPlugin implements HuskSync, BukkitTask.S
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public Map<Identifier, Serializer<? extends Data>> getSerializers() {
|
||||
return serializers;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user