Skip to content

Commit

Permalink
Initial Commit for NoCollide
Browse files Browse the repository at this point in the history
  • Loading branch information
ataranlen committed Jun 10, 2016
1 parent 68346aa commit 447acf9
Show file tree
Hide file tree
Showing 13 changed files with 233 additions and 0 deletions.
36 changes: 36 additions & 0 deletions NoCollide/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
23 changes: 23 additions & 0 deletions NoCollide/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>NoCollide</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
8 changes: 8 additions & 0 deletions NoCollide/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
4 changes: 4 additions & 0 deletions NoCollide/.settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
45 changes: 45 additions & 0 deletions NoCollide/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
A fairly simple plugin, but it requires that you use permissionsEX.

With this plugin, you can give players access to change their own suffix. I couldn't find a plugin that would do exactly what I wanted, so I started writing one to fit my own needs. If you have any suggestions, feel free to join the discussion.

If you want to see it in action, join anarchy.minetexas.com

##Requirements:
- Spigot 1.9+
- permissionsEX
- Herochat (Optional)

##Commands:
* /badge set [name]- Change your badge to one you own
* /badge give [name] [player]- Grant a player access to a group badge
* /badge take [name] [player]- Remove a player's access to a group badge
* /badge remove - Remove your current badge
* /badge owned - List all your owned badges
* /badge group - List all your group badges
* /badge list - List all possible badges
* /badge reload - Reload from the badges.yml [OP/Console only]
* /chat [name] [message] - Send a chat message to all players with permissions to chat for the named badge.
* /bc [name] [message] - Same as /chat
* /chat list - Show all the badge chat channels you can chat in.

##Permissions:
```
suffixcommands.badge.set - Allows setting of own badge
suffixcommands.badge.[name] - gives access to set the named badge
suffixcommands.badgegroup - Allows use of set, give, and take for a badge
suffixcommands.chat.[name] - Allows sending and receiving 'Badge Chat' with /chat or /bc
```

##Default Config:
```
#Default Badges
badges:
- name: 'gimmie'
badgeText: ' &b༼ つ ◕_◕ ༽つ'
color: '&b'
```

If you enjoy this plugin, consider [sponsoring one of our servers](http://www.minetexas.com/minetexas-store-usd-bitcoin.html) for a week or more.

- Bitcoin: 1PPwsvXLgfycHALXTAHSUjSUfzQYw16NKb
- DogeCoin: DBKYU97oLvU6pk5MDs8inMt1AokW6fpjwC
45 changes: 45 additions & 0 deletions NoCollide/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<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>com.minetexas</groupId>
<version>0.1</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>bukkit-repo</id>
<url>http://repo.bukkit.org/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.9-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>com.dthielke.herochat.Herochat</groupId>
<artifactId>HeroChat</artifactId>
<version>5.6.7-SNAPSHOT</version>
<scope>system</scope>
<systemPath>D:/civcraftsvn/trunk/lib/HeroChat.jar</systemPath>
</dependency>

</dependencies>
<artifactId>NoCollide</artifactId>
</project>
21 changes: 21 additions & 0 deletions NoCollide/src/main/java/com/minetexas/nocollide/MobListener.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.minetexas.nocollide;

//import org.bukkit.attribute.Attribute;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;

public class MobListener implements Listener {
@EventHandler(priority = EventPriority.NORMAL)
public void onCreatureSpawnEvent(CreatureSpawnEvent event) {
if (event.getSpawnReason().equals(SpawnReason.SPAWNER)) {
LivingEntity entity = event.getEntity();
// entity.getAttribute(Attribute.ZOMBIE_SPAWN_REINFORCEMENTS).setBaseValue(0.0);
entity.setCollidable(false);
return;
}
}
}
17 changes: 17 additions & 0 deletions NoCollide/src/main/java/com/minetexas/nocollide/NoCollide.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.minetexas.nocollide;

import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;

public class NoCollide extends JavaPlugin {
@Override
public void onEnable() {
this.getLogger().info("Enabled");
final PluginManager pluginManager = getServer().getPluginManager();
pluginManager.registerEvents(new MobListener(), this);
}
@Override
public void onDisable() {
this.getLogger().info("Disable");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.minetexas.nocollide.exception;

public class InvalidConfiguration extends Exception {

private static final long serialVersionUID = 6603010451357647626L;

public InvalidConfiguration(String message) {
super(message);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.minetexas.nocollide.exception;

public class MTException extends Exception {
private static final long serialVersionUID = 2752707013644337603L;

public MTException(String message) {
super(message);
}
}
5 changes: 5 additions & 0 deletions NoCollide/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: NoCollide
main: com.minetexas.nocollide.NoCollide
version: 0.1
author: ataranlen
description: Disable Spawn Mob Collision
5 changes: 5 additions & 0 deletions NoCollide/target/classes/plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: NoCollide
main: com.minetexas.nocollide.NoCollide
version: 0.1
author: ataranlen
description: Disable Spawn Mob Collision
5 changes: 5 additions & 0 deletions NoCollide/target/maven-archiver/pom.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#Generated by Maven
#Thu Jun 09 19:39:50 CDT 2016
version=0.1
groupId=com.minetexas
artifactId=NoCollide

0 comments on commit 447acf9

Please sign in to comment.