skript-mirror
                                
                                 skript-mirror copied to clipboard
                                
                                    skript-mirror copied to clipboard
                            
                            
                            
                        'Continue if' doesn't work with Java calls for the boolean
Describe the bug The 'continue if' syntax will always continue no matter what the Java call returns
To reproduce Use a Java call for the boolean expression in the 'continue if' syntax
Expected behavior It should not continue if the Java call does not return true
Screenshots
effect test:
	parse:
		continue if "foo".equals("not foo")
	trigger:
		broadcast "hi"
effect test:
	parse:
		continue if "foo".toString()
	trigger:
		broadcast "hi"
both of these continue even though they obviously should not
Server information
- skript-mirror: 0.19.1
- Skript: 2.3-beta6
- Bukkit: Spigot 1.13.2
- Minecraft: 1.13.2
- Java: 1.8.0_181
- OS: Windows
This seems to be happening because java calls can only be used as conditions in if statements.
Anyway, the continue if syntax will most likely be removed in 2.x since it's a little hacky and doesn't really offer much benefit. On Sat, Dec 29, 2018 at 11:10 AM Donut [email protected] wrote:
Describe the bug The 'continue if' syntax will always continue no matter what the Java call returns
To reproduce Use a Java call for the boolean expression in the 'continue if' syntax
Expected behavior It should not continue if the Java call does not return true
Screenshots
effect test: parse: continue if "foo".equals("not foo") trigger: broadcast "hi"
effect test: parse: continue if "foo".toString() trigger: broadcast "hi"
both of these continue even though they obviously should not
Server information
- skript-mirror: 0.19.1
- Skript: 2.3-beta6
- Bukkit: Spigot 1.13.2
- Minecraft: 1.13.2
- Java: 1.8.0_181
- OS: Windows
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/btk5h/skript-mirror/issues/112, or mute the thread https://github.com/notifications/unsubscribe-auth/AC82JLz_DlbPK_wtZiF4HW_Tibxr5Bgiks5u974KgaJpZM4ZkrfN .