Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #101 from TheWylot/dev/v2.0.0
Browse files Browse the repository at this point in the history
DEV-2.0.25 // Support Improvements
  • Loading branch information
TheWylot authored May 15, 2023
2 parents ff8ba45 + 3e4fceb commit cd51626
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 36 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>ir.wy</groupId>
<artifactId>WyCore</artifactId>
<packaging>jar</packaging>
<version>2.0.24</version>
<version>2.0.25</version>


<properties>
Expand Down
18 changes: 0 additions & 18 deletions src/main/java/ir/wy/wycore/behind/WyPlugin.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
package ir.wy.wycore.behind.support.builtentity;

import ir.wy.wycore.spigot.support.SupportRegistery;
import org.jetbrains.annotations.NotNull;

import java.util.HashSet;
import java.util.Set;
public class BuiltEntityManager {
public final class BuiltEntityManager {

private static final SupportRegistery<BuiltEntitySupport> REGISTERY = new SupportRegistery<>();


@Deprecated
private static final Set<BuiltEntitySupport> REGISTERED = new HashSet<>();

public static void register(@NotNull final BuiltEntitySupport Support) {
REGISTERED.removeIf(it -> it.getPluginName().equalsIgnoreCase(Support.getPluginName()));
REGISTERED.add(Support);
REGISTERY.register(Support);
}

public static void registerAllEntities() {
for (BuiltEntitySupport integration : REGISTERED) {
integration.registerAllEntities();
}
REGISTERY.forEachSafely(BuiltEntitySupport::registerAllEntities);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package ir.wy.wycore.behind.support.hologram;

import ir.wy.wycore.spigot.support.SupportRegistery;
import org.bukkit.Location;
import org.jetbrains.annotations.NotNull;

Expand All @@ -9,21 +10,15 @@

public final class HologramManager {

private static final SupportRegistery<HologramSupport> REGISTERY = new SupportRegistery<>();

@Deprecated
private static final Set<HologramSupport> REGISTERED = new HashSet<>();

private static void register(@NotNull final HologramSupport support) {
REGISTERED.removeIf(it -> it.getPluginName().equalsIgnoreCase(support.getPluginName()));
REGISTERED.add(support);
private static void register(@NotNull final HologramSupport Support) {
REGISTERY.register(Support);
}

//
// private static Hologram createHologram(@NotNull final Location location, @NotNull final List<String> contents) {
// for (HologramSupport support : REGISTERED) {
// return support.createHologram(location, contents);
// }
// return new EmptyHologram();
// }

private HologramManager() {
throw new UnsupportedOperationException("This is a utility class and cannot be instantiated");
}
Expand Down

0 comments on commit cd51626

Please sign in to comment.