Skip to content

Commit

Permalink
improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Aug 10, 2024
1 parent d6eec31 commit c76b758
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ public class PortalGodMode extends AEFModule implements Listener {
public PortalGodMode() {
super("combat.portal-god-mode-patch");
config.addComment(configPath + ".enable", """
Patches an exploit that allows players to stand in portals and not take\s
damage indefinitely by just never sending a TeleportAccept packet to the\s
server.\s
Prevents an exploit that allows players to stand in nether portals and not\s
take damage indefinitely by just never sending a TeleportConfirm packet to\s
the server.\s
A similar method is used for the chorus tp exploit, which is not covered\s
by this module.""");
this.delayTicks = config.getInt(".destroy-portal-delay-ticks", 100, """
this.delayTicks = config.getInt(".break-portal-delay-ticks", 100, """
If the player stays inside the nether portal for this time without teleporting,\s
the portal will be broken.""");
the portal will be broken, making the player inside vulnerable again.\s
Nether portal teleports normally happen within ~3s after enter, so 5s (100ticks)\s
should be a safe value.""");
this.playersWaitingForPortalTeleport = Caffeine.newBuilder()
.expireAfterWrite(Duration.ofMillis((delayTicks * 50L) + 1000L)).build(); // Keep cached content for a second longer just in case
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ public class PortalGodMode extends AEFModule implements Listener {
public PortalGodMode() {
super("combat.portal-god-mode-patch");
config.addComment(configPath + ".enable",
"Patches an exploit that allows players to stand in portals and not take \n" +
"damage indefinitely by just never sending a TeleportAccept packet to the \n" +
"server. \n" +
"A similar method is used for the chorus tp exploit, which is not covered \n" +
"Prevents an exploit that allows players to stand in nether portals and not\n" +
"take damage indefinitely by just never sending a TeleportConfirm packet to\n" +
"the server.\n" +
"A similar method is used for the chorus tp exploit, which is not covered\n" +
"by this module.");
this.delayTicks = config.getInt(".destroy-portal-delay-ticks", 100,
"If the player stays inside the nether portal for this time without teleporting, \n" +
"the portal will be broken.");
this.delayTicks = config.getInt(".break-portal-delay-ticks", 100,
"If the player stays inside the nether portal for this time without teleporting,\n" +
"the portal will be broken, making the player inside vulnerable again.\n" +
"Nether portal teleports normally happen within ~3s after enter, so 5s (100ticks)\n" +
"should be a safe value.");
this.playersWaitingForPortalTeleport = Caffeine.newBuilder()
.expireAfterWrite(Duration.ofMillis((delayTicks * 50L) + 1000L)).build(); // Keep cached content for a second longer just in case
}
Expand Down

0 comments on commit c76b758

Please sign in to comment.