Push 1.3.1

This commit is contained in:
Zontreck 2022-10-04 20:46:05 -07:00
parent 5f523c78bd
commit 75c0a26183
6 changed files with 91 additions and 14 deletions

View file

@ -7,7 +7,7 @@ plugins {
version = '1.3.0'
version = '1.3.1'
group = 'dev.zontreck.otemod' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'otemod'
@ -156,7 +156,7 @@ jar {
attributes([
"Specification-Title" : "otemod",
"Specification-Vendor" : "Zontreck",
"Specification-Version" : "1.3.0", // We are version 1 of ourselves
"Specification-Version" : "1.3.1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : "Zontreck",

View file

@ -62,13 +62,93 @@ public class ChatColor {
return RESET+WHITE;
}
public static String from(String nick){
switch(nick.toLowerCase()){
case "black":
public static String from(ColorOptions nick){
switch(nick){
case Black:
{
return BLACK;
}
case "crazy":
case Dark_Blue:
{
return DARK_BLUE;
}
case Dark_Green:
{
return DARK_GREEN;
}
case Dark_Aqua:
{
return DARK_AQUA;
}
case Dark_Red:
{
return DARK_RED;
}
case Dark_Purple:
{
return DARK_PURPLE;
}
case Gold:
{
return GOLD;
}
case Gray:
{
return GRAY;
}
case Dark_Gray:
{
return DARK_GRAY;
}
case Blue:
{
return BLUE;
}
case Green:
{
return GREEN;
}
case Aqua:
{
return AQUA;
}
case Red:
{
return RED;
}
case Light_Purple:
{
return LIGHT_PURPLE;
}
case Yellow:
{
return YELLOW;
}
case White:
{
return WHITE;
}
case MinecoinGold:
{
return MINECOIN_GOLD;
}
case Underline:
{
return UNDERLINE;
}
case Bold:
{
return BOLD;
}
case Italic:
{
return ITALIC;
}
case Strikethrough:
{
return STRIKETHROUGH;
}
case Crazy:
{
return CRAZY;
}

View file

@ -31,9 +31,8 @@ public class ChatColorCommand {
public static int setchatcolor(CommandSourceStack source, ColorOptions string) {
// Chat Color has a registry of colors that we can use to map back to our desired color
String actual_color = string.toString();
// To code
String colorcoded = ChatColor.from(actual_color);
String colorcoded = ChatColor.from(string);
// Get profile
if(source.getPlayer()==null){
@ -44,7 +43,7 @@ public class ChatColorCommand {
p.chat_color = colorcoded;
p.commit();
OTEMod.PROFILES.put(source.getPlayer().getStringUUID(), p);
source.sendSuccess(Component.literal(ChatColor.DARK_GRAY+ "["+ChatColor.DARK_GREEN+ "OTEMOD" + ChatColor.DARK_GRAY + "] "+ChatColor.DARK_PURPLE + "Your chat color has been updated"), false);
return 0;

View file

@ -31,9 +31,8 @@ public class NameColorCommand {
public static int setchatcolor(CommandSourceStack source, ColorOptions string) {
// Chat Color has a registry of colors that we can use to map back to our desired color
String actual_color = string.toString();
// To code
String colorcoded = ChatColor.from(actual_color);
String colorcoded = ChatColor.from(string);
// Get profile
if(source.getPlayer()==null){

View file

@ -31,9 +31,8 @@ public class PrefixColorCommand {
public static int setchatcolor(CommandSourceStack source, ColorOptions string) {
// Chat Color has a registry of colors that we can use to map back to our desired color
String actual_color = string.toString();
// To code
String colorcoded = ChatColor.from(actual_color);
String colorcoded = ChatColor.from(string);
// Get profile
if(source.getPlayer()==null){

View file

@ -19,7 +19,7 @@ modId="otemod" #mandatory
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata
# see the associated build.gradle script for how to populate this completely automatically during a build
version="1.3.0" #mandatory
version="1.3.1" #mandatory
# A display name for the mod
displayName="OTEMod Resources" #mandatory
# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/