[SKIP_BUILD] Update chat-bot document
BIN
docs/.vuepress/public/images/guide/Discord_Add_Bot.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 10 KiB |
BIN
docs/.vuepress/public/images/guide/Discord_Permissions.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 23 KiB |
BIN
docs/.vuepress/public/images/guide/Discord_Reset_Token.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
|
@ -1,133 +1,171 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
||||||
<title>Sign-in | Minecraft Console Client</title>
|
|
||||||
<link rel="stylesheet" href="/redirect_assets/redirect.css" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
<head>
|
||||||
<h3>
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<span class="brand"><img src="/icons/android-chrome-192x192.png" class="logo">Minecraft Console Client</span>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||||
</h3>
|
<title>Sign-in | Minecraft Console Client</title>
|
||||||
<div class="messageContainer">
|
<style>
|
||||||
<div id="codeDisplay" style="display: none;">
|
.messageContainer {
|
||||||
<p>
|
box-shadow: 0px 1px 2px 1px #bdbdbd;
|
||||||
Your sign-in code is <input id='code' onClick="this.setSelectionRange(0, this.value.length)" />
|
border-radius: 2px;
|
||||||
<button id="copyCode">Copy to clipboard</button>
|
max-width: 30em;
|
||||||
</p>
|
padding: 2em;
|
||||||
<p>
|
margin: 0 auto;
|
||||||
Copy and paste the code to your client. <strong>Keep it secret!</strong>
|
background-color: white;
|
||||||
</p>
|
}
|
||||||
</div>
|
|
||||||
<div id="errorDisplay" style="display: none;">
|
.logo {
|
||||||
<p>
|
width: 1.5em;
|
||||||
The following error was occurred:
|
vertical-align: bottom;
|
||||||
</p>
|
padding-right: 0.5em;
|
||||||
<pre><code id="error"></code></pre>
|
}
|
||||||
<p>
|
|
||||||
Click <a href="https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize?client_id=54473e32-df8f-42e9-a649-9419b0dab9d3&response_type=code&redirect_uri=https%3A%2F%2Fmccteam.github.io%2Fredirect.html&scope=XboxLive.signin%20offline_access%20openid%20email&prompt=select_account&response_mode=fragment" rel="noreferrer">here</a> to sign-in again. If the error keep showing up, save the error message and ask for help.
|
.brand {
|
||||||
</p>
|
background-color: #ffffff78;
|
||||||
</div>
|
padding: 0.5em;
|
||||||
<div id="emptyPage" style="display: none;">
|
border-radius: 8px;
|
||||||
<p>
|
}
|
||||||
Click <a href="https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize?client_id=54473e32-df8f-42e9-a649-9419b0dab9d3&response_type=code&redirect_uri=https%3A%2F%2Fmccteam.github.io%2Fredirect.html&scope=XboxLive.signin%20offline_access%20openid%20email&prompt=select_account&response_mode=fragment" rel="noreferrer">here</a> to sign-in.
|
|
||||||
</p>
|
code {
|
||||||
</div>
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
box-shadow: 0px 1px 2px 1px #bdbdbd;
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h3>
|
||||||
|
<span class="brand"><img src="/icons/android-chrome-192x192.png" class="logo">Minecraft Console Client</span>
|
||||||
|
</h3>
|
||||||
|
<div class="messageContainer">
|
||||||
|
<div id="codeDisplay" style="display: none;">
|
||||||
|
<p>
|
||||||
|
Your sign-in code is <input id='code' onClick="this.setSelectionRange(0, this.value.length)" />
|
||||||
|
<button id="copyCode">Copy to clipboard</button>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Copy and paste the code to your client. <strong>Keep it secret!</strong>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<div id="errorDisplay" style="display: none;">
|
||||||
let imagePath = "redirect_assets/wallpaper/";
|
<p>
|
||||||
let numImages = 8;
|
The following error was occurred:
|
||||||
let image = randomIntFromInterval(1, numImages);
|
</p>
|
||||||
let selectedImagePath = `${imagePath}${image}.png`;
|
<pre><code id="error"></code></pre>
|
||||||
let bodyEl = document.body
|
<p>
|
||||||
bodyEl.style.backgroundImage = `url("${selectedImagePath}")`;
|
Click <a
|
||||||
function randomIntFromInterval(min, max) {
|
href="https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize?client_id=54473e32-df8f-42e9-a649-9419b0dab9d3&response_type=code&redirect_uri=https%3A%2F%2Fmccteam.github.io%2Fredirect.html&scope=XboxLive.signin%20offline_access%20openid%20email&prompt=select_account&response_mode=fragment"
|
||||||
// min and max included
|
rel="noreferrer">here</a> to sign-in again. If the error keep showing up, save the error message and
|
||||||
return Math.floor(Math.random() * (max - min + 1) + min)
|
ask for help.
|
||||||
}
|
</p>
|
||||||
</script>
|
</div>
|
||||||
<script>
|
<div id="emptyPage" style="display: none;">
|
||||||
let rawHash = window.location.hash;
|
<p>
|
||||||
if (rawHash !== '') {
|
Click <a
|
||||||
// Remove the leading #
|
href="https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize?client_id=54473e32-df8f-42e9-a649-9419b0dab9d3&response_type=code&redirect_uri=https%3A%2F%2Fmccteam.github.io%2Fredirect.html&scope=XboxLive.signin%20offline_access%20openid%20email&prompt=select_account&response_mode=fragment"
|
||||||
rawHash = rawHash.substring(1);
|
rel="noreferrer">here</a> to sign-in.
|
||||||
}
|
</p>
|
||||||
let hash = new URLSearchParams(rawHash);
|
</div>
|
||||||
let query = new URLSearchParams(window.location.search);
|
</div>
|
||||||
|
<script>
|
||||||
|
let imagePath = "http://localhost:8000/redirect_assets/wallpaper/";
|
||||||
|
let numImages = 8;
|
||||||
|
let image = randomIntFromInterval(1, numImages);
|
||||||
|
let selectedImagePath = `${imagePath}${image}.png`;
|
||||||
|
let bodyEl = document.body
|
||||||
|
bodyEl.style.backgroundImage = `url("${selectedImagePath}")`;
|
||||||
|
function randomIntFromInterval(min, max) {
|
||||||
|
// min and max included
|
||||||
|
return Math.floor(Math.random() * (max - min + 1) + min)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
let rawHash = window.location.hash;
|
||||||
|
if (rawHash !== '') {
|
||||||
|
// Remove the leading #
|
||||||
|
rawHash = rawHash.substring(1);
|
||||||
|
}
|
||||||
|
let hash = new URLSearchParams(rawHash);
|
||||||
|
let query = new URLSearchParams(window.location.search);
|
||||||
|
|
||||||
if (hash.has('error') || query.has('error')) {
|
if (hash.has('error') || query.has('error')) {
|
||||||
// Error occurred
|
// Error occurred
|
||||||
let errorMessage = hash.get('error') || query.get('error')
|
let errorMessage = hash.get('error') || query.get('error')
|
||||||
errorMessage += "\n\n" + (hash.get('error_description') || query.get('error_description'))
|
errorMessage += "\n\n" + (hash.get('error_description') || query.get('error_description'))
|
||||||
displayError(errorMessage);
|
displayError(errorMessage);
|
||||||
|
} else {
|
||||||
|
// Get code
|
||||||
|
if (hash.has('code')) {
|
||||||
|
displayCode(hash.get('code'));
|
||||||
} else {
|
} else {
|
||||||
// Get code
|
// No error and no code
|
||||||
if (hash.has('code')) {
|
displayEmpty();
|
||||||
displayCode(hash.get('code'));
|
|
||||||
} else {
|
|
||||||
// No error and no code
|
|
||||||
displayEmpty();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Lastly, remove code from URL hash
|
}
|
||||||
window.location.hash = ''
|
// Lastly, remove code from URL hash
|
||||||
function displayCode(code) {
|
window.location.hash = ''
|
||||||
let codeDisplay = document.getElementById('codeDisplay')
|
function displayCode(code) {
|
||||||
let codeEl = document.getElementById('code');
|
let codeDisplay = document.getElementById('codeDisplay')
|
||||||
codeEl.value = code;
|
let codeEl = document.getElementById('code');
|
||||||
codeDisplay.style.display = "block"
|
codeEl.value = code;
|
||||||
let copyBtn = document.getElementById('copyCode');
|
codeDisplay.style.display = "block"
|
||||||
copyBtn.addEventListener('click', () => {
|
let copyBtn = document.getElementById('copyCode');
|
||||||
copyTextToClipboard(code);
|
copyBtn.addEventListener('click', () => {
|
||||||
});
|
copyTextToClipboard(code);
|
||||||
}
|
});
|
||||||
function displayError(errorText) {
|
}
|
||||||
let errorDisplay = document.getElementById('errorDisplay');
|
function displayError(errorText) {
|
||||||
let errorEl = document.getElementById('error');
|
let errorDisplay = document.getElementById('errorDisplay');
|
||||||
errorEl.innerText = errorText;
|
let errorEl = document.getElementById('error');
|
||||||
errorDisplay.style.display = "block";
|
errorEl.innerText = errorText;
|
||||||
}
|
errorDisplay.style.display = "block";
|
||||||
function displayEmpty() {
|
}
|
||||||
let emptyPage = document.getElementById('emptyPage');
|
function displayEmpty() {
|
||||||
emptyPage.style.display = "block";
|
let emptyPage = document.getElementById('emptyPage');
|
||||||
}
|
emptyPage.style.display = "block";
|
||||||
// Clipboard. Thanks to https://stackoverflow.com/questions/400212/how-do-i-copy-to-the-clipboard-in-javascript
|
}
|
||||||
function fallbackCopyTextToClipboard(text) {
|
// Clipboard. Thanks to https://stackoverflow.com/questions/400212/how-do-i-copy-to-the-clipboard-in-javascript
|
||||||
var textArea = document.createElement("textarea");
|
function fallbackCopyTextToClipboard(text) {
|
||||||
textArea.value = text;
|
var textArea = document.createElement("textarea");
|
||||||
|
textArea.value = text;
|
||||||
|
|
||||||
// Avoid scrolling to bottom
|
// Avoid scrolling to bottom
|
||||||
textArea.style.top = "0";
|
textArea.style.top = "0";
|
||||||
textArea.style.left = "0";
|
textArea.style.left = "0";
|
||||||
textArea.style.position = "fixed";
|
textArea.style.position = "fixed";
|
||||||
|
|
||||||
document.body.appendChild(textArea);
|
document.body.appendChild(textArea);
|
||||||
textArea.focus();
|
textArea.focus();
|
||||||
textArea.select();
|
textArea.select();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var successful = document.execCommand('copy');
|
var successful = document.execCommand('copy');
|
||||||
var msg = successful ? 'successful' : 'unsuccessful';
|
var msg = successful ? 'successful' : 'unsuccessful';
|
||||||
console.log('Fallback: Copying text command was ' + msg);
|
console.log('Fallback: Copying text command was ' + msg);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Fallback: Oops, unable to copy', err);
|
console.error('Fallback: Oops, unable to copy', err);
|
||||||
}
|
|
||||||
|
|
||||||
document.body.removeChild(textArea);
|
|
||||||
}
|
}
|
||||||
function copyTextToClipboard(text) {
|
|
||||||
if (!navigator.clipboard) {
|
document.body.removeChild(textArea);
|
||||||
|
}
|
||||||
|
function copyTextToClipboard(text) {
|
||||||
|
if (!navigator.clipboard) {
|
||||||
fallbackCopyTextToClipboard(text);
|
fallbackCopyTextToClipboard(text);
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
navigator.clipboard.writeText(text).then(function() {
|
|
||||||
console.log('Async: Copying to clipboard was successful!');
|
|
||||||
}, function(err) {
|
|
||||||
console.error('Async: Could not copy text: ', err);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
</script>
|
navigator.clipboard.writeText(text).then(function () {
|
||||||
</body>
|
console.log('Async: Copying to clipboard was successful!');
|
||||||
|
}, function (err) {
|
||||||
|
console.error('Async: Could not copy text: ', err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
.messageContainer {
|
|
||||||
box-shadow: 0px 1px 2px 1px #bdbdbd;
|
|
||||||
border-radius: 2px;
|
|
||||||
max-width: 30em;
|
|
||||||
padding: 2em;
|
|
||||||
margin: 0 auto;
|
|
||||||
background-color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo {
|
|
||||||
width: 1.5em;
|
|
||||||
vertical-align: bottom;
|
|
||||||
padding-right: 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.brand {
|
|
||||||
background-color: #ffffff78;
|
|
||||||
padding: 0.5em;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
white-space: pre-wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre {
|
|
||||||
box-shadow: 0px 1px 2px 1px #bdbdbd;
|
|
||||||
padding: 0.5em;
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 706 KiB After Width: | Height: | Size: 591 KiB |
|
Before Width: | Height: | Size: 860 KiB After Width: | Height: | Size: 662 KiB |
|
Before Width: | Height: | Size: 799 KiB After Width: | Height: | Size: 556 KiB |
|
Before Width: | Height: | Size: 906 KiB After Width: | Height: | Size: 735 KiB |
|
Before Width: | Height: | Size: 918 KiB After Width: | Height: | Size: 802 KiB |
|
Before Width: | Height: | Size: 682 KiB After Width: | Height: | Size: 571 KiB |
|
Before Width: | Height: | Size: 966 KiB After Width: | Height: | Size: 637 KiB |
|
Before Width: | Height: | Size: 637 KiB After Width: | Height: | Size: 530 KiB |
|
|
@ -236,6 +236,28 @@ In scripts and remote control, no slash is needed to perform the command, eg. `q
|
||||||
/bed sleep 50
|
/bed sleep 50
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `blockinfo`
|
||||||
|
|
||||||
|
<div class="custom-container tip"><p class="custom-container-title">Tip</p>
|
||||||
|
|
||||||
|
**You need to have [Terrain And Movements](configuration.md#terrainandmovements) enabled in order for this to work.**
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
- **Description:**
|
||||||
|
|
||||||
|
Reports the block type at the given position.
|
||||||
|
|
||||||
|
If you use the `-s` option it will report the types of blocks around the targeted blokcs.
|
||||||
|
|
||||||
|
- **Usage:**
|
||||||
|
|
||||||
|
Basic usage:
|
||||||
|
|
||||||
|
```
|
||||||
|
/blockinfo <x> <y> <z> [-s]
|
||||||
|
```
|
||||||
|
|
||||||
### `bots`
|
### `bots`
|
||||||
|
|
||||||
- **Description:**
|
- **Description:**
|
||||||
|
|
@ -364,6 +386,30 @@ In scripts and remote control, no slash is needed to perform the command, eg. `q
|
||||||
/dropitem diamond
|
/dropitem diamond
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `enchant`
|
||||||
|
|
||||||
|
<div class="custom-container tip"><p class="custom-container-title">Tip</p>
|
||||||
|
|
||||||
|
**You need to have [Inventory Handling](configuration.md#inventoryhandling) enabled in order for this to work.**
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
- **Description:**
|
||||||
|
|
||||||
|
Allows you to enchant items in an enchanting table.
|
||||||
|
|
||||||
|
You need to first open an enchanting table and then place and item that you want to enchant and lapis in the enchanting table, and then you can execute the command.
|
||||||
|
|
||||||
|
To open an enchanting table you can use the [`useblock`](#useblock) command.
|
||||||
|
|
||||||
|
- **Usage:**
|
||||||
|
|
||||||
|
Basic usage:
|
||||||
|
|
||||||
|
```
|
||||||
|
/enchant <top|middle|bottom>
|
||||||
|
```
|
||||||
|
|
||||||
### `entity`
|
### `entity`
|
||||||
|
|
||||||
- **Description:**
|
- **Description:**
|
||||||
|
|
@ -440,21 +486,18 @@ In scripts and remote control, no slash is needed to perform the command, eg. `q
|
||||||
/execif test2 == "1" ---> send Success 2!
|
/execif test2 == "1" ---> send Success 2!
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
Basic C# expression:
|
Basic C# expression:
|
||||||
|
|
||||||
```
|
```
|
||||||
/execif 1 + 2 + 3 == 6 ---> send Success!
|
/execif 1 + 2 + 3 == 6 ---> send Success!
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
Using MCC class:
|
Using MCC class:
|
||||||
|
|
||||||
```
|
```
|
||||||
/execif MCC.GetHealth() == 20.0 ---> send Success!
|
/execif MCC.GetHealth() == 20.0 ---> send Success!
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
Using in combination with [`execmulti`](#execmulti):
|
Using in combination with [`execmulti`](#execmulti):
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
||||||