Made flairs pernament
This commit is contained in:
parent
d30126e1cf
commit
f99c0528dd
5 changed files with 34 additions and 22 deletions
Binary file not shown.
|
@ -111,21 +111,24 @@ public class Commands implements CommandExecutor {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "ignore": {
|
case "ignore": {
|
||||||
if (p.FlairState.equals(FlairStates.NoComment)) {
|
/*
|
||||||
player.sendMessage("§cError: You need to write your username to the reddit thread at /r/TheButtonMinecraft§r");
|
* if (p.FlairState.equals(FlairStates.NoComment)) {
|
||||||
return true;
|
* player.sendMessage(
|
||||||
}
|
* "§cError: You need to write your username to the reddit thread at /r/TheButtonMinecraft§r"
|
||||||
if (p.FlairState.equals(FlairStates.Commented)) {
|
* ); return true; } if
|
||||||
player.sendMessage("Sorry, but your flair isn't recorded. Please ask a mod to set it for you.");
|
* (p.FlairState.equals(FlairStates.Commented)) {
|
||||||
return true;
|
* player.sendMessage(
|
||||||
}
|
* "Sorry, but your flair isn't recorded. Please ask a mod to set it for you."
|
||||||
if (!p.FlairState.equals(FlairStates.Ignored)) {
|
* ); return true; } if
|
||||||
p.FlairState = FlairStates.Ignored;
|
* (!p.FlairState.equals(FlairStates.Ignored)) {
|
||||||
p.SetFlairTime("");
|
* p.FlairState = FlairStates.Ignored; p.SetFlairTime("");
|
||||||
p.UserName = "";
|
* p.UserName = ""; player.sendMessage(
|
||||||
player.sendMessage("§bYou have removed your flair. You can still use /u accept to get one.§r");
|
* "§bYou have removed your flair. You can still use /u accept to get one.§r"
|
||||||
} else
|
* ); } else
|
||||||
player.sendMessage("§cYou already removed your flair.§r");
|
* player.sendMessage("§cYou already removed your flair.§r"
|
||||||
|
* );
|
||||||
|
*/
|
||||||
|
player.sendMessage("§cSorry, but ignoring the flair is no longer possible. As with the original Button, you can't undo what already happened.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "admin": // 2015.08.09.
|
case "admin": // 2015.08.09.
|
||||||
|
@ -365,12 +368,21 @@ public class Commands implements CommandExecutor {
|
||||||
|
|
||||||
private static void SetPlayerFlair(Player player,
|
private static void SetPlayerFlair(Player player,
|
||||||
MaybeOfflinePlayer targetplayer, short flaircolor, String flairtime) {
|
MaybeOfflinePlayer targetplayer, short flaircolor, String flairtime) {
|
||||||
targetplayer.SetFlair(flaircolor, flairtime);
|
if (targetplayer.GetFlairColor() == 0x00 || flairtime.length() > 0) {
|
||||||
targetplayer.FlairState = FlairStates.Accepted;
|
targetplayer.SetFlair(flaircolor, flairtime);
|
||||||
targetplayer.UserName = "";
|
targetplayer.FlairState = FlairStates.Accepted;
|
||||||
SendMessage(player,
|
targetplayer.UserName = "";
|
||||||
"§bThe flair has been set. Player: " + targetplayer.PlayerName
|
SendMessage(player,
|
||||||
+ " Flair: " + targetplayer.GetFormattedFlair() + "§r");
|
"§bThe flair has been set. Player: "
|
||||||
|
+ targetplayer.PlayerName + " Flair: "
|
||||||
|
+ targetplayer.GetFormattedFlair() + "§r");
|
||||||
|
} else {
|
||||||
|
SendMessage(
|
||||||
|
player,
|
||||||
|
"§cSorry, but you can't change an existing flair. (Use -- as time to set non-presser or can't press)");
|
||||||
|
SendMessage(Bukkit.getPlayer(targetplayer.UUID),
|
||||||
|
"§cYour flair cannot be changed.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void DoSetFlair(Player player, String[] args) {
|
private static void DoSetFlair(Player player, String[] args) {
|
||||||
|
|
|
@ -201,7 +201,7 @@ public class PlayerListener implements Listener { // 2015.07.16.
|
||||||
color = String.format(
|
color = String.format(
|
||||||
"§%x",
|
"§%x",
|
||||||
(mp.GetFlairColor() == 0x00 ? 0xb : mp
|
(mp.GetFlairColor() == 0x00 ? 0xb : mp
|
||||||
.GetFlairColor())); // TODO: Quiz queue
|
.GetFlairColor()));
|
||||||
}
|
}
|
||||||
|
|
||||||
message = message.replaceAll(
|
message = message.replaceAll(
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue