first commit
This commit is contained in:
parent
d1c638d741
commit
92be180d3e
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
Maya.iml
|
||||
/.idea
|
4
Maya.iml
4
Maya.iml
@ -11,7 +11,7 @@
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.10-R0.1-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.10.2-R0.1-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-lang:commons-lang:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.googlecode.json-simple:json-simple:1.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: junit:junit:4.10" level="project" />
|
||||
@ -21,7 +21,7 @@
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.avaje:ebean:2.8.1" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.15" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.9-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.10-SNAPSHOT" level="project" />
|
||||
<orderEntry type="module" module-name="Core" />
|
||||
<orderEntry type="library" name="Maven: org.bukkit:craftbukkit:1.10.2-R0.1-SNAPSHOT" level="project" />
|
||||
<orderEntry type="module" module-name="CloudCommons" />
|
||||
|
7
pom.xml
7
pom.xml
@ -61,14 +61,9 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.10-R0.1-SNAPSHOT</version>
|
||||
<version>1.10.2-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>eu.univento</groupId>
|
||||
<artifactId>Core</artifactId>
|
||||
<version>LATEST</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>eu.univento</groupId>
|
||||
<artifactId>Core</artifactId>
|
||||
|
@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="target" level="project" />
|
||||
<orderEntry type="library" name="target1" level="project" />
|
||||
<orderEntry type="library" name="Kartoffelsuppe" level="project" />
|
||||
<orderEntry type="library" name="Core" level="project" />
|
||||
<orderEntry type="library" name="FakeCore" level="project" />
|
||||
<orderEntry type="library" name="test-1.0-SNAPSHOT-jar-with-dependencies" level="project" />
|
||||
<orderEntry type="module" module-name="FakeCore" />
|
||||
<orderEntry type="module" module-name="Core" />
|
||||
</component>
|
||||
</module>
|
@ -1,10 +1,6 @@
|
||||
package eu.univento.maya;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import eu.univento.core.api.server.Game;
|
||||
import eu.univento.commons.server.ServerType;
|
||||
import eu.univento.core.api.server.ServerSettings;
|
||||
import eu.univento.maya.game.GameStage;
|
||||
import eu.univento.maya.game.LobbyCounter;
|
||||
@ -15,6 +11,10 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* main class
|
||||
* @author joethei
|
||||
@ -91,9 +91,7 @@ public class Maya extends JavaPlugin{
|
||||
instance = this;
|
||||
PluginManager pm = Bukkit.getPluginManager();
|
||||
pm.registerEvents(new PlayerEvents(), this);
|
||||
|
||||
ServerSettings.setGame(true);
|
||||
ServerSettings.setPlayedGame(Game.Maya);
|
||||
ServerSettings.setServerType(ServerType.GAME_MAYA);
|
||||
ServerSettings.setGameMode(GameMode.ADVENTURE);
|
||||
log(Level.INFO, "Plugin Version: " + getDescription().getVersion() + " gestartet");
|
||||
stage = GameStage.Lobby;
|
||||
|
@ -1,10 +1,10 @@
|
||||
package eu.univento.maya.game;
|
||||
|
||||
import eu.univento.core.api.Title;
|
||||
import eu.univento.core.Core;
|
||||
import eu.univento.core.api.player.CustomPlayer;
|
||||
import eu.univento.maya.Maya;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
/**
|
||||
@ -17,8 +17,8 @@ public class BuyCounter extends BukkitRunnable{
|
||||
|
||||
public void run() {
|
||||
if(Maya.getStage() == GameStage.Buy) {
|
||||
for(Player players : Bukkit.getOnlinePlayers()) {
|
||||
Title.sendTitle(players, 1, 1, 1, "§6" + time, "");
|
||||
for(CustomPlayer players : Core.getOnlinePlayers()) {
|
||||
players.sendTitle(1, 1, 1, "§6" + time, "");
|
||||
players.playSound(players.getEyeLocation(), Sound.ENTITY_ARROW_HIT, 1.0F, 1.0F);
|
||||
}
|
||||
if(time == 0) {
|
||||
|
@ -1,10 +1,10 @@
|
||||
package eu.univento.maya.game;
|
||||
|
||||
import eu.univento.core.api.Title;
|
||||
import eu.univento.core.Core;
|
||||
import eu.univento.core.api.player.CustomPlayer;
|
||||
import eu.univento.maya.Maya;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
/**
|
||||
@ -17,8 +17,8 @@ public class DeathmatchCounter extends BukkitRunnable{
|
||||
|
||||
public void run() {
|
||||
if(Maya.getStage() == GameStage.DeathMatch) {
|
||||
for(Player players : Bukkit.getOnlinePlayers()) {
|
||||
Title.sendTitle(players, 1, 1, 1, "§6" + time, "");
|
||||
for(CustomPlayer players : Core.getOnlinePlayers()) {
|
||||
players.sendTitle(1, 1, 1, "§6" + time, "");
|
||||
players.playSound(players.getEyeLocation(), Sound.ENTITY_ARROW_HIT, 1.0F, 1.0F);
|
||||
}
|
||||
if(time == 0) {
|
||||
|
@ -1,10 +1,11 @@
|
||||
package eu.univento.maya.game;
|
||||
|
||||
import eu.univento.core.Core;
|
||||
import eu.univento.core.api.player.CustomPlayer;
|
||||
import eu.univento.maya.Maya;
|
||||
import eu.univento.maya.modules.Modules;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
/**
|
||||
@ -18,7 +19,7 @@ public class LobbyCounter extends BukkitRunnable{
|
||||
|
||||
public void run() {
|
||||
if(Maya.getStage() == GameStage.Lobby && Bukkit.getOnlinePlayers().size() >= Maya.getMinPlayers()) {
|
||||
for(Player players : Bukkit.getOnlinePlayers()) {
|
||||
for(CustomPlayer players : Core.getOnlinePlayers()) {
|
||||
players.setLevel(time);
|
||||
if(time == 30) {
|
||||
Modules.generate();
|
||||
|
@ -23,7 +23,8 @@ public class RestartCounter extends BukkitRunnable{
|
||||
if(time == 0) {
|
||||
Bukkit.getScheduler().cancelTask(Maya.restartID);
|
||||
Utils.restart();
|
||||
ServerSettings.setPlayedGame(null);
|
||||
ServerSettings.setServerType(null);
|
||||
ServerSettings.setGameState(Maya.getStage().name());
|
||||
Servers.connectAllToServer("Lobby01");
|
||||
Bukkit.broadcastMessage("Alle würden jetzt auf die Lobby01 kommen");
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
package eu.univento.maya.game;
|
||||
|
||||
import eu.univento.core.api.Title;
|
||||
import eu.univento.core.Core;
|
||||
import eu.univento.core.api.player.CustomPlayer;
|
||||
import eu.univento.maya.Maya;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
/**
|
||||
@ -17,8 +17,8 @@ public class WarmupCounter extends BukkitRunnable{
|
||||
|
||||
public void run() {
|
||||
if(Maya.getStage() == GameStage.Warmup) {
|
||||
for(Player players : Bukkit.getOnlinePlayers()) {
|
||||
Title.sendTitle(players, 1, 10, 1, "§6" + time, "");
|
||||
for(CustomPlayer players : Core.getOnlinePlayers()) {
|
||||
players.sendTitle(1, 10, 1, "§6" + time, "");
|
||||
players.playSound(players.getEyeLocation(), Sound.ENTITY_ARROW_HIT, 1.0F, 1.0F);
|
||||
}
|
||||
if(time == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user