Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # _________________________________________
- # Chat Controllor
- # Author: MisterBasic
- # Version: 1.0
- # Desc: Gives you full control of chat.
- # You are using version ALPHA_1.0
- # Requirements:
- # Skript (duh)
- #
- # _________________________________________
- options:
- #________________________________________________________#
- # #
- # Configuration #
- #________________________________________________________#
- showPrefixOnJoinMessage: false
- enablecustomprefixes: false # This option can be buggy, please leave false this until it is fully complete
- enablejoinmessages: true
- #________________________________________________________#
- # #
- # Messages #
- #________________________________________________________#
- usage: &cUsage: /{command}
- prefix: &8[&9Chat&8] &r # leave blank for no prefix, prefix requires a space at the end
- version: ALPHA_1.0
- nopermission: &cYou do not have permission to execute this command!
- onenablemessage: &aChat Controllor has been enabled! Created by: MisterBasic
- ondisablemessage: &cChat Controllor has been disabled! Created by: MisterBasic
- blockedchatcontents: ".com"
- # Credits #
- # Remember, nothing has to be in caps. This is just a example so YOU can fill out the slots
- Owner: OWNERNAME
- credits1: JIM
- role1: COOWNER
- credits2: LEXI
- role2: Developer
- credits3: EMPTY
- role3: Developer
- credits4: KEVIN
- role4: MODERATOR
- credits5: CHICKEN
- role5: BUILDER
- credits6:
- role6:
- credits7:
- role7:
- Extra: Spigot, Bukkit, My Cat
- # Credits end here... #
- joinmessage: &c%player% has joined! Yay!
- firstjoinmessage: &c%player% has joined for the first time! You get a big welcome!
- broadcastmessagecolor: &c
- broadcastPrefix: &4&BROADCAST&c
- # Debug #
- dir: plugins/Skript/scripts/Chat Controllor.sk
- on command "/chatcontrollor reload":
- set {chat_muted} to false
- set {noperm} to {@prefix}{@nopermission}
- ## End of the config file ##
- # WARNING!!! The Rest of this file is in the "Skript" Language, this
- # is for people who know the language or are interested to read. Please
- # don't modifiy this and betray it as your own. I would appreciate
- # if you credit me with the /credits command! Thank you :)
- #
- #
- #________________________________________________________#
- # #
- # Commands #
- #________________________________________________________#
- command /mutechat <time> [reason]:
- description: Mute the chat.
- usage: /mutechat <time> [reason]
- permission: chat.command.mutechat
- permission message: {noperm}
- executable by: players and console
- alias: /mc
- trigger:
- set {chat_muted} to true
- set {time} to %args 1%
- set {chat_muted_reason} to %args 2%
- wait {time} ticks
- set {chat_muted} to false
- command /mute <player> <time> [<reason>]:
- description: Mute a player.
- usage: /mutechat <player> <time> [reason]
- permission: chat.command.mutechat
- permission message: {noperm}
- executable by: players
- alias: /mc
- trigger:
- set {mute.%args 1%} to 1
- set {time.%args 1%} to %args 2%
- set {reason.%args 1%} to %args 3%
- send "&aYou have successfully muted %args 1% for %args 2%: %args 3%"
- command /broadcast [<message>]:
- description: Broadcast a message to the server
- usage: /broadcast [message]
- permission: chat.command.broadcast
- permission message: {noperm}
- executable by: players
- alias: /announce,/bc,/a,/alert
- trigger:
- broadcast "{@broadcastprefix} {@broadcastmessagecolor} %args 1%"
- send "%args 1%"
- command /chatcolor <color>:
- description: Change your chat color
- usage: /chatcolor <colorcode>
- permission: chat.command.chatcolor
- permission message: {noperm}
- executable by: players
- trigger:
- set {chatcolor.%player%} to %args 1%
- command /setprefix <player> [prefix]:
- description: Set a players prefix
- usage: /setprefix <player> [prefix]
- permission: chat.command.setprefix
- permission message: {noperm}
- executable by: players
- trigger:
- set {prefix.%args 1%} to %args 2%
- command /getip <player>:
- description: Get a players IP address
- usage: /getip <player>
- permission: chat.command.getip
- permission message: {noperm}
- executable by: console
- trigger:
- player is online
- set {ip} to ip address of %arg 1%
- send "&aThe players IP address is:&r {ip}"
- stop trigger
- command /nick [<name>] [player]:
- description: Change a players name
- usage: /nick <nickname> [player]
- permission: chat.command.nick
- permission message: {noperm}
- executable by: player
- trigger:
- set player's display name to %args 1%
- if %args 1% is %executor%:
- send "You have changed your nickname to %args 1%"
- else:
- send "You have changed %args 2%'s name to %args 1%"
- on command "/chat version":
- player has permission "chat.version"
- send "{@prefix}&aThe version you are using is {@version} by MisterBasic"
- send "{@prefix}&aCheck the current version to see if it is outdated!"
- on command "/credits":
- if player does not have permission "chat.credits":
- send "{noperm}"
- cancel event
- player has permission "chat.credits"
- send "{@prefix}&aHere are all the staff and developers of the server!"
- send "{@Owner}: Owner of the server"
- send "{@credits1}: {@role1}"
- send "{@credits2}: {@role2}"
- send "{@credits3}: {@role3}"
- send "{@credits4}: {@role4}"
- send "{@credits5}: {@role5}"
- send "{@credits6}: {@role6}"
- send "{@credits7}: {@role7}"
- send "Extra: {extra}"
- send "Chat Controllor Developer: MisterBasic"
- #________________________________________________________#
- # #
- # Script and funtionality #
- #________________________________________________________#
- on chat:
- if {_mutedchat} is set:
- cancel the event
- message "{@prefix}&aChat has been muted for &c{time}<dark_red> seconds: {chat_muted_reason}<reset>"
- if {_muted.%player%} is true:
- cancel the event
- send "{@prefix} &cYou have been muted for {_muted.time.%player%}: {_muted.reason.%player%}"
- if {@enablecustomprefixes} is true:
- if {prefix.%player%} is set:
- cancel event
- set {prefix.%player%} to {groupprefix.%player%}
- set {prefix.%player%} to {groupsuffix.%player%}
- broadcast "%{prefix.%player%}% %player%%{suffix.%player%}%» %message%"
- # if {chatcolor.%player%} is set:
- # if player has permission "chat.chatcolor.use":
- # cancel event
- # broadcast "{prefix.%player%} %player%{suffix.%player%}»&{chatcolor.%player%} %message%&r"
- # else:
- # send "{@prefix}You may not use chat colors!"
- #________________________________________________________#
- # #
- # Join and leave Messages #
- #________________________________________________________#
- on join:
- if {@enablejoinmessages} is true:
- set {showprefix} to {@showPrefixOnJoinMessages}
- if {showprefix} is set:
- if {showprefix} is true:
- send "{@prefix}{@joinmessage}"
- the player hasn't played before
- send "{@prefix}{@firstjoinmessage}"
- if {@showprefix} is not set:
- send "{@prefix}&cERROR: Config 'showPrefixOnJoinMessages' is empty!!! Please go into {@dir} and set it to true|false!" to console
- on first join:
- if {@enablejoinmessages} is true:
- set {showprefix} to {@showprefix}
- if {showprefix} is set:
- if {showprefix} is true:
- send "{@prefix}{@joinmessage}"
- the player has played before
- send "{@prefix}{@firstjoinmessage}"
- else:
- if {@showprefix} is not set:
- send "{@prefix}&cERROR: Config 'showprefix:' is empty!!! Please go into {@dir} and set it to true|false!" to console
- else:
- send "{@prefix}ERROR: No clue what happened, contact the developer."
- #________________________________________________________#
- # #
- # Plugin #
- #________________________________________________________#
- on enable:
- send "{@onenablemessage}"
- on disable:
- send "{@ondisablemessage}"
Advertisement
Add Comment
Please, Sign In to add comment