Skip to content

Commit

Permalink
Throw votifier events for offline players
Browse files Browse the repository at this point in the history
Also temporarily restore the old pom to permit building - this needs to
be fixed at some point. Also, temporarily use the placeholder Event
functions.
  • Loading branch information
mcmonkey4eva committed Feb 24, 2014
1 parent a077e7e commit adccb94
Show file tree
Hide file tree
Showing 15 changed files with 244 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -37,4 +37,4 @@
/atlassian-ide-plugin.xml

# resource jars
*.jar
# *.jar
211 changes: 211 additions & 0 deletions INPROGRESS_POM.xml
@@ -0,0 +1,211 @@
<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>net.gnomeffinway.depenizen</groupId>
<artifactId>Depenizen</artifactId>
<version>0.2.0</version>
<name>Depenizen</name>
<url>https://github.com/Morphan1/Depenizen</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<bukkit.version>1.7.2-R0.3-SNAPSHOT</bukkit.version>
<citizens.version>2.0.11-SNAPSHOT</citizens.version>
<BUILD_NUMBER>Unknown</BUILD_NUMBER>
</properties>

<issueManagement>
<system>GitHub</system>
<url>https://github.com/Morphan1/Depenizen/issues</url>
</issueManagement>

<ciManagement>
<system>jenkins</system>
<url>http://ci.citizensnpcs.co</url>
</ciManagement>
<scm>
<connection>scm:git:git://github.com/Morphan1/Depenizen.git</connection>
<developerConnection>scm:git:git:@github.com:Morphan1/Depenizen.git</developerConnection>
<url>https://github.com/Morphan1/Depenizen/tree/master/</url>
</scm>

<build>
<finalName>Depenizen</finalName>
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
<resources>
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src/main/resources/</directory>
<includes>
<include>*.yml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/main/assembly/package.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>build</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
<version>2.2</version>
</extension>
</extensions>
</build>
<repositories>
<repository>
<id>bukkit-repo</id>
<url>http://repo.bukkit.org/content/groups/public/</url>
</repository>
<!-- TODO: Replace me!
<repository>
<id>mcmmo-repo</id>
<url>http://ci.ecocitycraft.com</url>
</repository>
-->
<repository>
<id>Depenizen-mvn-repo</id>
<url>https://raw.github.com/Morphan1/Depenizen-mvn-repo/master/</url>
</repository>
<repository>
<id>battlenight-repo</id>
<url>https://raw.github.com/BattleNight/BattleNight-API/repo/</url>
</repository>
<repository>
<id>citizens</id>
<url>http://repo.citizensnpcs.co</url>
</repository>
<repository>
<id>vault-repo</id>
<url>http://ci.herocraftonline.com/plugin/repository/everything/</url>
</repository>
<repository>
<id>dynmap-repo</id>
<url>http://repo.mikeprimm.com/</url>
</repository>
<repository>
<id>heroes-repo</id>
<url>http://nexus.theyeticave.net/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<type>jar</type>
<scope>provided</scope>
<version>${bukkit.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.palmergames.towny</groupId>
<artifactId>Towny</artifactId>
<version>0.84.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.massivecraft</groupId>
<artifactId>Factions</artifactId>
<version>2.3.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.massivecraft</groupId>
<artifactId>mcore</artifactId>
<version>7.0.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>me.limebyte</groupId>
<artifactId>BattleNight-API</artifactId>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.milkbowl.vault</groupId>
<artifactId>Vault</artifactId>
<version>1.2.23-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.aufdemrand</groupId>
<artifactId>denizen</artifactId>
<version>0.9.4-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.gmail.nossr50</groupId>
<artifactId>mcMMO</artifactId>
<version>1.4.07</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vexsoftware</groupId>
<artifactId>Votifier</artifactId>
<version>1.9</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>me.zford</groupId>
<artifactId>Jobs</artifactId>
<version>2.11.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.slipcor</groupId>
<artifactId>pvparena</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.herocraftonline.heroes</groupId>
<artifactId>Heroes</artifactId>
<version>1.5.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens</artifactId>
<version>${citizens.version}</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.dynmap</groupId>
<artifactId>dynmap-api</artifactId>
<version>1.9</version>
</dependency>
</dependencies>
</project>
55 changes: 27 additions & 28 deletions pom.xml
Expand Up @@ -82,20 +82,10 @@
<id>bukkit-repo</id>
<url>http://repo.bukkit.org/content/groups/public/</url>
</repository>
<!-- TODO: Replace me!
<repository>
<id>mcmmo-repo</id>
<url>http://ci.ecocitycraft.com</url>
</repository>
-->
<repository>
<id>Depenizen-mvn-repo</id>
<url>https://raw.github.com/Morphan1/Depenizen-mvn-repo/master/</url>
</repository>
<repository>
<id>battlenight-repo</id>
<url>https://raw.github.com/BattleNight/BattleNight-API/repo/</url>
</repository>
<repository>
<id>citizens</id>
<url>http://repo.citizensnpcs.co</url>
Expand All @@ -118,7 +108,7 @@
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<type>jar</type>
<scope>provided</scope>
<scope>compile</scope>
<version>${bukkit.version}</version>
</dependency>
<dependency>
Expand All @@ -128,28 +118,32 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.palmergames.towny</groupId>
<groupId>com.palmergames</groupId>
<artifactId>Towny</artifactId>
<version>0.84.0.0</version>
<scope>provided</scope>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/Towny.jar</systemPath>
</dependency>
<dependency>
<groupId>com.massivecraft</groupId>
<artifactId>Factions</artifactId>
<version>2.3.0</version>
<scope>compile</scope>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/Factions.jar</systemPath>
</dependency>
<dependency>
<groupId>com.massivecraft</groupId>
<artifactId>mcore</artifactId>
<version>7.0.1</version>
<scope>compile</scope>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/mcore.jar</systemPath>
</dependency>
<dependency>
<groupId>me.limebyte</groupId>
<artifactId>BattleNight-API</artifactId>
<version>2.0.0</version>
<scope>provided</scope>
<artifactId>BattleNight</artifactId>
<version>1.10.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/BattleNight.jar</systemPath>
</dependency>
<dependency>
<groupId>net.milkbowl.vault</groupId>
Expand All @@ -169,31 +163,36 @@
<groupId>com.gmail.nossr50</groupId>
<artifactId>mcMMO</artifactId>
<version>1.4.07</version>
<scope>provided</scope>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/mcMMO.jar</systemPath>
</dependency>
<dependency>
<groupId>com.vexsoftware</groupId>
<artifactId>Votifier</artifactId>
<version>1.9</version>
<scope>compile</scope>
<version>6.5.2</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/Votifier.jar</systemPath>
</dependency>
<dependency>
<groupId>me.zford</groupId>
<artifactId>Jobs</artifactId>
<version>2.11.4</version>
<scope>compile</scope>
<version>2.11.3</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/Jobs.jar</systemPath>
</dependency>
<dependency>
<groupId>net.slipcor</groupId>
<artifactId>pvparena</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
<version>1.0.9.287</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/pvparena.jar</systemPath>
</dependency>
<dependency>
<groupId>com.herocraftonline.heroes</groupId>
<groupId>com.herocraftonline</groupId>
<artifactId>Heroes</artifactId>
<version>1.5.5</version>
<scope>compile</scope>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/Heroes.jar</systemPath>
</dependency>
<dependency>
<groupId>net.citizensnpcs</groupId>
Expand Down
Expand Up @@ -5,6 +5,7 @@
import net.aufdemrand.denizen.objects.Element;
import net.aufdemrand.denizen.objects.dEntity;
import net.aufdemrand.denizen.objects.dNPC;
import net.aufdemrand.denizen.objects.dPlayer;
import net.aufdemrand.denizen.objects.dObject;
import net.gnomeffinway.depenizen.Depenizen;
import org.bukkit.entity.Player;
Expand Down Expand Up @@ -52,7 +53,7 @@ else if (hero.isPlayer())
String determination = EventManager.doEvents(Arrays.asList
("hero changes class",
"hero changes class to " + event.getTo().getName()),
npc, player, context).toUpperCase();
npc, new dPlayer(player), context, 1).toUpperCase();

if (determination.equals("CANCELLED")) {
event.setCancelled(true);
Expand Down
Expand Up @@ -49,7 +49,7 @@ public void onArenaStarts(PAStartEvent event) {

EventManager.doEvents(Arrays.asList
("arena starts"),
null, null, context);
null, null, context, 1);

}

Expand Down
Expand Up @@ -14,6 +14,7 @@
import net.aufdemrand.denizen.events.EventManager;
import net.aufdemrand.denizen.objects.Element;
import net.aufdemrand.denizen.objects.dObject;
import net.aufdemrand.denizen.objects.dPlayer;
import net.gnomeffinway.depenizen.Depenizen;

public class VotifierEvents implements Listener {
Expand Down Expand Up @@ -53,7 +54,7 @@ public void onVotifierEvent(VotifierEvent event) {

EventManager.doEvents(Arrays.asList
("votifier vote", "bungeefier vote"),
null, Bukkit.getPlayer(vote.getUsername()), context);
null, new dPlayer(Bukkit.getOfflinePlayer(vote.getUsername())), context, 1);

}

Expand Down
Binary file added src/main/resources/BattleNight.jar
Binary file not shown.
Binary file added src/main/resources/Factions.jar
Binary file not shown.
Binary file added src/main/resources/Heroes.jar
Binary file not shown.
Binary file added src/main/resources/Jobs.jar
Binary file not shown.
Binary file added src/main/resources/Towny.jar
Binary file not shown.
Binary file added src/main/resources/Votifier.jar
Binary file not shown.
Binary file added src/main/resources/mcMMO.jar
Binary file not shown.
Binary file added src/main/resources/mcore.jar
Binary file not shown.
Binary file added src/main/resources/pvparena.jar
Binary file not shown.

0 comments on commit adccb94

Please sign in to comment.