Skip to content

Commit

Permalink
Update to GameBox v3.0.0-beta.2
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasEi committed Mar 30, 2020
1 parent fe92afc commit 8356051
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 34 deletions.
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change log


### v4.0.0-beta
- update to GAmeBox v3 and MC 1.14+

#

### v 3.0.1
- empty inventory when player closes the game to stop players from taking ghost items.

Expand Down
72 changes: 62 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,63 @@
<modelVersion>4.0.0</modelVersion>

<groupId>me.nikl.gamebox.games</groupId>
<artifactId>GemCrush</artifactId>
<version>4.0.0-alpha</version>
<artifactId>gemcrush</artifactId>
<name>GemCrush</name>
<packaging>jar</packaging>
<version>4.0.0-beta</version>
<description>Match items and let it rain gems</description>

<distributionManagement>
<repository>
<id>nikl-repo</id>
<url>http://repo.nikl.me/artifactory/public</url>
</repository>
</distributionManagement>

<scm>
<url>https://github.com/NiklasEi/gemcrush-for-gamebox</url>
<connection>[email protected]:NiklasEi/gemcrush-for-gamebox.git</connection>
</scm>

<build>
<defaultGoal>clean package</defaultGoal>
<finalName>${project.name}</finalName>
<sourceDirectory>src/main/java</sourceDirectory>
<directory>target</directory>
<resources>
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src/main/resources</directory>
<includes>
<include>**/*.yml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create-timestamp</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<repositories>
<repository>
Expand All @@ -30,20 +85,17 @@
<!-- GameBox -->
<dependency>
<groupId>me.nikl</groupId>
<artifactId>gamebox-core</artifactId>
<version>3.0.0-alpha</version>
<artifactId>gamebox</artifactId>
<version>${gamebox.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<defaultGoal>clean package</defaultGoal>
<finalName>${project.artifactId}</finalName>
</build>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<gamebox.version>3.0.0-beta.2</gamebox.version>
</properties>
</project>
</project>
26 changes: 9 additions & 17 deletions src/main/java/me/nikl/gamebox/games/GemCrushMain.java
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
package me.nikl.gamebox.games;

import me.nikl.gamebox.GameBox;
import me.nikl.gamebox.Module;
import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import me.nikl.gamebox.games.gemcrush.GemCrush;
import me.nikl.gamebox.module.GameBoxModule;

/**
* @author Niklas Eicker
*/
public class GemCrushMain extends JavaPlugin {
public class GemCrushMain extends GameBoxModule {
public static final String GEM_CRUSH = "gemcrush";
private GameBox gameBox;

@Override
public void onEnable() {
Plugin plugin = Bukkit.getPluginManager().getPlugin("GameBox");
if (plugin == null || !plugin.isEnabled()) {
getLogger().warning(" GameBox was not found! Disabling GemCrush...");
Bukkit.getPluginManager().disablePlugin(this);
return;
}
gameBox = (GameBox) plugin;
new Module(gameBox, GEM_CRUSH
, "me.nikl.gamebox.games.gemcrush.GemCrush"
, this, GEM_CRUSH, "gc");
registerGame(GEM_CRUSH, GemCrush.class, "gc");
}

@Override
public void onDisable() {

}
}
10 changes: 10 additions & 0 deletions src/main/resources/module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
id: ${project.artifactId}
version: ${project.version}
authors: ["Niklas Eicker"]
name: ${project.name}
description: ${project.description}
sourceUrl: ${project.scm.url}
updatedAt: !!java.lang.Long ${timestamp}
dependencies:
- id: gamebox
versionConstrain: ">= ${gamebox.version}"
7 changes: 0 additions & 7 deletions src/main/resources/plugin.yml

This file was deleted.

0 comments on commit 8356051

Please sign in to comment.