Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 16
uses: actions/setup-java@v2
with:
java-version: '11'
java-version: '16'
distribution: 'adopt'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 16
uses: actions/setup-java@v2
with:
java-version: '11'
java-version: '16'
distribution: 'adopt'
- name: Build with Maven
run: mvn -B package --file pom.xml
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Made by [The Asgard](https://asgrad.fun/) with love 💙

[discord]: https://img.shields.io/badge/Our-discord-blue?style=for-the-badge&logo=discord

[version]: https://img.shields.io/badge/Version-v1.2.0-success?style=for-the-badge&logo=wiki
[version]: https://img.shields.io/badge/Version-UNSTABLE-success?style=for-the-badge&logo=wiki
[download]: #how-to-use

[wiki]: https://img.shields.io/badge/-Our%20wiki-yellow?style=for-the-badge&logo=wiki
Expand All @@ -18,7 +18,7 @@ Made by [The Asgard](https://asgrad.fun/) with love 💙
[docs]: https://img.shields.io/badge/Our%20documentation-v1.2.0-important?style=for-the-badge&logo=wiki
[docs-url]: https://github.com/TheAsgard/TAGA/wiki/Documentation

[minecraft]: https://img.shields.io/badge/Minecraft-1.16.5-red?style=for-the-badge&logo=mojang-studios
[minecraft]: https://img.shields.io/badge/Minecraft-1.16.5+-red?style=for-the-badge&logo=mojang-studios
[minecraft-url]: https://www.minecraft.net/

[![version][]][download]
Expand All @@ -43,7 +43,7 @@ Works with [PaperMC][papermc-url], [SpigotMC][spigotmc-url], [MohistMC][mohist-u
<dependency>
<groupId>fun.asgard</groupId>
<artifactId>TAGA</artifactId>
<version>v1.2.0</version>
<version>UNSTABLE</version>
</dependency>
</dependencies>
```
Expand All @@ -58,7 +58,7 @@ repositories {
```
```gradle
dependencies {
implementation 'fun.asgard:TAGA:v1.2.0'
implementation 'fun.asgard:TAGA:UNSTABLE'
}
```

Expand Down
170 changes: 88 additions & 82 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,82 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>fun.asgard</groupId>
<artifactId>TAGA</artifactId>
<version>v1.2.0</version>
<packaging>jar</packaging>

<name>TAGA</name>

<properties>
<java.version>11</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub TheAsgard Apache Maven Packages</name>
<url>https://maven.pkg.github.com/TheAsgard/TAGA</url>
</repository>
</distributionManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>

<repositories>
<repository>
<id>papermc-repo</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>fun.asgard</groupId>
<artifactId>TAGA</artifactId>
<version>v1.2.0</version>
<packaging>jar</packaging>

<name>TAGA</name>

<properties>
<java.version>16</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>fun.asgard.TAGA</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>15</source>
<target>15</target>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>

<repositories>
<repository>
<id>papermc-repo</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

</project>
12 changes: 6 additions & 6 deletions src/main/java/fun/asgard/Handler.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package fun.asgard;

import fun.asgard.api.events.GamePlayerDeathEvent;
import fun.asgard.api.objects.GamePlayer;
import fun.asgard.api.events.gameplayerevents.GamePlayerDeathEvent;
import fun.asgard.api.objects.game.GamePlayer;

import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
Expand All @@ -23,17 +23,17 @@ protected Handler(TAGA taga, Plugin client) {
public void onPlayerKick(PlayerKickEvent event) {
this.pl.getGameManager().getGames().forEach((name, game) -> {
if (game.isLeaveOnKick()
&& game.getPlayers().containsKey(event.getPlayer())) {
game.disconnectPlayer(game.getPlayers().get(event.getPlayer()));
&& game.getPlayersManager().getPlayers().containsKey(event.getPlayer())) {
game.getPlayersManager().disconnectPlayer(game.getPlayersManager().getPlayers().get(event.getPlayer()));
}
});
}

@EventHandler
public void onPlayerDeath(PlayerDeathEvent event) {
this.pl.getGameManager().getGames().forEach((name, game) -> {
if (game.getPlayers().containsKey(event.getEntity())) {
GamePlayer gp = game.getPlayers().get(event.getEntity());
if (game.getPlayersManager().getPlayers().containsKey(event.getEntity())) {
GamePlayer gp = game.getPlayersManager().getPlayers().get(event.getEntity());
gp.setDied(true);
this.client.getServer().getPluginManager()
.callEvent(new GamePlayerDeathEvent(game, gp));
Expand Down
17 changes: 9 additions & 8 deletions src/main/java/fun/asgard/TAGA.java
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
package fun.asgard;

import fun.asgard.internal.managers.GameManager;
import fun.asgard.internal.managers.TaskManager;

import fun.asgard.api.objects.managers.GamesManager;
import fun.asgard.api.objects.managers.TaskManager;
import fun.asgard.internal.managers.gamemanager.EGameManager;
import fun.asgard.internal.managers.taskmanager.ETaskManager;
import org.bukkit.event.Listener;
import org.bukkit.plugin.Plugin;

public final class TAGA implements Listener {

private final GameManager gm;
private final GamesManager gm;
private final TaskManager tm;

private static final String VERSION = "v1.2.0";
private static final String VERSION = "v1.3.0";

public TAGA (Plugin client) {
if (client == null)
throw new IllegalArgumentException("Plugin must be valid");

client.getServer().getLogger().info("[TAGA] Starting TAGA-" + getVersion() + " on " + client.getServer().getVersion());

this.gm = new GameManager(this, client);
this.tm = new TaskManager(this, client);
this.gm = new EGameManager(this, client);
this.tm = new ETaskManager(this, client);
client.getServer().getPluginManager().registerEvents(new Handler(this, client), client);
}

public GameManager getGameManager() {
public GamesManager getGameManager() {
return gm;
}

Expand Down
44 changes: 0 additions & 44 deletions src/main/java/fun/asgard/api/events/GamePlayerDeathEvent.java

This file was deleted.

Loading