Skip to content

Commit

Permalink
update MinigameCore
Browse files Browse the repository at this point in the history
  • Loading branch information
HSGamer committed Aug 1, 2023
1 parent f0a3be2 commit aff257f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 20 deletions.
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<properties>
<java.version>1.8</java.version>
<core.version>4.3.10</core.version>
<minigamecore.version>2.2.2</minigamecore.version>
<minigamecore.version>3.4.0</minigamecore.version>
<unihologram.version>2.2.0</unihologram.version>
<blockutil.version>3.0.1</blockutil.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -191,6 +191,11 @@
<artifactId>minigamecore-implementation</artifactId>
<version>${minigamecore.version}</version>
</dependency>
<dependency>
<groupId>me.hsgamer</groupId>
<artifactId>minigamecore-manager</artifactId>
<version>${minigamecore.version}</version>
</dependency>

<dependency>
<groupId>me.hsgamer</groupId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/hsgamer/gamesinthebox/game/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package me.hsgamer.gamesinthebox.game;

import me.hsgamer.gamesinthebox.planner.Planner;
import me.hsgamer.minigamecore.base.ArenaManager;
import me.hsgamer.minigamecore.manager.ArenaManager;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

Expand Down
19 changes: 1 addition & 18 deletions src/main/java/me/hsgamer/gamesinthebox/game/GameArena.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public abstract class GameArena extends HSCoreBukkitArena implements StringRepla
* @param planner the planner that the arena belongs to
*/
protected GameArena(@NotNull String name, @NotNull Game game, @NotNull Planner planner) {
super(planner.getName() + "-" + name, game);
super(planner.getName() + "-" + name, game, planner);
this.localName = name;
this.game = game;
this.planner = planner;
Expand Down Expand Up @@ -114,21 +114,4 @@ protected List<Feature> loadFeatures() {
features.add(new GameConfigFeature(this));
return features;
}

/**
* {@inheritDoc}
* If the feature is not found in the {@link GameArena}, it will get from the {@link Planner} that the arena belongs to.
*
* @param featureClass the class of the feature
* @param <T> the type of the feature
* @return the feature
*/
@Override
public <T extends Feature> T getFeature(Class<T> featureClass) {
T feature = super.getFeature(featureClass);
if (feature == null) {
feature = planner.getFeature(featureClass);
}
return feature;
}
}

0 comments on commit aff257f

Please sign in to comment.