#Hey so im making a join / leave message but it wont work
1 messages · Page 1 of 1 (latest)
📑 Skript Documentation
Skript documentation, sometimes referred to as "the docs" are a great resource for beginners learning skript or experts reviewing a topic. They hold a wide variety of information on various events, conditions, effects, and expressions. Here’s a few popular documentation websites:
- 📥 Skript Download: GitHub
- 📖 Skript Lang Docs: Official Documentation
- 📘 Skript Hub Docs: Skript Hub
- 📚 skUnity Docs: skUnity
- 🔍 skUnity Parser: Parser Tool
The skUnity Parser is a great tool which can parse (run) your skript code in a web browser and check for errors!
read the error
send "test"```
on join:
i already give you the trigger```
!indention
!indentsn
!tab
tab
!indenation
In skript, you need to maintain consistent indentation, meaning you cannot indent 1 line 5 spaces, and the next 7 spaces. Usually it’s recommended you use tabs, however.
A good rule of thumb is to always indent the subsequent line whenever the previous statement ends with a :, an exception to this is in command statements with items before the trigger such as permission: or aliases:
With conditional statements and loops, any code that is indented within the statement will be run as a part of the statement, other code will not be run within the statement. Here is an example of proper indentation:
there you go
go to beggining of line 2 and 5 and press tab or it cant read it
Oh so I gotta go and do trigger:
on join set join message to ...
Nope
oh
You need tabs or spaces to signify the next line
Read the paragraph that starts with - A good rule of thumb
This isn’t Java!
Isent it?
it's not java
Is this good
on join:
set join message to "&a%player% Joined the server!"
on quit:
set quit message to "&c%player% Left the server!"
Ok
yes
Let me check
in java it would be
@EventHandler
public void JoinEvent(PlayerJoinEvent event) {
Player player = event.getPlayer();
event.setJoinMessage("§7(§2§l+§7)§a" + player.getName() + " joined the lobby.");
}
what this code does is send message when player join
and also send a title with hex color
which you have to manually implement yourself or get an api to do it
lol
in my case i made my owjn
public String translateHexColorCodes(String message) {
Pattern hexPattern = Pattern.compile("&#([A-Fa-f0-9]{6})");
Matcher matcher = hexPattern.matcher(message);
StringBuffer buffer = new StringBuffer();
while (matcher.find()) {
String hexCode = matcher.group(1);
StringBuilder replacement = new StringBuilder("§x");
for (char c : hexCode.toCharArray()) {
replacement.append('§').append(c);
}
matcher.appendReplacement(buffer, replacement.toString());
}
matcher.appendTail(buffer);
return buffer.toString();
}
``` smth like this
thx for the help tho
legit free code
no one cares how is this related to the original post
i dont know
why the are you posting java here, i thought this is skript related 💀
He said java is dumb
And I show him java and how hard is it
still bro, don't post java here, you could get muted for posting unrelated stuff to a channel
