Ajneb97/ConditionalEvents

Could not pass PlayerJoinEvent in v4.35.2

Closed this issue · 3 comments

Estoy utilizando paper-1.19.4.
Probé si tenía que ver con algún otro plugin pero no, es esa versión. En versiones anteriores no reporta ese error por lo que he visto.
Aparte también lo probé con purpur-1.20.1 y pasa lo mismo.

Error de la consola:

[12:15:02 ERROR]: Could not pass event PlayerJoinEvent to ConditionalEvents v4.35.2
java.util.regex.PatternSyntaxException: Illegal repetition near index 1
{player}
^
at java.util.regex.Pattern.error(Pattern.java:2028) ~[?:?]
at java.util.regex.Pattern.closure(Pattern.java:3309) ~[?:?]
at java.util.regex.Pattern.sequence(Pattern.java:2214) ~[?:?]
at java.util.regex.Pattern.expr(Pattern.java:2069) ~[?:?]
at java.util.regex.Pattern.compile(Pattern.java:1783) ~[?:?]
at java.util.regex.Pattern.(Pattern.java:1430) ~[?:?]
at java.util.regex.Pattern.compile(Pattern.java:1069) ~[?:?]
at java.lang.String.replaceFirst(String.java:2896) ~[?:?]
at ce.ajneb97.utils.VariablesUtils.replaceAllVariablesInLine(VariablesUtils.java:80) ~[ConditionalEvents-LATEST-[4.35.2].jar:?]
at ce.ajneb97.utils.VariablesUtils.replaceAllVariablesInLine(VariablesUtils.java:59) ~[ConditionalEvents-LATEST-[4.35.2].jar:?]
at ce.ajneb97.managers.EventsManager.checkConditions(EventsManager.java:192) ~[ConditionalEvents-LATEST-[4.35.2].jar:?]
at ce.ajneb97.managers.EventsManager.checkSingularEvent(EventsManager.java:77) ~[ConditionalEvents-LATEST-[4.35.2].jar:?]
at ce.ajneb97.managers.EventsManager.checkEvent(EventsManager.java:51) ~[ConditionalEvents-LATEST-[4.35.2].jar:?]
at ce.ajneb97.model.internal.ConditionEvent.checkEvent(ConditionEvent.java:77) ~[ConditionalEvents-LATEST-[4.35.2].jar:?]
at ce.ajneb97.listeners.PlayerEventsListener.onJoin(PlayerEventsListener.java:52) ~[ConditionalEvents-LATEST-[4.35.2].jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor201.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:git-Paper-550]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.19.4.jar:git-Paper-550]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.19.4.jar:git-Paper-550]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at net.minecraft.server.players.PlayerList.placeNewPlayer(PlayerList.java:332) ~[paper-1.19.4.jar:git-Paper-550]
at net.minecraft.server.network.ServerLoginPacketListenerImpl.placeNewPlayer(ServerLoginPacketListenerImpl.java:202) ~[?:?]
at net.minecraft.server.network.ServerLoginPacketListenerImpl.handleAcceptedLogin(ServerLoginPacketListenerImpl.java:183) ~[?:?]
at net.minecraft.server.network.ServerLoginPacketListenerImpl.tick(ServerLoginPacketListenerImpl.java:85) ~[?:?]
at net.minecraft.network.Connection.tick(Connection.java:595) ~[?:?]
at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:234) ~[?:?]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1576) ~[paper-1.19.4.jar:git-Paper-550]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:447) ~[paper-1.19.4.jar:git-Paper-550]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1397) ~[paper-1.19.4.jar:git-Paper-550]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1174) ~[paper-1.19.4.jar:git-Paper-550]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.19.4.jar:git-Paper-550]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

Sabes en que evento ocurre esto? Me puedes mandar la config de ese evento?

En cualquier evento que lleve ese tipo de acción (osea, varios).
Aquí te dejo la lista de eventos que estoy usando actualmente en mi servidor de pruebas:

is_discord_linked:
type: player_join
conditions:
- '%discordsrv_user_islinked% == no'
actions:
default:
- 'centered_message: &f&m &r &b&l¡HEY! &f&m '
- 'centered_message: '
- 'centered_message: &fPuedes vincular tu cuenta del juego con'
- 'centered_message: &fla de tu Discord utilizando &e/discord link&f.'
- 'centered_message: &fPara comprobarlo, utiliza &e/discord linked'
- 'centered_message: '
- 'centered_message: &f&m '

MENSAJE PARA LOS DE BEDROCK QUIENES QUIERAN VINCULAR SU PROGRESO

is_bedrock_no_vonculado_con_java:
type: player_join
conditions:
- '%floodgate_device% !contains Java'
actions:
default:
- 'centered_message: &f&m &r &a&l¡HEY! &f&m '
- 'centered_message: '
- 'centered_message: &f¿Tienes cuenta en Java o Bedrock?'
- 'centered_message: &f¿Quieres tener tu mismo progreso en ambas?'
- 'centered_message: &fPuedes vincular tu progreso de esta manera:'
- 'centered_message: &fPara saber más, utiliza &e/comounir'
- 'centered_message: '
- 'centered_message: &f&m '

COMANDO DE LA ACCION ANTERIOR /comounir - DEBE DAR UN LIBRO DEL CC PLUGIN

como_unir_command_1:
type: player_command
conditions:
- '%command% == /comounir'
actions:
default:
- 'cancel_event: true'
- 'console_command: cc give %player% customcrafting:tutorial_vinculacion 1'

join_message:
type: player_join
actions:
default:
- 'hide_join_message: true'
- 'cancel_event: true'
- 'to_all: message: &r%vault_prefix%&r%essentials_nickname%&r%vault_suffix%
&bse ha unido al servidor.'
- 'console_message: %player_name% se ha conectado al servidor con la IP %player_ip%'

leave_message:
type: player_leave
actions:
default:
- 'hide_leave_message: true'
- 'cancel_event: true'
- 'to_all: message: &r%vault_prefix%&r%essentials_nickname%&r%vault_suffix%
&bse fue hacer poopoo.'
- 'console_message: %player_name% ha abandonado el servidor con la IP %player_ip%'

desactiva_gamerule_dodayccyle:
type: repetitive_server
repetitive_time: 36000
conditions:
- '%server_online% == 0'
actions:
default:
- 'cancel_event: true'
- 'console_command: gamerule doDaylightCycle false'
- 'console_command: ce disable desactiva_gamerule_dodayccyle'
enabled: true

activa_gamerule_dodayccyle:
type: player_join
conditions:
- '%server_online% != 0'
actions:
default:
- 'cancel_event: true'
- 'console_command: gamerule doDaylightCycle true'
- 'console_command: ce enable desactiva_gamerule_dodayccyle'

DARA EL PERMISO DE VETERANO CON LA CONDICION DEL TIEMPO - EL MISMO SERVIDOR SE LA DARA

suffix_veterano_auto:
type: player_join
conditions:
- '%otherplayer_hasperm_{player}_perm_tags.especiales.veteran% == false'
- '%statistic_days_played% >= 30'
actions:
default:
- 'cancel_event: true'
- 'console_command: lp user %arg_1% permission set tags.especiales.veteran true'

Esto ya fue solucionado