- Added French/Français translations (thanks @Romitou)
- Added Polish translations (thanks @3meraldK, @Nicofisi and @Zabujca997)
- Added Simplified Chinese translations (thanks @CJYKK)
- Added Japanese translations (thanks @faketuna and @rilyhugu)
- Updated to Minecraft 1.19 (closes #4850)
- Added support for all new chested boats aside from mangrove. Spigot forgot to include mangrove boats for now, they're currently working on it. (SkriptLang/Skript#4834)
- Added support for the new frogs (SkriptLang/Skript#4834)
- Added support for the new particles (SkriptLang/Skript#4834)
- Added an expression to get the last color of a string (SkriptLang/Skript#4136, close
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sends a plugin message using the first player from {@link Bukkit#getOnlinePlayers()}. | |
* | |
* The next plugin message to be received through {@code channel} will be assumed to be | |
* the response. | |
* | |
* @param channel the channel for this plugin message | |
* @param data the data to add to the outgoing message | |
* @return a completable future for the message of the responding plugin message, if there is one. | |
* this completable future will complete exceptionally if no players are online. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static CompletableFuture<ByteArrayDataInput> sendPluginMessage(String channel, String... data) { | |
return sendPluginMessage(Iterables.getFirst(Bukkit.getOnlinePlayers(), null), channel, data); | |
} | |
public static CompletableFuture<ByteArrayDataInput> sendPluginMessage(Player player, String channel, String... data) { | |
CompletableFuture<ByteArrayDataInput> completableFuture = new CompletableFuture<>(); | |
if (player == null) { | |
completableFuture.completeExceptionally(new IllegalStateException("Can't send plugin messages without a player")); | |
return completableFuture; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static CompletableFuture<ByteArrayDataInput> sendPluginMessage(String channel, String... data) { | |
return sendPluginMessage(Iterables.getFirst(Bukkit.getOnlinePlayers(), null), channel, data); | |
} | |
public static CompletableFuture<ByteArrayDataInput> sendPluginMessage(Player player, String channel, String... data) { | |
CompletableFuture<ByteArrayDataInput> completableFuture = new CompletableFuture<>(); | |
if (player == null) { | |
completableFuture.completeExceptionally(new IllegalStateException("Can't send plugin messages without a player")); | |
return completableFuture; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static CompletableFuture<ByteArrayDataInput> sendPluginMessage(String channel, String... data) { | |
return sendPluginMessage(Iterables.getFirst(Bukkit.getOnlinePlayers(), null), channel, data); | |
} | |
public static CompletableFuture<ByteArrayDataInput> sendPluginMessage(Player player, String channel, String... data) { | |
CompletableFuture<ByteArrayDataInput> completableFuture = new CompletableFuture<>(); | |
if (player == null) { | |
completableFuture.completeExceptionally(new IllegalStateException("Can't send plugin messages without a player")); | |
return completableFuture; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.bukkit.event.server; | |
import java.net.InetAddress; | |
import java.util.Iterator; | |
import org.apache.commons.lang.Validate; | |
import org.bukkit.entity.Player; | |
import org.bukkit.event.HandlerList; | |
import org.bukkit.util.CachedServerIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This file is part of Skript. | |
* | |
* Skript is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* Skript is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This file is part of Skript. | |
* | |
* Skript is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* Skript is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Parser<User> = new Parser<>() { | |
private final Pattern DISCRIM_PATTERN = Pattern.compile("(.+)#(\\d+)"); | |
private final Pattern MENTION_OR_ID_PATTERN = Pattern.compile("(<@)?(\\d+)(>)?"); | |
public User parse(String input, ParseContext context) { | |
Matcher discrimMatcher = DISCRIM_PATTERN.matcher(input); | |
Matcher mentionMatcher = MENTION_OR_ID_PATTERN.matcher(input); | |
if (discrimMatcher.matches()) { | |
// use the groups for discrim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import: | |
ch.njol.skript.log.SkriptLogger | |
ch.njol.skript.ScriptLoader | |
ch.njol.skript.config.SectionNode | |
ch.njol.skript.lang.Condition | |
ch.njol.skript.Skript | |
ch.njol.skript.config.validate.SectionValidator | |
ch.njol.skript.lang.SkriptParser | |
com.btk5h.skriptmirror.Util as MirrorUtil | |
java.util.Arrays |
NewerOlder