-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from AlexProgrammerDE/master
Added rainbow color
- Loading branch information
Showing
11 changed files
with
2,232 additions
and
899 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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>Leee.nc</groupId> | ||
<artifactId>LeeesNC</artifactId> | ||
<version>10.0.2</version> | ||
<packaging>jar</packaging> | ||
|
||
<name>LeeesNC</name> | ||
|
||
<description>Leees Name Colour Plugin</description> | ||
<url>http://6b6t.org</url> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>7</source> | ||
<target>7</target> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<repositories> | ||
<!-- This adds the Spigot Maven repository to the build --> | ||
<repository> | ||
<id>spigot-repo</id> | ||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url> | ||
</repository> | ||
</repositories> | ||
|
||
<dependencies> | ||
<!--This adds the Spigot API artifact to the build --> | ||
<dependency> | ||
<groupId>org.spigotmc</groupId> | ||
<artifactId>spigot-api</artifactId> | ||
<version>1.15.2-R0.1-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package leee.nc; | ||
|
||
import leee.nc.command.NCCommand; | ||
import leee.nc.listener.Join; | ||
import org.bukkit.Bukkit; | ||
import org.bukkit.ChatColor; | ||
import org.bukkit.command.Command; | ||
import org.bukkit.command.CommandSender; | ||
import org.bukkit.entity.Player; | ||
import org.bukkit.event.EventHandler; | ||
import org.bukkit.event.Listener; | ||
import org.bukkit.event.player.PlayerJoinEvent; | ||
import org.bukkit.plugin.java.JavaPlugin; | ||
|
||
public class Main extends JavaPlugin implements Listener { | ||
public void onEnable() { | ||
String prefix = ChatColor.AQUA + "[LeeesNC] " + ChatColor.WHITE; | ||
|
||
getServer().getConsoleSender().sendMessage(prefix + "Registering events"); | ||
Bukkit.getServer().getPluginManager().registerEvents(new Join(), this); | ||
|
||
getServer().getConsoleSender().sendMessage(prefix + "Registering command"); | ||
Bukkit.getServer().getPluginCommand("nc").setExecutor(new NCCommand()); | ||
Bukkit.getServer().getPluginCommand("nc").setTabCompleter(new NCCommand()); | ||
|
||
getServer().getConsoleSender().sendMessage(prefix + "Finished loading! :)"); | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package leee.nc.listener; | ||
|
||
import leee.nc.Main; | ||
import org.bukkit.entity.Player; | ||
import org.bukkit.event.EventHandler; | ||
import org.bukkit.event.Listener; | ||
import org.bukkit.event.player.PlayerJoinEvent; | ||
|
||
public class Join implements Listener { | ||
@EventHandler | ||
public void onJoin(PlayerJoinEvent e) { | ||
Player player = e.getPlayer(); | ||
if (Main.getPlugin(Main.class).getConfig().getString(e.getPlayer().getName()) != null) { | ||
player.setDisplayName(Main.getPlugin(Main.class).getConfig().getString(player.getName())); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: LeeesNC | ||
version: 10.0.2 | ||
main: leee.nc.Main | ||
api-version: 1.12 | ||
authors: [Nate, Legault] | ||
description: Leees Name Colour Plugin | ||
website: https://www.6b6t.org | ||
commands: | ||
nc: | ||
description: Change your name color. | ||
aliases: [namecolor, namecolour] | ||
permissions: | ||
Leee.nc: | ||
description: Gives access to changing name color via the /nc command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.