First commit.
This commit is contained in:
commit
2e5155380b
12 changed files with 471 additions and 0 deletions
BIN
1.gif
Normal file
BIN
1.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 391 B |
130
MinecraftColorCodes.3.7.js
Normal file
130
MinecraftColorCodes.3.7.js
Normal file
|
|
@ -0,0 +1,130 @@
|
||||||
|
|
||||||
|
var obfuscators = [];
|
||||||
|
var styleMap = {
|
||||||
|
'§4': 'font-weight:normal;text-decoration:none;color:#be0000',
|
||||||
|
'§c': 'font-weight:normal;text-decoration:none;color:#fe3f3f',
|
||||||
|
'§6': 'font-weight:normal;text-decoration:none;color:#d9a334',
|
||||||
|
'§e': 'font-weight:normal;text-decoration:none;color:#fefe3f',
|
||||||
|
'§2': 'font-weight:normal;text-decoration:none;color:#00be00',
|
||||||
|
'§a': 'font-weight:normal;text-decoration:none;color:#3ffe3f',
|
||||||
|
'§b': 'font-weight:normal;text-decoration:none;color:#3ffefe',
|
||||||
|
'§3': 'font-weight:normal;text-decoration:none;color:#00bebe',
|
||||||
|
'§1': 'font-weight:normal;text-decoration:none;color:#0000be',
|
||||||
|
'§9': 'font-weight:normal;text-decoration:none;color:#3f3ffe',
|
||||||
|
'§d': 'font-weight:normal;text-decoration:none;color:#fe3ffe',
|
||||||
|
'§5': 'font-weight:normal;text-decoration:none;color:#be00be',
|
||||||
|
'§f': 'font-weight:normal;text-decoration:none;color:#ffffff',
|
||||||
|
'§7': 'font-weight:normal;text-decoration:none;color:#bebebe',
|
||||||
|
'§8': 'font-weight:normal;text-decoration:none;color:#3f3f3f',
|
||||||
|
'§0': 'font-weight:normal;text-decoration:none;color:#000000',
|
||||||
|
'§l': 'font-weight:bold',
|
||||||
|
'§n': 'text-decoration:underline;text-decoration-skip:spaces',
|
||||||
|
'§o': 'font-style:italic',
|
||||||
|
'§m': 'text-decoration:line-through;text-decoration-skip:spaces',
|
||||||
|
};
|
||||||
|
function obfuscate(string, elem) {
|
||||||
|
var magicSpan,
|
||||||
|
currNode,
|
||||||
|
len = elem.childNodes.length;
|
||||||
|
if(string.indexOf('<br>') > -1) {
|
||||||
|
elem.innerHTML = string;
|
||||||
|
for(var j = 0; j < len; j++) {
|
||||||
|
currNode = elem.childNodes[j];
|
||||||
|
if(currNode.nodeType === 3) {
|
||||||
|
magicSpan = document.createElement('span');
|
||||||
|
magicSpan.innerHTML = currNode.nodeValue;
|
||||||
|
elem.replaceChild(magicSpan, currNode);
|
||||||
|
init(magicSpan);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
init(elem, string);
|
||||||
|
}
|
||||||
|
function init(el, str) {
|
||||||
|
var i = 0,
|
||||||
|
obsStr = str || el.innerHTML,
|
||||||
|
len = obsStr.length;
|
||||||
|
obfuscators.push( window.setInterval(function () {
|
||||||
|
if(i >= len) i = 0;
|
||||||
|
obsStr = replaceRand(obsStr, i);
|
||||||
|
el.innerHTML = obsStr;
|
||||||
|
i++;
|
||||||
|
}, 0) );
|
||||||
|
}
|
||||||
|
function randInt(min, max) {
|
||||||
|
return Math.floor( Math.random() * (max - min + 1) ) + min;
|
||||||
|
}
|
||||||
|
function replaceRand(string, i) {
|
||||||
|
var randChar = String.fromCharCode( randInt(64,90) ); /*Numbers: 48-57 Al:64-90*/
|
||||||
|
return string.substr(0, i) + randChar + string.substr(i + 1, string.length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function applyCode(string, codes) {
|
||||||
|
var len = codes.length;
|
||||||
|
var elem = document.createElement('span'),
|
||||||
|
obfuscated = false;
|
||||||
|
for(var i = 0; i < len; i++) {
|
||||||
|
elem.style.cssText += styleMap[codes[i]] + ';';
|
||||||
|
if(codes[i] === '§k') {
|
||||||
|
obfuscate(string, elem);
|
||||||
|
obfuscated = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!obfuscated) elem.innerHTML = string;
|
||||||
|
return elem;
|
||||||
|
}
|
||||||
|
function parseStyle(string) {
|
||||||
|
var codes = string.match(/§.{1}/g) || [],
|
||||||
|
indexes = [],
|
||||||
|
apply = [],
|
||||||
|
tmpStr,
|
||||||
|
indexDelta,
|
||||||
|
noCode,
|
||||||
|
final = document.createDocumentFragment(),
|
||||||
|
len = codes.length,
|
||||||
|
string = string.replace(/\n|\\n/g, '<br>');
|
||||||
|
|
||||||
|
for(var i = 0; i < len; i++) {
|
||||||
|
indexes.push( string.indexOf(codes[i]) );
|
||||||
|
string = string.replace(codes[i], '\x00\x00');
|
||||||
|
}
|
||||||
|
if(indexes[0] !== 0) {
|
||||||
|
final.appendChild( applyCode( string.substring(0, indexes[0]), [] ) );
|
||||||
|
}
|
||||||
|
for(var i = 0; i < len; i++) {
|
||||||
|
indexDelta = indexes[i + 1] - indexes[i];
|
||||||
|
if(indexDelta === 2) {
|
||||||
|
while(indexDelta === 2) {
|
||||||
|
apply.push ( codes[i] );
|
||||||
|
i++;
|
||||||
|
indexDelta = indexes[i + 1] - indexes[i];
|
||||||
|
}
|
||||||
|
apply.push ( codes[i] );
|
||||||
|
} else {
|
||||||
|
apply.push( codes[i] );
|
||||||
|
}
|
||||||
|
if( apply.lastIndexOf('§r') > -1) {
|
||||||
|
apply = apply.slice( apply.lastIndexOf('§r') + 1 );
|
||||||
|
}
|
||||||
|
tmpStr = string.substring( indexes[i], indexes[i + 1] );
|
||||||
|
final.appendChild( applyCode(tmpStr, apply) );
|
||||||
|
}
|
||||||
|
return final;
|
||||||
|
}
|
||||||
|
function clearObfuscators() {
|
||||||
|
var i = obfuscators.length;
|
||||||
|
for(;i--;) {
|
||||||
|
clearInterval(obfuscators[i]);
|
||||||
|
}
|
||||||
|
obfuscators = [];
|
||||||
|
}
|
||||||
|
String.prototype.replaceColorCodes = function() {
|
||||||
|
clearObfuscators();
|
||||||
|
var outputString = parseStyle(String(this));
|
||||||
|
return outputString;
|
||||||
|
};
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////
|
||||||
|
function cutString(str, cutStart, cutEnd){
|
||||||
|
return str.substr(0,cutStart) + str.substr(cutEnd+1);
|
||||||
|
}
|
||||||
BIN
MinecraftRegular-Bmg3.otf
Normal file
BIN
MinecraftRegular-Bmg3.otf
Normal file
Binary file not shown.
BIN
images/ghostsandstuff.png
Normal file
BIN
images/ghostsandstuff.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.9 KiB |
BIN
images/hats.png
Normal file
BIN
images/hats.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
50
index.html
Normal file
50
index.html
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<link rel="stylesheet" href="styles.css">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>NBeta</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="everythingHelper">
|
||||||
|
<header>
|
||||||
|
<div id="linksBox">
|
||||||
|
<h1 id="title">neoBeta</h1>
|
||||||
|
<ul id="headerLinks">
|
||||||
|
<a href="index.html">home</a> -
|
||||||
|
<a href="index.html">mods</a> -
|
||||||
|
<a href="index.html">plugins</a>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
<h1>Welcome.</h1>
|
||||||
|
<p>This is a project that aims to preserve Minecraft Beta mods and plugins through archives of documentation and JARs and showcase new plugins for beta.</p>
|
||||||
|
<div id="featured"><h2>featured projects</h2>
|
||||||
|
<div id="featuredHelper">
|
||||||
|
<div class="featuredProject">
|
||||||
|
<a href="project.html?id=aboukkit">
|
||||||
|
<img src="images/projects/aboukkit.png">
|
||||||
|
<p>Aboukkit</p>
|
||||||
|
<p>by tenkuma</p>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="featuredProject">
|
||||||
|
<img src="images/projects/ghostsandstuff.png">
|
||||||
|
<p>Ghosts 'n Stuff</p>
|
||||||
|
<p>by tenkuma</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="featuredProject">
|
||||||
|
<img src="images/projects/hats.png">
|
||||||
|
<p>Hats</p>
|
||||||
|
<p>by AleksandarHaralanov</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
36
project.html
Normal file
36
project.html
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<link rel="stylesheet" href="styles.css">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>NBeta</title>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||||
|
<script src="MinecraftColorCodes.3.7.js"></script>
|
||||||
|
<script src="project.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="everythingHelper">
|
||||||
|
<header>
|
||||||
|
<div id="linksBox">
|
||||||
|
<h1 id="title">neoBeta</h1>
|
||||||
|
<ul id="headerLinks">
|
||||||
|
<a href="index.html">home</a> -
|
||||||
|
<a href="index.html">mods</a> -
|
||||||
|
<a href="index.html">plugins</a>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div id="projectHeader">
|
||||||
|
<img>
|
||||||
|
<div id="projectTitleSubtitle">
|
||||||
|
<h1>Loading project...</h1>
|
||||||
|
<p>...</p>
|
||||||
|
</div>
|
||||||
|
<button>Download</button>
|
||||||
|
</div>
|
||||||
|
<main id="projectDescription">
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
42
project.js
Normal file
42
project.js
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
const downloadButton = document.querySelector("#projectHeader button");
|
||||||
|
const header = document.querySelector("#projectHeader");
|
||||||
|
const headerTitle = document.querySelector("#projectHeader h1");
|
||||||
|
const subtitle = document.querySelector("#projectHeader p");
|
||||||
|
const main = document.querySelector("main");
|
||||||
|
const logo = document.querySelector("#projectHeader img");
|
||||||
|
|
||||||
|
const queryString = window.location.search;
|
||||||
|
const urlParams = new URLSearchParams(queryString);
|
||||||
|
const projectID = urlParams.get('id');
|
||||||
|
|
||||||
|
function loadProject() {
|
||||||
|
var jsonXhr = new XMLHttpRequest();
|
||||||
|
jsonXhr.open("GET", "projects/" + projectID + "/project.json", true);
|
||||||
|
|
||||||
|
jsonXhr.onreadystatechange = function () {
|
||||||
|
if (jsonXhr.readyState === 4 && jsonXhr.status === 200) {
|
||||||
|
var jsonData = JSON.parse(jsonXhr.responseText);
|
||||||
|
headerTitle.innerText = jsonData.project.title;
|
||||||
|
subtitle.innerText = jsonData.project.subtitle;
|
||||||
|
console.log(jsonData);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var mdXhr = new XMLHttpRequest();
|
||||||
|
mdXhr.open("GET", "projects/" + projectID + "/description.md", true);
|
||||||
|
|
||||||
|
mdXhr.onreadystatechange = function () {
|
||||||
|
if (mdXhr.readyState === 4 && mdXhr.status === 200) {
|
||||||
|
const html = marked.parse(
|
||||||
|
mdXhr.responseText.replace(/^[\u200B\u200C\u200D\u200E\u200F\uFEFF]/,"")
|
||||||
|
)
|
||||||
|
main.appendChild(html.replaceColorCodes());
|
||||||
|
console.log(html.replaceColorCodes());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
jsonXhr.send();
|
||||||
|
mdXhr.send();
|
||||||
|
logo.src = "projects/" + projectID + "/logo.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
loadProject();
|
||||||
19
projects/aboukkit/description.md
Normal file
19
projects/aboukkit/description.md
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
## Custom commands with predefined responses!
|
||||||
|
This plugin adds a simple way to add custom commands that will respond users with predefined messages from config.yml. It supports Minecraft's color coding (use & instead of §) and placeholders for player/server info (TODO).
|
||||||
|
|
||||||
|
### Default Commands
|
||||||
|
- About
|
||||||
|
- Aboukkit
|
||||||
|
These default commands §aneed§r to be configured.
|
||||||
|
|
||||||
|
### Adding new commands
|
||||||
|
First of all: run the server with the plugin for the first time, so config.yml is generated.
|
||||||
|
|
||||||
|
Follow the structure that the template shows in your config.yml. Then use a file explorer to open the plugin's JAR file and edit plugin.yml, you can copy a command entry and fill all the fields (be careful with indentation, YML does not support TAB).
|
||||||
|
|
||||||
|
### Why?
|
||||||
|
I made this plugin because I have a server for version b1.7.3 and I wanted to add a /about command to give credit to the server founders and link to our website. So I made this that I will use every time I need a simple 'wall of text' command.
|
||||||
|
|
||||||
|
Newer versions
|
||||||
|
I don't see why I would build this for latest versions, I guess there are already better solutions. I made this just because of the lack of plugins for Minecraft beta.
|
||||||
|
|
||||||
BIN
projects/aboukkit/logo.png
Normal file
BIN
projects/aboukkit/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.3 KiB |
23
projects/aboukkit/project.json
Normal file
23
projects/aboukkit/project.json
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"project": {
|
||||||
|
"title": "Aboukkit",
|
||||||
|
"subtitle": "A Brief Subtitle for the Project",
|
||||||
|
"description": "This is a placeholder description for the project. You can add details about the project's objectives, features, and goals here.",
|
||||||
|
"logo": "",
|
||||||
|
"images": [
|
||||||
|
{
|
||||||
|
"src": "images/image1.jpg",
|
||||||
|
"alt": "Image 1 description"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "images/image2.jpg",
|
||||||
|
"alt": "Image 2 description"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "images/image3.jpg",
|
||||||
|
"alt": "Image 3 description"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
171
styles.css
Normal file
171
styles.css
Normal file
|
|
@ -0,0 +1,171 @@
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: Minecraft;
|
||||||
|
src: url("MinecraftRegular-Bmg3.otf") format("opentype");
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: Minecraft, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||||
|
background-color: black;
|
||||||
|
color:white;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
color:greenyellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
outline: 2px solid gray;
|
||||||
|
margin-top: 20px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
transition: .2s;
|
||||||
|
background-color: black;
|
||||||
|
color: white;
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid white;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
color: gray;
|
||||||
|
border: 1px solid gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #titleBox {
|
||||||
|
background-color: brown;
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
color: white;
|
||||||
|
text-align: center;
|
||||||
|
background: url("1.gif");
|
||||||
|
background-size: contain;
|
||||||
|
outline: 2px solid white;
|
||||||
|
margin-right: 12px;
|
||||||
|
} */
|
||||||
|
|
||||||
|
/* #titleBox:hover ~ #linksBox {
|
||||||
|
outline: 2px solid white;
|
||||||
|
height: auto;
|
||||||
|
} */
|
||||||
|
|
||||||
|
#linksBox {
|
||||||
|
padding: 10px;
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
background-color: black;
|
||||||
|
outline: 2px solid gray;
|
||||||
|
height: fit-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
#headerLinks a {
|
||||||
|
margin-top: auto;
|
||||||
|
margin-bottom: auto;
|
||||||
|
padding: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#everythingHelper {
|
||||||
|
max-width: 60%;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#headerLinks {
|
||||||
|
padding: 0;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#title {
|
||||||
|
margin-top: auto;
|
||||||
|
margin-bottom: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#featured {
|
||||||
|
margin-top: 20px;
|
||||||
|
border: 2px solid greenyellow;
|
||||||
|
padding: 10px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
#featuredHelper {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.featuredProject {
|
||||||
|
transition: .2s;
|
||||||
|
height: auto;
|
||||||
|
width: 15%;
|
||||||
|
font-size: smaller;
|
||||||
|
padding: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.featuredProject:hover {
|
||||||
|
transition: .2s;
|
||||||
|
outline: 4px solid gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.featuredProject img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.featuredProject p {
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
#featured h2 {
|
||||||
|
font-size: medium;
|
||||||
|
font-weight: 100;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#featuredHelper {
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#projectTitleSubtitle {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#projectHeader {
|
||||||
|
padding-top: 20px;
|
||||||
|
gap: 20px;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
#projectHeader button {
|
||||||
|
height: fit-content;
|
||||||
|
margin-top: auto;
|
||||||
|
margin-bottom: auto;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#projectHeader button:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#projectDescription li {
|
||||||
|
margin-left: 20px;
|
||||||
|
list-style-type: "> ";
|
||||||
|
}
|
||||||
|
|
||||||
|
#projectDescription h1, h2 {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue