Skip to content

Commit

Permalink
Continute working on minigame manager, add tnt run
Browse files Browse the repository at this point in the history
  • Loading branch information
CaptnSisko committed Jan 1, 2021
1 parent 894d8f7 commit 08189f2
Show file tree
Hide file tree
Showing 9 changed files with 539 additions and 67 deletions.
80 changes: 80 additions & 0 deletions .factorypath
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<factorypath>
<factorypathentry kind="VARJAR" id="M2_REPO/com/destroystokyo/paper/paper-api/1.16.4-R0.1-SNAPSHOT/paper-api-1.16.4-R0.1-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-lang/commons-lang/2.6/commons-lang-2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/junit/junit/4.10/junit-4.10.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/guava/21.0/guava-21.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/md-5/bungeecord-chat/1.16-R0.3/bungeecord-chat-1.16-R0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/yaml/snakeyaml/1.26/snakeyaml-1.26.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm/8.0.1/asm-8.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm-commons/8.0.1/asm-commons-8.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm-tree/8.0.1/asm-tree-8.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm-analysis/8.0.1/asm-analysis-8.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/MilkBowl/VaultAPI/1.7/VaultAPI-1.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bukkit/bukkit/1.13.1-R0.1-SNAPSHOT/bukkit-1.13.1-R0.1-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sk89q/worldedit/worldedit-bukkit/7.2.0-SNAPSHOT/worldedit-bukkit-7.2.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sk89q/worldedit/worldedit-core/7.2.0-SNAPSHOT/worldedit-core-7.2.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sk89q/worldedit/worldedit-libs/core/7.2.0-SNAPSHOT/core-7.2.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/de/schlichtherle/truezip/6.8.3/truezip-6.8.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-profile-default_2.13/0.12.1/truevfs-profile-default_2.13-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/scala-lang/scala-library/2.13.1/scala-library-2.13.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-http/0.12.1/truevfs-driver-http-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-kernel-spec/0.12.1/truevfs-kernel-spec-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-annotations/2.5.0/truecommons-annotations-2.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/findbugs/annotations/3.0.0/annotations-3.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-cio/2.5.0/truecommons-cio-2.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-io/2.5.0/truecommons-io-2.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-services/2.5.0/truecommons-services-2.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-logging/2.5.0/truecommons-logging-2.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/inject/javax.inject/1/javax.inject-1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient/4.5.10/httpclient-4.5.10.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpcore/4.4.12/httpcore-4.4.12.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.11/commons-codec-1.11.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jcl-over-slf4j/1.7.28/jcl-over-slf4j-1.7.28.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-odf/0.12.1/truevfs-driver-odf-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-comp-zipdriver/0.12.1/truevfs-comp-zipdriver-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-comp-zip/0.12.1/truevfs-comp-zip-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcprov-jdk15on/1.63/bcprov-jdk15on-1.63.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-tar/0.12.1/truevfs-driver-tar-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-comp-tardriver/0.12.1/truevfs-comp-tardriver-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-compress/1.19/commons-compress-1.19.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-tar-bzip2/0.12.1/truevfs-driver-tar-bzip2-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-tar-gzip/0.12.1/truevfs-driver-tar-gzip-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-tar-xz/0.12.1/truevfs-driver-tar-xz-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/tukaani/xz/1.8/xz-1.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-zip-raes/0.12.1/truevfs-driver-zip-raes-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-profile-base_2.13/0.12.1/truevfs-profile-base_2.13-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-access-swing/0.12.1/truevfs-access-swing-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-access/0.12.1/truevfs-access-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-file/0.12.1/truevfs-driver-file-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-jar/0.12.1/truevfs-driver-jar-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-driver-zip/0.12.1/truevfs-driver-zip-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-comp-ibm437/0.12.1/truevfs-comp-ibm437-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truevfs/truevfs-kernel-impl_2.13/0.12.1/truevfs-kernel-impl_2.13-0.12.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-key-console/2.5.0/truecommons-key-console-2.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-key-default/2.5.0/truecommons-key-default-2.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-key-swing/2.5.0/truecommons-key-swing-2.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-key-macosx/2.5.0/truecommons-key-macosx-2.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-key-spec/2.5.0/truecommons-key-spec-2.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/truecommons/truecommons-shed/2.5.0/truecommons-shed-2.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mozilla/rhino-runtime/1.7.12/rhino-runtime-1.7.12.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/antlr4-runtime/4.7.2/antlr4-runtime-4.7.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sk89q/worldedit/worldedit-libs/bukkit/7.2.0-SNAPSHOT/bukkit-7.2.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/spigotmc/spigot-api/1.16.1-R0.1-SNAPSHOT/spigot-api-1.16.1-R0.1-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/papermc/paperlib/1.0.2/paperlib-1.0.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-slf4j-impl/2.8.1/log4j-slf4j-impl-2.8.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bstats/bstats-bukkit/1.7/bstats-bukkit-1.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/it/unimi/dsi/fastutil/8.2.1/fastutil-8.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/redis/clients/jedis/3.1.0-m3/jedis-3.1.0-m3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-pool2/2.6.1/commons-pool2-2.6.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/luckperms/api/5.0/api-5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-dbcp2/2.7.0/commons-dbcp2-2.7.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-logging/commons-logging/1.2/commons-logging-1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/json/json/20200518/json-20200518.jar" enabled="true" runInBatchMode="false"/>
</factorypath>
10 changes: 10 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>enginehub-maven</id>
<url>http://maven.enginehub.org/repo/</url>
</repository>
</repositories>
<dependencies>
<dependency>
Expand All @@ -56,6 +60,12 @@
<version>1.7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-bukkit</artifactId>
<version>7.2.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
Expand Down
24 changes: 17 additions & 7 deletions src/main/java/me/sisko/partygames/DefaultListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
import org.bukkit.event.player.PlayerItemDamageEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerQuitEvent;

import me.sisko.partygames.util.MinigameManager;
import net.md_5.bungee.api.ChatColor;

/*
Expand All @@ -34,15 +36,23 @@ public class DefaultListener implements Listener {

@EventHandler(priority = EventPriority.LOW)
public void onJoin(PlayerJoinEvent e) {
e.getPlayer().sendMessage(ChatColor.GREEN + "Welcome to party games!");
e.getPlayer().setGameMode(GameMode.SURVIVAL);
e.getPlayer().getInventory().clear();
FileConfiguration config = Main.getPlugin().getConfig();
e.getPlayer().teleport(new Location(Main.getWorld(), config.getDouble("spawn.x"),
config.getDouble("spawn.y"), config.getDouble("spawn.z"), (float) config.getDouble("spawn.yaw"),
(float) config.getDouble("spawn.pitch")));
if(!MinigameManager.addPlayer(e.getPlayer())) {
e.getPlayer().sendMessage(ChatColor.GREEN + "Welcome to party games!");
e.getPlayer().setGameMode(GameMode.SURVIVAL);
e.getPlayer().getInventory().clear();
FileConfiguration config = Main.getPlugin().getConfig();
e.getPlayer().teleport(new Location(Main.getWorld(), config.getDouble("spawn.x"),
config.getDouble("spawn.y"), config.getDouble("spawn.z"), (float) config.getDouble("spawn.yaw"),
(float) config.getDouble("spawn.pitch")));
}
}

@EventHandler(priority = EventPriority.LOW)
public void onLeave(PlayerQuitEvent e) {
MinigameManager.removePlayer(e.getPlayer());
}


// by default, disallow block modifications
@EventHandler(priority = EventPriority.LOW)
public void onBlockBreak(BlockBreakEvent e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
if(MinigameManager.isValidType(args[0])) {
MinigameManager.playGame(args[0]);
} else {
sender.sendMessage(args[0] + "is not a valid game!");
sender.sendMessage(args[0] + " is not a valid game!");
}
}
}
Expand Down
Loading

0 comments on commit 08189f2

Please sign in to comment.