Increased void teleporter area, added option to set message color

This commit is contained in:
Norbi Peti 2016-02-28 15:59:08 +01:00
parent 6d573a0d68
commit 15c6a57979
10 changed files with 30 additions and 13 deletions

Binary file not shown.

View file

@ -141,8 +141,7 @@ public class Commands implements CommandExecutor {
case "announce":
DoAnnounce(player, args, null);
break;
case "name":
{
case "name": {
if (args.length == 1) {
player.sendMessage("§cUsage: /u name <playername>§r");
break;
@ -175,16 +174,29 @@ public class Commands implements CommandExecutor {
DoKittyCannon(player, args);
break;
case "c":
if (PluginMain.permission.has(player, "tbmc.rainbow"))
{
p.RainbowPresserColorMode = !p.RainbowPresserColorMode;
if(p.RainbowPresserColorMode)
player.sendMessage("§eRainbow colors §aenabled.");
else
player.sendMessage("§eRainbow colors §cdisabled.");
if (args.length < 2) {
if (PluginMain.permission.has(player, "tbmc.rainbow")) {
p.RainbowPresserColorMode = !p.RainbowPresserColorMode;
p.OtherColorMode = 0xFF;
if (p.RainbowPresserColorMode)
player.sendMessage("§eRainbow colors §aenabled.");
else
player.sendMessage("§eRainbow colors §cdisabled.");
} else {
player.sendMessage("§cYou don't have permission for this command. Donate to get it!");
return true;
}
} else {
if (PluginMain.permission.has(player, "tbmc.admin")) {
p.RainbowPresserColorMode = false;
p.OtherColorMode = Short.parseShort(args[1], 16);
if (p.OtherColorMode != 0xFF)
player.sendMessage("§eMessage color set to §"
+ p.OtherColorMode + p.OtherColorMode);
else
player.sendMessage("§eMessage color reset.");
}
}
else
return false;
break;
default:
return false;

View file

@ -28,6 +28,7 @@ public class MaybeOfflinePlayer {
public boolean SendingLink = false;
public int FDeaths;
public boolean RainbowPresserColorMode = false;
public short OtherColorMode = 0xFF;
public UUID UUID;

View file

@ -263,6 +263,10 @@ public class PlayerListener implements Listener { // 2015.07.16.
rpc = 0;
}
}
if (player.OtherColorMode != 0xFF) {
formattedmessage = String.format("§%x%s", player.OtherColorMode,
formattedmessage);
}
if (!hadurls) {
for (Player p : PluginMain.GetPlayers()) { // 2015.08.12.
@ -1019,8 +1023,8 @@ public class PlayerListener implements Listener { // 2015.07.16.
public void onPlayerMove(PlayerMoveEvent e) {
// minecraft:tp @a[x=190,y=-80,z=45,dx=5,dy=50,dz=5] 190 1 45
if (e.getPlayer().getWorld().getName().equals("wilds")
&& e.getTo().getBlockX() > 185 && e.getTo().getBlockX() < 200
&& e.getTo().getBlockZ() > 40 && e.getTo().getBlockZ() < 60
&& e.getTo().getBlockX() > 100 && e.getTo().getBlockX() < 250
&& e.getTo().getBlockZ() > 0 && e.getTo().getBlockZ() < 200
&& e.getTo().getBlockY() < -64) {
final Player p = e.getPlayer();
p.setVelocity(new Vector(0, 0, 0));