Migins Posted September 19, 2020 Share Posted September 19, 2020 (edited) M I N E H U T C O M M U N I T Y F A Q HOW TO FORMAT CHAT WITH SKRIPT REQUIREMENTS: Skript DIFFICULTY: MEDIUM Introduction: For the following tutorial, it is assumed that the reader has a basic knowledge of how to set up a server, install a plugin on said server and join it. It is also assumed that the reader has basic file manipulation skills within the Minehut File Manager, as well a moderate knowledge of the plugin 'Skript'. The plugin Skript is a great way to modify your server on Minehut. It is incredibly versatile and you can do almost anything with it. An example of this is formatting chat, which I will be focussing on today. How to format chat: To format chat, the 'chat format' expression inside of the 'on chat' event can be used. A very basic example of this could entail: on chat: set the chat format to "%player% said %message%" here we use %player% to represent the player chatting and %message% to represent the message the player sends. You can include color codes such as '&3' or hex codes such as '<##ff00fff>', your chat message can say whatever you want it to say. You can also use something like this to merge your Skript chat format with your permission plugin's prefix: on chat: if player is op: set the chat format to "%player's display name%&f: %message%" else: set the chat format to "%player's display name%&7: %message%" Require further assistance?: If you need more help on this topic, head over to this section of forums, or join our Discord! https://youtu.be/3avLji1hwtk Compiled by the Minehut Staff Team Edited December 15, 2020 by Migins 2 2 ► Support July 29, 2020 → November 3, 2020 ► Helper November 3, 2020 → February 22, 2021 ► Moderator February 22, 2021 → May 17, 2021 ► I might not always respond to forum dms, however I am always contactable on discord (mig#0069) Link to comment Share on other sites More sharing options...
Heheheh9383738 Posted April 16, 2021 Share Posted April 16, 2021 Hey! How can i set own permission for more ranks? If player has permission: skript.chat.member doesnt work :c Link to comment Share on other sites More sharing options...
BanditEagle Posted April 16, 2021 Share Posted April 16, 2021 30 minutes ago, Heheheh9383738 said: Hey! How can i set own permission for more ranks? If player has permission: skript.chat.member doesnt work :c Try doing this: if player has permission "skript.chat.member": [code] 1 If I have helped you out in your post or you liked what I posted, please upvote and react to my post! It helps me a lot! Some Minehut Links: Server Rules • Staff Applications • News & Updates • Reports • Appeals Minehut: VIP (07/04/2021 --> Current)Elestra/Versa Realms: Manager (12/04/2021 --> Current) If you have any questions contact me!My Discord: BanditEagle#2481My Spigot Profile: https://www.spigotmc.org/members/banditeagle.935281/My IGN: BanditEagle Link to comment Share on other sites More sharing options...
Heheheh9383738 Posted April 16, 2021 Share Posted April 16, 2021 Doesnt work :c Link to comment Share on other sites More sharing options...
Heheheh9383738 Posted April 16, 2021 Share Posted April 16, 2021 (edited) Thats my code but it wont work :c So i can reload it without errors but the code doesnt work on join: if player do not have permission "{skript.owner}": if player doesn't have permission "{skript.admin}": if player doesn't have permission "{skript.staff}": if player doesn't have permission "{skript.vip}": set {rank.%player%} to "&7&lMEMBER" else: set {rank.%player%} to "&b&lVIP" else: set {rank.%player%} to "&a&lSTAFF" else: set {rank.%player%} to "&c&lADMIN" else: set {rank.%player%} to "&6&lOWNER" on chat: set chat format to "%{rank.%player%}% &8x &f%player% &8» &7%message%" Edited April 16, 2021 by Heheheh9383738 Link to comment Share on other sites More sharing options...
BanditEagle Posted April 16, 2021 Share Posted April 16, 2021 Try this: on join: set {_uuid} to player's uuid if player does not have the permission "skript.owner": if player does not have the permission "skript.admin": if player does not have the permission "skript.staff": if player does not have the permission "skript.vip": set {rank.%{_uuid}%} to "&7&lMEMBER" else: set {rank.%{_uuid}%} to "&b&lVIP" else: set {rank.%{_uuid}%} to "&a&lSTAFF" else: set {rank.%{_uuid}%} to "&c&lADMIN" else: set {rank.%{_uuid}%} to "&6&lOWNER" on chat: set chat format to "%{rank.%{_uuid}%}% &8x &f%player's displayname% &8» &7%message%" I have not tested this out but in principal it should work. If there are any errors let me know If I have helped you out in your post or you liked what I posted, please upvote and react to my post! It helps me a lot! Some Minehut Links: Server Rules • Staff Applications • News & Updates • Reports • Appeals Minehut: VIP (07/04/2021 --> Current)Elestra/Versa Realms: Manager (12/04/2021 --> Current) If you have any questions contact me!My Discord: BanditEagle#2481My Spigot Profile: https://www.spigotmc.org/members/banditeagle.935281/My IGN: BanditEagle Link to comment Share on other sites More sharing options...
Xcard Posted April 20, 2021 Share Posted April 20, 2021 On 4/16/2021 at 12:36 PM, Heheheh9383738 said: Thats my code but it wont work :c So i can reload it without errors but the code doesnt work on join: if player do not have permission "{skript.owner}": if player doesn't have permission "{skript.admin}": if player doesn't have permission "{skript.staff}": if player doesn't have permission "{skript.vip}": set {rank.%player%} to "&7&lMEMBER" else: set {rank.%player%} to "&b&lVIP" else: set {rank.%player%} to "&a&lSTAFF" else: set {rank.%player%} to "&c&lADMIN" else: set {rank.%player%} to "&6&lOWNER" on chat: set chat format to "%{rank.%player%}% &8x &f%player% &8» &7%message%" You don't need to make the permission a variable you can make it like on chat: If player has permission "skript.owner": set {rank.%player's uuid%} to "&8&l[&c&lOwner&8&l]" set the chat format to "%{rank.%player's uuid%}% %player's display name% &c>> &7%message%" card Rank - V.I.P Joined on - Uhh I forgot Discord - Xcard#0001 Youtube - Pweas sweakibe :3 Free Skripts! - [My website coming soon] Github - Nothing here yet .-. Rules - READ THEM! Don't click pweas! - I said NO! Secret - Join :> Link to comment Share on other sites More sharing options...
Weeeoooooo Posted April 20, 2021 Share Posted April 20, 2021 1 hour ago, ShibaTheDoggo said: You don't need to make the permission a variable you can make it like on chat: If player has permission "skript.owner": set {rank.%player's uuid%} to "&8&l[&c&lOwner&8&l]" set the chat format to "%{rank.%player's uuid%}% %player's display name% &c>> &7%message%" Bad. Link to comment Share on other sites More sharing options...
Xcard Posted April 20, 2021 Share Posted April 20, 2021 11 hours ago, Weeeoooooo said: Bad. ? card Rank - V.I.P Joined on - Uhh I forgot Discord - Xcard#0001 Youtube - Pweas sweakibe :3 Free Skripts! - [My website coming soon] Github - Nothing here yet .-. Rules - READ THEM! Don't click pweas! - I said NO! Secret - Join :> Link to comment Share on other sites More sharing options...
Guest Minecraft Posted April 28, 2023 Share Posted April 28, 2023 Minecraft game vs videos Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now