Made @console pingable
This commit is contained in:
parent
330ab45b95
commit
05245c05f8
13 changed files with 16 additions and 0 deletions
Binary file not shown.
|
@ -18,6 +18,8 @@ commands:
|
||||||
mwiki:
|
mwiki:
|
||||||
description: Search the wiki.
|
description: Search the wiki.
|
||||||
usage: "&vUsage: /mwiki [query]&r"
|
usage: "&vUsage: /mwiki [query]&r"
|
||||||
|
chat:
|
||||||
|
description: Chats from console.
|
||||||
author: NorbiPeti
|
author: NorbiPeti
|
||||||
depend: [Essentials, Towny, Minigames, Votifier, Factions]
|
depend: [Essentials, Towny, Minigames, Votifier, Factions]
|
||||||
permissions:
|
permissions:
|
||||||
|
|
|
@ -248,6 +248,12 @@ public class Commands implements CommandExecutor {
|
||||||
DoMWiki(player, args);
|
DoMWiki(player, args);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
case "chat": {
|
||||||
|
/*ConsolePlayer cp = new ConsolePlayer();
|
||||||
|
cp.chat("Test!");
|
||||||
|
System.out.println("Sent msg");*/
|
||||||
|
return true;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
player.sendMessage("Unknown command: " + cmd.getName());
|
player.sendMessage("Unknown command: " + cmd.getName());
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -344,6 +344,13 @@ public class PlayerListener implements Listener { // 2015.07.16.
|
||||||
.substring(0, 2)));
|
.substring(0, 2)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (formattedmessage.matches("(?i).*" + Pattern.quote("@console")
|
||||||
|
+ ".*")) {
|
||||||
|
formattedmessage = formattedmessage.replaceAll("(?i)"
|
||||||
|
+ Pattern.quote("@console"), "§b@console§r");
|
||||||
|
System.out.println("\007");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -94,6 +94,7 @@ public class PluginMain extends JavaPlugin { // Translated to Java: 2015.07.15.
|
||||||
this.getCommand("mwiki").setExecutor(comm);
|
this.getCommand("mwiki").setExecutor(comm);
|
||||||
this.getCommand("mwiki").setUsage(
|
this.getCommand("mwiki").setUsage(
|
||||||
this.getCommand("mwiki").getUsage().replace('&', '§'));
|
this.getCommand("mwiki").getUsage().replace('&', '§'));
|
||||||
|
this.getCommand("chat").setExecutor(comm);
|
||||||
Instance = this; // 2015.08.08.
|
Instance = this; // 2015.08.08.
|
||||||
Console = this.getServer().getConsoleSender(); // 2015.08.12.
|
Console = this.getServer().getConsoleSender(); // 2015.08.12.
|
||||||
LoadFiles(false); // 2015.08.09.
|
LoadFiles(false); // 2015.08.09.
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue