Skip to content

Commit

Permalink
intense update
Browse files Browse the repository at this point in the history
  • Loading branch information
0-80 committed Jul 7, 2015
1 parent c21f697 commit c616aed
Show file tree
Hide file tree
Showing 4 changed files with 374 additions and 29 deletions.
30 changes: 30 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,25 @@
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>mkremins</groupId>
<artifactId>fanciful</artifactId>
<version>0.3.3-SNAPSHOT</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>bukkit-repo</id>
<url>http://repo.bukkit.org/content/groups/public/</url>
</repository>
<repository>
<id>fanciful-mvn-repo</id>
<url>http://repo.franga2000.com/artifactory/public</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<build>
<sourceDirectory>src</sourceDirectory>
Expand All @@ -29,6 +42,23 @@
<source>1.8</source>
<target>1.8</target>
</configuration>

</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>true</minimizeJar>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
Expand Down
5 changes: 0 additions & 5 deletions src/com/normarthehero/plugin/RolePlay.java

This file was deleted.

91 changes: 91 additions & 0 deletions src/com/normarthehero/plugin/RolePlayChat.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
package com.normarthehero.plugin;

import java.util.HashSet;

import mkremins.fanciful.FancyMessage;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;

public class RolePlayChat {

private HashSet<String> roleplayers = new HashSet<String>();
private boolean locked = false;
private String rpname;
private final String CREATOR;
private FancyMessage button;

public RolePlayChat(String name, String CREATOR) {
this.rpname = name;
button = new FancyMessage(name).color(ChatColor.YELLOW).command("/roleplay join " + name);
this.CREATOR = CREATOR;

roleplayers.add(CREATOR);

}

// should not exist
@Deprecated
public void chat(String msg) {

}

public void chatRaw(String msg) {
for (String player : roleplayers) {
Bukkit.getPlayer(player).sendMessage(msg);
}

}

public boolean isLocked() {
return locked;

}

public String getCreator() {
return CREATOR;

}

public void add(String name) {
roleplayers.add(name);

}

public void remove(String name) {
roleplayers.remove(name);

if (name.equals(CREATOR)) {
locked = false;

}

}

public String getName() {
return rpname;

}

public void lock() {
locked = true;

}

public void unlock() {
locked = false;

}

public boolean isRP(String name) {
return roleplayers.contains(name);

}

public void sendButton(CommandSender sender) {
button.send(sender);

}

}
Loading

0 comments on commit c616aed

Please sign in to comment.