Skip to content

Commit

Permalink
prepare v1.2.0 release
Browse files Browse the repository at this point in the history
- rename registrator -> registrar
  • Loading branch information
lokka30 committed Mar 29, 2022
1 parent 384c5fc commit 3fccc13
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>treasury-parent</artifactId>
<groupId>me.lokka30</groupId>
<version>1.1.2-SNAPSHOT</version>
<version>1.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public Service(
/**
* Returns a {@link String} identifier of who registered this service.
*
* @return registrator
* @return registrar
*/
public @NotNull String registrarName() {
return registrarName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@ public enum ServiceRegistry {
*
* @param clazz service class
* @param service service to register
* @param registrator who registers this provider
* @param registrar who registers this provider
* @param priority priority of the service
* @param <T> provider
*/
public <T> void registerService(
@NotNull Class<T> clazz,
@NotNull T service,
@NotNull String registrator,
@NotNull String registrar,
@NotNull ServicePriority priority
) {
Objects.requireNonNull(clazz, "clazz");
Objects.requireNonNull(service, "service");
Objects.requireNonNull(registrator, "registrator");
Objects.requireNonNull(registrar, "registrar");
Objects.requireNonNull(priority, "priority");
Service<T> serviceObj = new Service<>(registrator, priority, service);
Service<T> serviceObj = new Service<>(registrar, priority, service);
servicesMap.computeIfAbsent(clazz, k -> new TreeSet<>()).add(serviceObj);
EventBus.INSTANCE.fire(new ServiceRegisteredEvent(serviceObj));
}
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>treasury-parent</artifactId>
<groupId>me.lokka30</groupId>
<version>1.1.2-SNAPSHOT</version>
<version>1.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion platform/bukkit/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>treasury-parent</artifactId>
<groupId>me.lokka30</groupId>
<version>1.1.2-SNAPSHOT</version>
<version>1.2.0</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion platform/bukkit/plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>treasury-parent</artifactId>
<groupId>me.lokka30</groupId>
<version>1.1.2-SNAPSHOT</version>
<version>1.2.0</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import me.lokka30.treasury.plugin.bukkit.command.TreasuryCommand;
import me.lokka30.treasury.plugin.bukkit.event.bukkit2treasury.B2TEventMigrator;
import me.lokka30.treasury.plugin.bukkit.event.treasury2bukkit.T2BEventMigrator;
import me.lokka30.treasury.plugin.bukkit.hooks.HookRegistrator;
import me.lokka30.treasury.plugin.bukkit.hooks.HookRegistrar;
import me.lokka30.treasury.plugin.bukkit.services.ServiceMigrationManager;
import me.lokka30.treasury.plugin.bukkit.services.bukkit2treasury.B2TServiceMigrator;
import me.lokka30.treasury.plugin.bukkit.services.treasury2bukkit.T2BServiceMigrator;
Expand Down Expand Up @@ -88,7 +88,7 @@ public void onEnable() {
getServer().getPluginManager().registerEvents(new B2TServiceMigrator(), this);
new T2BServiceMigrator(this).registerListeners();

getServer().getPluginManager().registerEvents(new HookRegistrator(this), this);
getServer().getPluginManager().registerEvents(new HookRegistrar(this), this);

if (BukkitVendor.isPaper()) {
PaperEnhancements.enhance(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
import java.util.HashMap;
import java.util.Map;
import me.lokka30.treasury.plugin.bukkit.TreasuryBukkit;
import me.lokka30.treasury.plugin.bukkit.hooks.papi.TreasuryPapiHookRegistrator;
import me.lokka30.treasury.plugin.bukkit.hooks.papi.TreasuryPapiHookRegistrar;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.plugin.Plugin;

public class HookRegistrator implements Listener {
public class HookRegistrar implements Listener {

private final Map<String, Hook> hooks = new HashMap<>();
private final TreasuryBukkit treasuryBukkit;

public HookRegistrator(TreasuryBukkit plugin) {
public HookRegistrar(TreasuryBukkit plugin) {
this.treasuryBukkit = plugin;
registerHook(new TreasuryPapiHookRegistrator());
registerHook(new TreasuryPapiHookRegistrar());
}

void registerHook(Hook hook) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import me.lokka30.treasury.plugin.bukkit.hooks.Hook;
import org.jetbrains.annotations.NotNull;

public class TreasuryPapiHookRegistrator implements Hook {
public class TreasuryPapiHookRegistrar implements Hook {

@Override
public @NotNull String getPlugin() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ public void onServiceRegister(ServiceRegisterEvent event) {
if (ServiceMigrationManager.INSTANCE.hasBeenMigratedFromTreasury(economy)) {
return;
}
Plugin registrator = provider.getPlugin();
ServiceMigrationManager.INSTANCE.registerBukkit2TreasuryMigration(registrator.getName());
Plugin registrar = provider.getPlugin();
ServiceMigrationManager.INSTANCE.registerBukkit2TreasuryMigration(registrar.getName());
ServiceRegistry.INSTANCE.registerService(
EconomyProvider.class,
economy,
registrator.getName(),
registrar.getName(),
migratePriority(provider.getPriority())
);
}
Expand All @@ -51,8 +51,8 @@ public void onServiceUnregister(ServiceUnregisterEvent event) {
if (!ServiceMigrationManager.INSTANCE.hasBeenMigratedFromTreasury(economy)) {
return;
}
Plugin registrator = provider.getPlugin();
ServiceMigrationManager.INSTANCE.unregisterBukkit2TreasuryMigration(registrator.getName());
Plugin registrar = provider.getPlugin();
ServiceMigrationManager.INSTANCE.unregisterBukkit2TreasuryMigration(registrar.getName());
ServiceRegistry.INSTANCE.unregister(EconomyProvider.class, economy);
}
}
Expand Down
2 changes: 1 addition & 1 deletion platform/bungeecord/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>treasury-parent</artifactId>
<groupId>me.lokka30</groupId>
<version>1.1.2-SNAPSHOT</version>
<version>1.2.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion platform/velocity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>treasury-parent</artifactId>
<groupId>me.lokka30</groupId>
<version>1.1.2-SNAPSHOT</version>
<version>1.2.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>me.lokka30</groupId>
<artifactId>treasury-parent</artifactId>
<version>1.1.2-SNAPSHOT</version>
<version>1.2.0</version>
<modules>
<module>api</module>
<module>core</module>
Expand All @@ -37,8 +37,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- Versions for specifying in plugin.yml's -->
<plugin.version>1.1.2</plugin.version>
<plugin.specificationVersion>SNAPSHOT</plugin.specificationVersion>
<plugin.version>1.2.0</plugin.version>
<plugin.specificationVersion>RELEASE</plugin.specificationVersion>

<!-- Versions of the dependencies Treasury uses -->
<spigot.version>1.15.2-R0.1-SNAPSHOT</spigot.version>
Expand Down

0 comments on commit 3fccc13

Please sign in to comment.