1
0
Fork 0
mirror of https://github.com/haselkern/Minecraft-ArmorStand.git synced 2025-05-17 15:05:33 +00:00

Increased character limit for command block hint

Starting with Minecraft Version 1.11
This commit is contained in:
Lars Martens 2017-10-28 18:10:31 +02:00
parent c6fb3236bd
commit b70c469ecd
2 changed files with 4 additions and 2 deletions

View file

@ -236,7 +236,7 @@
<br> <br>
<div id="getcommandblock"> <div id="getcommandblock">
<div class="padding"> <div class="padding">
If your command is longer than 100 characters, it needs to be executed with a <b>command block</b>. Obtain one by typing: If your command is longer than 256 characters (100 before Minecraft 1.11), it needs to be executed with a <i>command block</i>. Obtain one by typing:
</div> </div>
<div class="code"> <div class="code">
/give @p command_block /give @p command_block

View file

@ -409,7 +409,9 @@ function updateUI(){
// Generate code // Generate code
$("#code").text(generateCode()); $("#code").text(generateCode());
if(generateCode().length > 100){ // Show hint, when command is too long
let characterLimit = (mcVersion == "1.8" || mcVersion == "1.9") ? 100 : 256;
if(generateCode().length > characterLimit){
$("#codeinfo").slideDown(); $("#codeinfo").slideDown();
} }
else{ else{