From 882aeff34afc1bae143142f380578f212a2202d4 Mon Sep 17 00:00:00 2001 From: sovdeeth Date: Mon, 16 Jan 2023 17:08:09 -0500 Subject: [PATCH 01/10] ExprPortalCooldown --- .../expressions/ExprPortalCooldown.java | 102 ++++++++++++++++++ .../expressions/ExprPortalCooldown.sk | 14 +++ 2 files changed, 116 insertions(+) create mode 100644 src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java create mode 100644 src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk diff --git a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java new file mode 100644 index 00000000000..65c40af27bf --- /dev/null +++ b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java @@ -0,0 +1,102 @@ +/** + * 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 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Skript. If not, see . + * + * Copyright Peter Güttinger, SkriptLang team and contributors + */ +package ch.njol.skript.expressions; + +import ch.njol.skript.classes.Changer; +import ch.njol.skript.doc.Description; +import ch.njol.skript.doc.Examples; +import ch.njol.skript.doc.Name; +import ch.njol.skript.doc.Since; +import ch.njol.skript.expressions.base.SimplePropertyExpression; +import ch.njol.skript.util.Timespan; +import ch.njol.skript.util.WeatherType; +import ch.njol.util.coll.CollectionUtils; +import org.bukkit.entity.Entity; +import org.bukkit.event.Event; +import org.eclipse.jdt.annotation.Nullable; + +@Name("Portal Cooldown") +@Description("The amount of time before an entity can use a portal. By default, this is 15 seconds after exiting a nether portal.") +@Examples({ + "on portal:", + "\twait 1 tick", + "\tset portal cooldown of event-entity to 5 seconds" +}) +@Since("INSERT VERSION") +public class ExprPortalCooldown extends SimplePropertyExpression { + + static { + register(ExprPortalCooldown.class, Timespan.class, "portal cool[-| ]down", "entities"); + } + + @Override + @Nullable + public Timespan convert(Entity entity) { + return Timespan.fromTicks_i(entity.getPortalCooldown()); + } + + @Override + @Nullable + public Class[] acceptChange(Changer.ChangeMode mode) { + switch (mode) { + case SET: + case ADD: + case RESET: + case DELETE: + case REMOVE: + return CollectionUtils.array(Timespan.class); + } + return null; + } + + @Override + public void change(Event event, @Nullable Object[] delta, Changer.ChangeMode mode) { + Entity[] entities = getExpr().getArray(event); + int change = delta == null ? 0 : (int) ((Timespan) delta[0]).getTicks_i(); + switch (mode) { + case REMOVE: + change = -change; + case ADD: + for (Entity entity : entities) { + entity.setPortalCooldown(Math.max(entity.getPortalCooldown() + change, 0)); + } + break; + case DELETE: + case RESET: + case SET: + for (Entity entity : entities) { + entity.setPortalCooldown(Math.max(change, 0)); + } + break; + default: + assert false; + } + } + + @Override + public Class getReturnType() { + return Timespan.class; + } + + @Override + protected String getPropertyName() { + return "portal cooldown"; + } + +} diff --git a/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk b/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk new file mode 100644 index 00000000000..3825d44975d --- /dev/null +++ b/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk @@ -0,0 +1,14 @@ +test "portal cooldown": + spawn zombie at location(0, 64, 0, world "world") + set {_m} to last spawned zombie + assert {_m}'s portal cooldown is 0 seconds with "entity spawned with a portal cooldown" + set {_m}'s portal cooldown to 25 ticks + assert {_m}'s portal cooldown is 25 ticks with "portal cooldown set failed" + add 5 seconds to {_m}'s portal cooldown + assert {_m}'s portal cooldown is 125 ticks with "portal cooldown add ##1 failed" + remove 12 ticks from {_m}'s portal cooldown + assert {_m}'s portal cooldown is 113 ticks with "portal cooldown remove ##1 failed" + remove 999 ticks from {_m}'s portal cooldown + assert {_m}'s portal cooldown is 0 ticks with "portal cooldown remove ##2 failed" + delete {_m}'s portal cooldown + assert {_m}'s portal cooldown is 0 ticks with "portal cooldown delete failed" \ No newline at end of file From 35180644f2e36d4a152b8bc9775326aef5405423 Mon Sep 17 00:00:00 2001 From: sovdeeth Date: Mon, 16 Jan 2023 17:13:33 -0500 Subject: [PATCH 02/10] Replace _i versions of get/fromTicks Matching #5307 --- .../java/ch/njol/skript/expressions/ExprPortalCooldown.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java index 65c40af27bf..9e1ff42dfde 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java +++ b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java @@ -48,7 +48,7 @@ public class ExprPortalCooldown extends SimplePropertyExpression[] acceptChange(Changer.ChangeMode mode) { @Override public void change(Event event, @Nullable Object[] delta, Changer.ChangeMode mode) { Entity[] entities = getExpr().getArray(event); - int change = delta == null ? 0 : (int) ((Timespan) delta[0]).getTicks_i(); + int change = delta == null ? 0 : (int) ((Timespan) delta[0]).getTicks(); switch (mode) { case REMOVE: change = -change; From 3ceab15c759f7cfa222eaa4f1aac0785832ab242 Mon Sep 17 00:00:00 2001 From: sovdeeth Date: Mon, 16 Jan 2023 17:50:02 -0500 Subject: [PATCH 03/10] Requested Changes --- .../ch/njol/skript/expressions/ExprPortalCooldown.java | 10 ++++++---- .../tests/syntaxes/expressions/ExprPortalCooldown.sk | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java index 9e1ff42dfde..15cce42a007 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java +++ b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java @@ -32,7 +32,7 @@ import org.eclipse.jdt.annotation.Nullable; @Name("Portal Cooldown") -@Description("The amount of time before an entity can use a portal. By default, this is 15 seconds after exiting a nether portal.") +@Description("The amount of time before an entity can use a portal. By default, this is 15 seconds after exiting a nether portal. Using reset will set the cooldown back to the default 15 seconds.") @Examples({ "on portal:", "\twait 1 tick", @@ -42,7 +42,7 @@ public class ExprPortalCooldown extends SimplePropertyExpression { static { - register(ExprPortalCooldown.class, Timespan.class, "portal cool[-| ]down", "entities"); + register(ExprPortalCooldown.class, Timespan.class, "portal cooldown", "entities"); } @Override @@ -61,8 +61,9 @@ public Class[] acceptChange(Changer.ChangeMode mode) { case DELETE: case REMOVE: return CollectionUtils.array(Timespan.class); + default: + return super.acceptChange(mode); } - return null; } @Override @@ -77,8 +78,9 @@ public void change(Event event, @Nullable Object[] delta, Changer.ChangeMode mod entity.setPortalCooldown(Math.max(entity.getPortalCooldown() + change, 0)); } break; - case DELETE: case RESET: + change = 15 * 20; // 15 seconds, default vanilla portal cooldown. + case DELETE: case SET: for (Entity entity : entities) { entity.setPortalCooldown(Math.max(change, 0)); diff --git a/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk b/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk index 3825d44975d..d4336a07ad0 100644 --- a/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk +++ b/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk @@ -11,4 +11,4 @@ test "portal cooldown": remove 999 ticks from {_m}'s portal cooldown assert {_m}'s portal cooldown is 0 ticks with "portal cooldown remove ##2 failed" delete {_m}'s portal cooldown - assert {_m}'s portal cooldown is 0 ticks with "portal cooldown delete failed" \ No newline at end of file + assert {_m}'s portal cooldown is 0 ticks with "portal cooldown delete failed" From 9d50c29ebfe41b2b090aacc3239d3c1244101594 Mon Sep 17 00:00:00 2001 From: sovde Date: Tue, 17 Jan 2023 11:52:24 -0500 Subject: [PATCH 04/10] Requested Changes --- .../skript/expressions/ExprPortalCooldown.java | 16 ++++++++++------ .../syntaxes/expressions/ExprPortalCooldown.sk | 5 ++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java index 15cce42a007..bf8b9be4cf6 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java +++ b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java @@ -19,20 +19,20 @@ package ch.njol.skript.expressions; import ch.njol.skript.classes.Changer; +import ch.njol.skript.classes.Changer.ChangeMode; import ch.njol.skript.doc.Description; import ch.njol.skript.doc.Examples; import ch.njol.skript.doc.Name; import ch.njol.skript.doc.Since; import ch.njol.skript.expressions.base.SimplePropertyExpression; import ch.njol.skript.util.Timespan; -import ch.njol.skript.util.WeatherType; import ch.njol.util.coll.CollectionUtils; import org.bukkit.entity.Entity; import org.bukkit.event.Event; import org.eclipse.jdt.annotation.Nullable; @Name("Portal Cooldown") -@Description("The amount of time before an entity can use a portal. By default, this is 15 seconds after exiting a nether portal. Using reset will set the cooldown back to the default 15 seconds.") +@Description("The amount of time before an entity can use a portal. By default, it is 15 seconds after exiting a nether portal. Resetting will set the cooldown back to the default 15 seconds.") @Examples({ "on portal:", "\twait 1 tick", @@ -45,6 +45,10 @@ public class ExprPortalCooldown extends SimplePropertyExpression[] acceptChange(Changer.ChangeMode mode) { + public Class[] acceptChange(ChangeMode mode) { switch (mode) { case SET: case ADD: @@ -62,12 +66,12 @@ public Class[] acceptChange(Changer.ChangeMode mode) { case REMOVE: return CollectionUtils.array(Timespan.class); default: - return super.acceptChange(mode); + return null; } } @Override - public void change(Event event, @Nullable Object[] delta, Changer.ChangeMode mode) { + public void change(Event event, @Nullable Object[] delta, ChangeMode mode) { Entity[] entities = getExpr().getArray(event); int change = delta == null ? 0 : (int) ((Timespan) delta[0]).getTicks(); switch (mode) { @@ -79,7 +83,7 @@ public void change(Event event, @Nullable Object[] delta, Changer.ChangeMode mod } break; case RESET: - change = 15 * 20; // 15 seconds, default vanilla portal cooldown. + change = DEFAULT_COOLDOWN; case DELETE: case SET: for (Entity entity : entities) { diff --git a/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk b/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk index d4336a07ad0..3e002298983 100644 --- a/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk +++ b/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk @@ -1,5 +1,5 @@ test "portal cooldown": - spawn zombie at location(0, 64, 0, world "world") + spawn zombie at spawn of world "world" set {_m} to last spawned zombie assert {_m}'s portal cooldown is 0 seconds with "entity spawned with a portal cooldown" set {_m}'s portal cooldown to 25 ticks @@ -12,3 +12,6 @@ test "portal cooldown": assert {_m}'s portal cooldown is 0 ticks with "portal cooldown remove ##2 failed" delete {_m}'s portal cooldown assert {_m}'s portal cooldown is 0 ticks with "portal cooldown delete failed" + reset {_m}'s portal cooldown + assert {_m}'s portal cooldown is 15 seconds with "portal cooldown reset failed" + delete random entity of {_m} From 0961a4c63330fdf9178850ac628165bbc797e319 Mon Sep 17 00:00:00 2001 From: sovde Date: Tue, 17 Jan 2023 13:58:11 -0500 Subject: [PATCH 05/10] Handle Player vs Non-player cooldowns --- .../expressions/ExprPortalCooldown.java | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java index bf8b9be4cf6..dc6d808e073 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java +++ b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java @@ -27,12 +27,14 @@ import ch.njol.skript.expressions.base.SimplePropertyExpression; import ch.njol.skript.util.Timespan; import ch.njol.util.coll.CollectionUtils; +import org.bukkit.GameMode; import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.eclipse.jdt.annotation.Nullable; @Name("Portal Cooldown") -@Description("The amount of time before an entity can use a portal. By default, it is 15 seconds after exiting a nether portal. Resetting will set the cooldown back to the default 15 seconds.") +@Description("The amount of time before an entity can use a portal. By default, it is 15 seconds after exiting a nether portal or end gateway. Players in survival/adventure get a cooldown of 0.5 seconds, while those in creative get no cooldown. Resetting will set the cooldown back to the default 15 seconds for non-player entities and 0.5 seconds for players.") @Examples({ "on portal:", "\twait 1 tick", @@ -48,6 +50,8 @@ public class ExprPortalCooldown extends SimplePropertyExpression Date: Sat, 11 Feb 2023 18:57:12 -0500 Subject: [PATCH 06/10] Requested Changes --- .../expressions/ExprPortalCooldown.java | 11 ++++--- .../expressions/ExprPortalCooldown.sk | 31 +++++++++---------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java index dc6d808e073..5d580684f70 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java +++ b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java @@ -18,7 +18,6 @@ */ package ch.njol.skript.expressions; -import ch.njol.skript.classes.Changer; import ch.njol.skript.classes.Changer.ChangeMode; import ch.njol.skript.doc.Description; import ch.njol.skript.doc.Examples; @@ -34,11 +33,15 @@ import org.eclipse.jdt.annotation.Nullable; @Name("Portal Cooldown") -@Description("The amount of time before an entity can use a portal. By default, it is 15 seconds after exiting a nether portal or end gateway. Players in survival/adventure get a cooldown of 0.5 seconds, while those in creative get no cooldown. Resetting will set the cooldown back to the default 15 seconds for non-player entities and 0.5 seconds for players.") +@Description({ + "The amount of time before an entity can use a portal. By default, it is 15 seconds after exiting a nether portal " + + "or end gateway. Players in survival/adventure get a cooldown of 0.5 seconds, while those in creative get no cooldown. " + + "Resetting will set the cooldown back to the default 15 seconds for non-player entities and 0.5 seconds for players." +}) @Examples({ "on portal:", - "\twait 1 tick", - "\tset portal cooldown of event-entity to 5 seconds" + "\twait 1 tick", + "\tset portal cooldown of event-entity to 5 seconds" }) @Since("INSERT VERSION") public class ExprPortalCooldown extends SimplePropertyExpression { diff --git a/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk b/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk index 3e002298983..59f0974f2aa 100644 --- a/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk +++ b/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk @@ -1,17 +1,16 @@ test "portal cooldown": - spawn zombie at spawn of world "world" - set {_m} to last spawned zombie - assert {_m}'s portal cooldown is 0 seconds with "entity spawned with a portal cooldown" - set {_m}'s portal cooldown to 25 ticks - assert {_m}'s portal cooldown is 25 ticks with "portal cooldown set failed" - add 5 seconds to {_m}'s portal cooldown - assert {_m}'s portal cooldown is 125 ticks with "portal cooldown add ##1 failed" - remove 12 ticks from {_m}'s portal cooldown - assert {_m}'s portal cooldown is 113 ticks with "portal cooldown remove ##1 failed" - remove 999 ticks from {_m}'s portal cooldown - assert {_m}'s portal cooldown is 0 ticks with "portal cooldown remove ##2 failed" - delete {_m}'s portal cooldown - assert {_m}'s portal cooldown is 0 ticks with "portal cooldown delete failed" - reset {_m}'s portal cooldown - assert {_m}'s portal cooldown is 15 seconds with "portal cooldown reset failed" - delete random entity of {_m} + spawn zombie at spawn of world "world": + assert event-entity's portal cooldown is 0 seconds with "entity spawned with a portal cooldown" + set event-entity's portal cooldown to 25 ticks + assert event-entity's portal cooldown is 25 ticks with "portal cooldown set failed" + add 5 seconds to event-entity's portal cooldown + assert event-entity's portal cooldown is 125 ticks with "portal cooldown add ##1 failed" + remove 12 ticks from event-entity's portal cooldown + assert event-entity's portal cooldown is 113 ticks with "portal cooldown remove ##1 failed" + remove 999 ticks from event-entity's portal cooldown + assert event-entity's portal cooldown is 0 ticks with "portal cooldown remove ##2 failed" + delete event-entity's portal cooldown + assert event-entity's portal cooldown is 0 ticks with "portal cooldown delete failed" + reset event-entity's portal cooldown + assert event-entity's portal cooldown is 15 seconds with "portal cooldown reset failed" + delete event-entity \ No newline at end of file From 7caaddc4c47115e3265a79c2fa9f4597cd1096bd Mon Sep 17 00:00:00 2001 From: sovdee Date: Tue, 14 Feb 2023 11:43:09 -0500 Subject: [PATCH 07/10] Update ExprPortalCooldown.sk Co-authored-by: LimeGlass <16087552+TheLimeGlass@users.noreply.github.com> --- .../skript/tests/syntaxes/expressions/ExprPortalCooldown.sk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk b/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk index 59f0974f2aa..7d919d788da 100644 --- a/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk +++ b/src/test/skript/tests/syntaxes/expressions/ExprPortalCooldown.sk @@ -13,4 +13,4 @@ test "portal cooldown": assert event-entity's portal cooldown is 0 ticks with "portal cooldown delete failed" reset event-entity's portal cooldown assert event-entity's portal cooldown is 15 seconds with "portal cooldown reset failed" - delete event-entity \ No newline at end of file + delete event-entity From 7b80efa1eee0ec730462355d4bfedc47df8f4175 Mon Sep 17 00:00:00 2001 From: Sovde Date: Sun, 5 Mar 2023 02:22:46 -0500 Subject: [PATCH 08/10] Update ExprPortalCooldown.java --- .../java/ch/njol/skript/expressions/ExprPortalCooldown.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java index 5d580684f70..59d0ebf8a1a 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java +++ b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java @@ -83,7 +83,7 @@ public void change(Event event, @Nullable Object[] delta, ChangeMode mode) { int change = delta == null ? 0 : (int) ((Timespan) delta[0]).getTicks(); switch (mode) { case REMOVE: - change = -change; + change = -change; // allow fall-through to avoid duplicate code case ADD: for (Entity entity : entities) { entity.setPortalCooldown(Math.max(entity.getPortalCooldown() + change, 0)); From 1cf8c4249c21b18927232a4f0f440932da87102b Mon Sep 17 00:00:00 2001 From: Sovde Date: Sun, 5 Mar 2023 02:56:43 -0500 Subject: [PATCH 09/10] Update ExprPortalCooldown.java --- .../java/ch/njol/skript/expressions/ExprPortalCooldown.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java index 59d0ebf8a1a..b8839ca2808 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java +++ b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java @@ -80,7 +80,7 @@ public Class[] acceptChange(ChangeMode mode) { @Override public void change(Event event, @Nullable Object[] delta, ChangeMode mode) { Entity[] entities = getExpr().getArray(event); - int change = delta == null ? 0 : (int) ((Timespan) delta[0]).getTicks(); + int change = delta == null ? 0 : (int) ((Timespan) delta[0]).getTicks_i(); switch (mode) { case REMOVE: change = -change; // allow fall-through to avoid duplicate code From 41381e054eeb0c8c2ea0b55ea879567244badb49 Mon Sep 17 00:00:00 2001 From: sovdee Date: Wed, 12 Jul 2023 14:18:06 -0700 Subject: [PATCH 10/10] Update src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java Co-authored-by: Patrick Miller --- .../java/ch/njol/skript/expressions/ExprPortalCooldown.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java index b8839ca2808..e4b98afb7ed 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java +++ b/src/main/java/ch/njol/skript/expressions/ExprPortalCooldown.java @@ -34,8 +34,8 @@ @Name("Portal Cooldown") @Description({ - "The amount of time before an entity can use a portal. By default, it is 15 seconds after exiting a nether portal " + - "or end gateway. Players in survival/adventure get a cooldown of 0.5 seconds, while those in creative get no cooldown. " + + "The amount of time before an entity can use a portal. By default, it is 15 seconds after exiting a nether portal or end gateway.", + "Players in survival/adventure get a cooldown of 0.5 seconds, while those in creative get no cooldown.", "Resetting will set the cooldown back to the default 15 seconds for non-player entities and 0.5 seconds for players." }) @Examples({