-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Completely rewrite keybind handling Remove Requisite due to current problems with it
- Loading branch information
Showing
6 changed files
with
84 additions
and
42 deletions.
There are no files selected for viewing
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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,9 @@ | ||
package net.wyvest.behindyou.utils | ||
|
||
import net.minecraft.util.EnumChatFormatting | ||
import org.apache.commons.lang3.StringUtils as ApacheStringUtils | ||
|
||
/** | ||
* Adapted from Skytils under AGPLv3 | ||
* https://github.com/Skytils/SkytilsMod/blob/1.x/LICENSE.md | ||
*/ | ||
fun String?.startsWithAny(vararg sequences: CharSequence?) = ApacheStringUtils.startsWithAny(this, *sequences) | ||
|
||
/** | ||
* Adapted from Skytils under AGPLv3 | ||
* https://github.com/Skytils/SkytilsMod/blob/1.x/LICENSE.md | ||
*/ | ||
fun String?.equalsAny(vararg sequences: CharSequence?): Boolean { | ||
if (this == null) return false | ||
return sequences.any { it != null && this.equals(it as String, true) } | ||
} | ||
|
||
/** | ||
* Adapted from Skytils under AGPLv3 | ||
* https://github.com/Skytils/SkytilsMod/blob/1.x/LICENSE.md | ||
*/ | ||
fun String?.containsAny(vararg sequences: CharSequence?): Boolean { | ||
if (this == null) return false | ||
return sequences.any { it != null && this.contains(it, true) } | ||
} | ||
|
||
fun String.withoutFormattingCodes(): String = EnumChatFormatting.getTextWithoutFormattingCodes(this) | ||
fun String?.startsWithAny(vararg sequences: CharSequence?) = ApacheStringUtils.startsWithAny(this, *sequences) |
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