25w16a singleplayer added
This commit is contained in:
parent
44ae27f469
commit
195e0e3a2a
|
@ -5,4 +5,5 @@ lwjgl-rundir/_eagstorage.p.dat
|
||||||
sp-server/.gradle
|
sp-server/.gradle
|
||||||
sp-server/.settings
|
sp-server/.settings
|
||||||
sp-server/build
|
sp-server/build
|
||||||
sp-server/bin
|
sp-server/bin
|
||||||
|
stable-download/stable-download_repl.zip
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
java -cp "lwjgl-rundir/MakeOfflineDownload.jar:CompilePackage.jar" net.lax1dude.eaglercraft.v1_8.buildtools.workspace.MakeOfflineDownload "javascript/OfflineDownloadTemplate.txt" "javascript/classes.js" "javascript/assets.epk" "javascript/Eaglercraft_1.6.4_Offline.html" "javascript/lang"
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
java -cp zip-generator/deps/*:zip-generator/zipGenerator.jar net.lax1dude.eaglercraft.zip_generator.ZipGenerator
|
|
@ -1,89 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
|
|
||||||
This file is from ${date}, there is no official eagler download link anymore, check the websites and discords of your favorite eagler servers for new versions
|
|
||||||
|
|
||||||
Be aware that some server owners are lazy and do not update their client regularly
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<meta name="description" content="Eaglercraft 1.6.4 Offline" />
|
|
||||||
<meta name="keywords" content="eaglercraft, catfoolyou, minecraft, lax1dude, 1.6.4" />
|
|
||||||
<title>Eaglercraft 1.6.4</title>
|
|
||||||
<meta property="og:locale" content="en-US" />
|
|
||||||
<meta property="og:type" content="website" />
|
|
||||||
<meta property="og:title" content="Eaglercraft 1.6.4 Offline" />
|
|
||||||
<meta property="og:description" content="this file is not a website, whoever uploaded it to this URL is a dumbass" />
|
|
||||||
<script type="text/javascript">
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
|
|
||||||
// %%%%%%%%% launch options %%%%%%%%%%%%
|
|
||||||
|
|
||||||
window.eaglercraftOpts = { container: "game_frame",
|
|
||||||
|
|
||||||
serverWorkerURI: "worker_bootstrap.js",
|
|
||||||
|
|
||||||
servers: [
|
|
||||||
{ serverName: "Local Test Server", serverAddress: "ws://localhost:25565", hideAddress: false },
|
|
||||||
{ serverName: "CathCraft", serverAddress: "wss://cathcraft.zelz.net", hideAddress: false },
|
|
||||||
{ serverName: "CathCraft (public beta)", serverAddress: "wss://cathcraft.cirsi.us", hideAddress: false },
|
|
||||||
{ serverName: "Quakegen", serverAddress: "wss://walrus-enjoyed-cattle.ngrok-free.app", hideAddress: false },
|
|
||||||
{ serverName: "Ayunboom", serverAddress: "wss://sigma.shhnowisnottheti.me", hideAddress: false }
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
|
|
||||||
|
|
||||||
${classes_js}
|
|
||||||
|
|
||||||
window.eaglercraftOpts.assetsURI = ${assets_epk};
|
|
||||||
|
|
||||||
var launchInterval = -1;
|
|
||||||
var launchCounter = 1;
|
|
||||||
var launchCountdownNumberElement = null;
|
|
||||||
var launchCountdownProgressElement = null;
|
|
||||||
|
|
||||||
function launchTick() {
|
|
||||||
launchCountdownNumberElement.innerText = "" + Math.floor(6.0 - launchCounter * 0.06);
|
|
||||||
launchCountdownProgressElement.style.width = "" + launchCounter + "%";
|
|
||||||
if(++launchCounter > 100) {
|
|
||||||
clearInterval(launchInterval);
|
|
||||||
setTimeout(() => { document.getElementById("launch_countdown_screen").remove(); main(); }, 50);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener("load", () => {
|
|
||||||
launchCountdownNumberElement = document.getElementById("launchCountdownNumber");
|
|
||||||
launchCountdownProgressElement = document.getElementById("launchCountdownProgress");
|
|
||||||
launchInterval = setInterval(launchTick, 50);
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<link type="image/png" rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAR/SURBVEhLtZXZK3ZRFMYPcqXc+gv413DHxVuGIpIhkciQWaRccCNjSCkligwXSOZ5nmfv9zvn2e8+58V753sudmuvvdZ61l5r7XOc8H+GS/D19aUNkPz5+aktQH5/f//4+LBKZKuRkpUtQjCUYG5gD2T38vLy/PwsDfL9/f3Dw8PT05M0b29vnKLhCKCBT4L4gvBLBIei4//4+Hh1dUVEQutUuLu7E83FxQUGnKLBWKfQaA3S+AREVxaEOD8/Pzk50XpzcyMDcH19zdZG3N3d3dzc3Nvb01aX5pQUpQGGQJxcQpfNysoKhUIdHR1o1tbWbInYAgxIPDMzMy8vLzc3FxqOdMoRqwJK8G8ALUYIhHMiSEhIwI6CyIb0qQzC4eGhsXCc1tZWnZIEKzdQJQSXgKxfX18RCM3Z5eWlcfVAxKOjo+Pj49PTU88lTOk2NjbMsePc3t6SAfcgFdszOyMuAdeBg0CQi2lhYUHOeOLDCisN8FzcPFZXV3t7ezHY3t5GQ+6it+2xMASsKhEEWKsmRLRBBUpPvpJ/TpFKFBwKYAiITmicsbYhdHfJAltqhUCVsCQhwslmeXmZxiBQT9c0Ar9E2O3v72sYSE0N1yQArkKy0kBMXLqlZqIZHR3t6empqqqSDcBdhXEJSJ/bUc3q6uq+vj629GB9fR1WsLW1NTs7u7S0RN2locMjIyOEm5ubQ7+4uJienk4/+vv77Y1hwhLBEKhwWHitdVFfX9/Y2Gg2HuLi4owUAysrK8yCG97rh0+ApP5Q2ZycHFlPTExUVFRIBvn5+WhKSkp2dnaMKhptbW2426GgQ/rwuAQCZ1hwFayLiork9hMFBQV1dXVmE0BLS4vqw3QFB8kn4IAxoGPkYpxi4FeDmpqas7Mz4pClAgqGwD48rjY2NmacYqC0tJQ1KSlJWyE5OZkpUKkBAxZVIntAoZh04+Q48fHxPNGBgYHExMT29naj9cBodnZ2mo3jlJWVMeW2OGQck4B1amqqoaGhqamJjx2lGxwcpL0mUgR8fJhsWqJtSkoKU2SbHHUDpkhPBujd8xuQG6PJRM/Pz09PT7O1NNnZ2Tw3fgZkXVhYKCUlUhBATP+hCVyKZGky17RV0g04laayslJ6hlVeFHB4eFhKaogGd0LxtmTgE+hbhKDnPjMzgw8E3qGL2tpaBWpubjYqj2BoaEj6rq4uNATRZ0ZwCbiL6gXEzINk5vCBQJ9rMD4+rkA8QNK036uDg4Py8vLu7m680KjIBNR3zBDoWQM1g98snyB+VSoRW8C/UwR81/SvhgNj9JOTkwwVERUdRBEI0BAdLRVERkhLS8vIyEDQlrsTPTU1lVFhKxARvZgUlFLbegCf4BvIsbi4mIg4E5EogIHhiKCMtU0WUFiVy06j5fAJIDdSBDQw+PegDfBRcbOPwH4F9LuFWIIQdQNKwWqzIE0aoFUaBsw+SQuFw0uNtC9A+F4i3QNrbg3IDn+SAsHh+wYiEpeyBEMLv/cAO6KzAijxxB+Y4wisBhssJUhjEbPJf4Nw+B+JXqLW3bw+wQAAAABJRU5ErkJggg==" />
|
|
||||||
</head>
|
|
||||||
<body style="margin:0px;width:100vw;height:100vh;overflow:hidden;" id="game_frame">
|
|
||||||
<div style="margin:0px;width:100%;height:100%;font-family:sans-serif;display:flex;align-items:center;user-select:none;" id="launch_countdown_screen">
|
|
||||||
<div style="margin:auto;text-align:center;">
|
|
||||||
<h1>This file is from <span style="color:#AA0000;">${date}</span></h1>
|
|
||||||
<h2>Game will launch in <span id="launchCountdownNumber">5</span>...</h2>
|
|
||||||
<div style="border:2px solid black;width:100%;height:15px;padding:1px;margin-bottom:20vh;"><div id="launchCountdownProgress" style="background-color:#555555;width:0%;height:100%;"></div></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
<!-- lax1dude was here -->
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -572,13 +572,13 @@ public class NetServerHandler extends NetHandler
|
||||||
|
|
||||||
public void handleChat(Packet3Chat par1Packet3Chat)
|
public void handleChat(Packet3Chat par1Packet3Chat)
|
||||||
{
|
{
|
||||||
|
System.out.println("test");
|
||||||
if (this.playerEntity.getChatVisibility() == 2)
|
if (this.playerEntity.getChatVisibility() == 2)
|
||||||
{
|
{
|
||||||
this.sendPacketToPlayer(new Packet3Chat(StatCollector.translateToLocal(EnumChatFormatting.RED + "chat.cannotSend")));
|
this.sendPacketToPlayer(new Packet3Chat(StatCollector.translateToLocal(EnumChatFormatting.RED + "chat.cannotSend")));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//this.playerEntity.func_143004_u();
|
|
||||||
String var2 = par1Packet3Chat.message;
|
String var2 = par1Packet3Chat.message;
|
||||||
|
|
||||||
if (var2.length() > 100)
|
if (var2.length() > 100)
|
||||||
|
@ -613,12 +613,12 @@ public class NetServerHandler extends NetHandler
|
||||||
this.mcServer.getConfigurationManager().func_110459_a(var4, false);
|
this.mcServer.getConfigurationManager().func_110459_a(var4, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.chatSpamThresholdCount += 20;
|
// this.chatSpamThresholdCount += 20;
|
||||||
|
//
|
||||||
if (this.chatSpamThresholdCount > 200 && !this.mcServer.getConfigurationManager().isPlayerOpped(this.playerEntity.getCommandSenderName()))
|
// if (this.chatSpamThresholdCount > 200 && !this.mcServer.getConfigurationManager().isPlayerOpped(this.playerEntity.getCommandSenderName()))
|
||||||
{
|
// {
|
||||||
this.kickPlayerFromServer("disconnect.spam");
|
// this.kickPlayerFromServer("disconnect.spam");
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
DO NOT IGNORE THIS MESSAGE, USE YOUR BRAIN AND READ!
|
||||||
|
|
||||||
|
Bukkit is a piece of shit, if you "/op LAX1DUDE", a player joining as 'laX1DUDE' or 'LaX1dUdE' or 'lax1dude' will all have /op too
|
||||||
|
|
||||||
|
Either don't use /op and install an actual permissions plugin, or move "BitchFilerPlugin.jar" into this server's "/plugins" folder and use only lowercase letters in your /op profile names!
|
||||||
|
|
||||||
|
Again, if you install the bitchfilter plugin, you need to /op yourself with ALL LOWERCASE LETTERS like "/op lax1dude", and then when you want to join as an op you don't type 'LAX1DUDE' you have to join as 'lax1dude' or you will be kicked by the plugin for security
|
||||||
|
|
||||||
|
PLEASE PLEASE PLEASE DO NOT IGNORE THIS MESSAGE!!!
|
||||||
|
|
||||||
|
IF YOU IGNORE THIS AND USE /op WITH MIXED CASE THEN YOU WILL BE HACKED!!!
|
||||||
|
|
||||||
|
DO NOT MAKE THIS MISTAKE OR YOU CAN LOSE YOUR WHOLE SERVER IN MINUTES!!!
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Updated 4/16/25, 3:06 PM by Minecraft 1.6.4
|
||||||
|
# victim name | ban date | banned by | banned until | reason
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Updated 4/16/25, 3:06 PM by Minecraft 1.6.4
|
||||||
|
# victim name | ban date | banned by | banned until | reason
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
# This is the main configuration file for Bukkit.
|
||||||
|
# As you can see, there's actually not that much to configure without any plugins.
|
||||||
|
# For a reference for any variable inside this file, check out the bukkit wiki at
|
||||||
|
# http://wiki.bukkit.org/Bukkit.yml
|
||||||
|
settings:
|
||||||
|
allow-end: true
|
||||||
|
warn-on-overload: true
|
||||||
|
permissions-file: permissions.yml
|
||||||
|
update-folder: update
|
||||||
|
ping-packet-limit: 100
|
||||||
|
use-exact-login-location: false
|
||||||
|
plugin-profiling: false
|
||||||
|
connection-throttle: 4000
|
||||||
|
query-plugins: true
|
||||||
|
deprecated-verbose: default
|
||||||
|
shutdown-message: Server closed
|
||||||
|
spawn-limits:
|
||||||
|
monsters: 70
|
||||||
|
animals: 15
|
||||||
|
water-animals: 5
|
||||||
|
ambient: 15
|
||||||
|
chunk-gc:
|
||||||
|
period-in-ticks: 600
|
||||||
|
load-threshold: 0
|
||||||
|
ticks-per:
|
||||||
|
animal-spawns: 400
|
||||||
|
monster-spawns: 1
|
||||||
|
autosave: 0
|
||||||
|
auto-updater:
|
||||||
|
enabled: true
|
||||||
|
on-broken:
|
||||||
|
- warn-console
|
||||||
|
- warn-ops
|
||||||
|
on-update:
|
||||||
|
- warn-console
|
||||||
|
- warn-ops
|
||||||
|
preferred-channel: rb
|
||||||
|
host: dl.bukkit.org
|
||||||
|
suggest-channels: true
|
||||||
|
database:
|
||||||
|
username: bukkit
|
||||||
|
isolation: SERIALIZABLE
|
||||||
|
driver: org.sqlite.JDBC
|
||||||
|
password: walrus
|
||||||
|
url: jdbc:sqlite:{DIR}{NAME}.db
|
Binary file not shown.
|
@ -0,0 +1,56 @@
|
||||||
|
# This is the help configuration file for Bukkit.
|
||||||
|
#
|
||||||
|
# By default you do not need to modify this file. Help topics for all plugin commands are automatically provided by
|
||||||
|
# or extracted from your installed plugins. You only need to modify this file if you wish to add new help pages to
|
||||||
|
# your server or override the help pages of existing plugin commands.
|
||||||
|
#
|
||||||
|
# This file is divided up into the following parts:
|
||||||
|
# -- general-topics: lists admin defined help topics
|
||||||
|
# -- index-topics: lists admin defined index topics
|
||||||
|
# -- amend-topics: lists topic amendments to apply to existing help topics
|
||||||
|
# -- ignore-plugins: lists any plugins that should be excluded from help
|
||||||
|
#
|
||||||
|
# Examples are given below. When amending command topic, the string <text> will be replaced with the existing value
|
||||||
|
# in the help topic. Color codes can be used in topic text. The color code character is & followed by 0-F.
|
||||||
|
# ================================================================
|
||||||
|
#
|
||||||
|
# Set this to true to list the individual command help topics in the master help.
|
||||||
|
# command-topics-in-master-index: true
|
||||||
|
#
|
||||||
|
# Each general topic will show up as a separate topic in the help index along with all the plugin command topics.
|
||||||
|
# general-topics:
|
||||||
|
# Rules:
|
||||||
|
# shortText: Rules of the server
|
||||||
|
# fullText: |
|
||||||
|
# &61. Be kind to your fellow players.
|
||||||
|
# &B2. No griefing.
|
||||||
|
# &D3. No swearing.
|
||||||
|
# permission: topics.rules
|
||||||
|
#
|
||||||
|
# Each index topic will show up as a separate sub-index in the help index along with all the plugin command topics.
|
||||||
|
# To override the default help index (displayed when the user executes /help), name the index topic "Default".
|
||||||
|
# index-topics:
|
||||||
|
# Ban Commands:
|
||||||
|
# shortText: Player banning commands
|
||||||
|
# preamble: Moderator - do not abuse these commands
|
||||||
|
# permission: op
|
||||||
|
# commands:
|
||||||
|
# - /ban
|
||||||
|
# - /ban-ip
|
||||||
|
# - /banlist
|
||||||
|
#
|
||||||
|
# Topic amendments are used to change the content of automatically generated plugin command topics.
|
||||||
|
# amended-topics:
|
||||||
|
# /stop:
|
||||||
|
# shortText: Stops the server cold....in its tracks!
|
||||||
|
# fullText: <text> - This kills the server.
|
||||||
|
# permission: you.dont.have
|
||||||
|
#
|
||||||
|
# Any plugin in the ignored plugins list will be excluded from help. The name must match the name displayed by
|
||||||
|
# the /plugins command. Ignore "Bukkit" to remove the standard bukkit commands from the index. Ignore "All"
|
||||||
|
# to completely disable automatic help topic generation.
|
||||||
|
# ignore-plugins:
|
||||||
|
# - PluginNameOne
|
||||||
|
# - PluginNameTwo
|
||||||
|
# - PluginNameThree
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
DO NOT IGNORE THIS MESSAGE, USE YOUR BRAIN AND READ!
|
||||||
|
|
||||||
|
Bukkit is a piece of shit, if you "/op LAX1DUDE", a player joining as 'laX1DUDE' or 'LaX1dUdE' or 'lax1dude' will all have /op too
|
||||||
|
|
||||||
|
Either don't use /op and install an actual permissions plugin, or move "BitchFilerPlugin.jar" into this server's "/plugins" folder and use only lowercase letters in your /op profile names!
|
||||||
|
|
||||||
|
Again, if you install the bitchfilter plugin, you need to /op yourself with ALL LOWERCASE LETTERS like "/op lax1dude", and then when you want to join as an op you don't type 'LAX1DUDE' you have to join as 'lax1dude' or you will be kicked by the plugin for security
|
||||||
|
|
||||||
|
PLEASE PLEASE PLEASE DO NOT IGNORE THIS MESSAGE!!!
|
||||||
|
|
||||||
|
IF YOU IGNORE THIS AND USE /op WITH MIXED CASE THEN YOU WILL BE HACKED!!!
|
||||||
|
|
||||||
|
DO NOT MAKE THIS MISTAKE OR YOU CAN LOSE YOUR WHOLE SERVER IN MINUTES!!!
|
|
@ -0,0 +1,3 @@
|
||||||
|
@echo off
|
||||||
|
java -Xmx512M -Xms512M -jar craftbukkit-1.6.4-R2.0.jar
|
||||||
|
pause
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
java -Xmx512M -Xms512M -jar craftbukkit-1.6.4-R2.0.jar
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,31 @@
|
||||||
|
#Minecraft server properties
|
||||||
|
#Wed Apr 16 15:06:52 EDT 2025
|
||||||
|
view-distance=10
|
||||||
|
max-build-height=256
|
||||||
|
server-ip=127.0.0.1
|
||||||
|
level-seed=
|
||||||
|
server-port=25569
|
||||||
|
allow-nether=true
|
||||||
|
gamemode=0
|
||||||
|
enable-rcon=false
|
||||||
|
enable-query=false
|
||||||
|
generator-settings=
|
||||||
|
level-name=world
|
||||||
|
player-idle-timeout=0
|
||||||
|
motd=A Minecraft Server
|
||||||
|
force-gamemode=false
|
||||||
|
hardcore=false
|
||||||
|
white-list=false
|
||||||
|
texture-pack=
|
||||||
|
pvp=true
|
||||||
|
spawn-npcs=true
|
||||||
|
spawn-animals=true
|
||||||
|
generate-structures=true
|
||||||
|
snooper-enabled=true
|
||||||
|
difficulty=1
|
||||||
|
level-type=DEFAULT
|
||||||
|
spawn-monsters=true
|
||||||
|
max-players=20
|
||||||
|
spawn-protection=16
|
||||||
|
online-mode=false
|
||||||
|
allow-flight=false
|
|
@ -0,0 +1,5 @@
|
||||||
|
## EaglercraftBungee
|
||||||
|
|
||||||
|
This is regular BungeeCord except it accepts WebSockets instead of raw TCP connections
|
||||||
|
|
||||||
|
**To add an animated MOTD: [https://github.com/LAX1DUDE/eaglercraft-motd/](https://github.com/LAX1DUDE/eaglercraft-motd/)**
|
|
@ -0,0 +1,51 @@
|
||||||
|
|
||||||
|
#
|
||||||
|
# This file allows you to configure bans for eaglercraftbungee
|
||||||
|
# When it is saved, eaglercraft should reload it automatically
|
||||||
|
# (check the console though to be safe)
|
||||||
|
#
|
||||||
|
# For a [Usernames] ban, just add the player's name. Use a colon ':' to put in a ban reason
|
||||||
|
# For a [IPs] ban, just add the player's IP, or a subnet like 69.69.0.0/16 to ban all IPs beginning with 69.69.*
|
||||||
|
# For a [Wildcards] ban, type a string and prefix and/or suffix it with * to define the wildcard
|
||||||
|
# For a [Regex] ban, type a valid regular expression in the java.util.regex format
|
||||||
|
#
|
||||||
|
# All bans are case-insensitive, USERNAMES ARE CONVERTED TO LOWERCASE BEFORE BEING MATCHED VIA REGEX
|
||||||
|
# Java regex syntax: https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
|
||||||
|
#
|
||||||
|
|
||||||
|
# set this to false to use "/eag-ban" to ban on bungee instead of just "/ban"
|
||||||
|
# (most likely needs a restart to take effect)
|
||||||
|
replace-bukkit=false
|
||||||
|
|
||||||
|
|
||||||
|
[Usernames]
|
||||||
|
|
||||||
|
# ban_test1: The ban hammer has spoken!
|
||||||
|
# ban_test2: custom ban message here
|
||||||
|
# ban_test3
|
||||||
|
|
||||||
|
# (remove the '#' before each line to enable)
|
||||||
|
|
||||||
|
[IPs]
|
||||||
|
|
||||||
|
# WARNING: if you're using nginx, banning any player's IP is gonna ban ALL PLAYERS on your server
|
||||||
|
# For this reason, the ban IP command doesn't ban 127.0.0.1 or any other 'private' range IPs
|
||||||
|
|
||||||
|
# 101.202.69.11
|
||||||
|
# 123.21.43.0/24
|
||||||
|
# 2601:1062:69:418:BEEF::10
|
||||||
|
# 2601:6090:420::/48
|
||||||
|
|
||||||
|
[Wildcards]
|
||||||
|
|
||||||
|
# *fuck*
|
||||||
|
# shi*
|
||||||
|
|
||||||
|
|
||||||
|
[Regex]
|
||||||
|
|
||||||
|
# you.+are.(a|the).+bitch
|
||||||
|
|
||||||
|
|
||||||
|
# end of file
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,7 @@
|
||||||
|
[NetClientHandler] - processReadPackets called
|
||||||
|
[EaglerAdapterImpl2] - Cannot read packet!
|
||||||
|
[WebsocketNetworkManager] - readChunks is empty!
|
||||||
|
[NetClientHandler] - processReadPackets called
|
||||||
|
[EaglerAdapterImpl2] - Cannot read packet!
|
||||||
|
[WebsocketNetworkManager] - readChunks is empty!
|
||||||
|
[EaglerAdapterImpl2] - Writing packet
|
|
@ -0,0 +1,131 @@
|
||||||
|
origin_blacklist_use_simple_whitelist: false
|
||||||
|
server_name: EaglercraftBungee Server
|
||||||
|
token_verify: ''
|
||||||
|
groups: {}
|
||||||
|
servers:
|
||||||
|
lobby:
|
||||||
|
address: localhost:25569
|
||||||
|
restricted: false
|
||||||
|
voice_turn_servers:
|
||||||
|
openrelay3:
|
||||||
|
password: openrelayproject
|
||||||
|
url: turn:openrelay.metered.ca:443?transport=tcp
|
||||||
|
username: openrelayproject
|
||||||
|
openrelay2:
|
||||||
|
password: openrelayproject
|
||||||
|
url: turn:openrelay.metered.ca:443
|
||||||
|
username: openrelayproject
|
||||||
|
openrelay1:
|
||||||
|
password: openrelayproject
|
||||||
|
url: turn:openrelay.metered.ca:80
|
||||||
|
username: openrelayproject
|
||||||
|
voice_stun_servers:
|
||||||
|
- stun:stun.l.google.com:19302
|
||||||
|
- stun:stun1.l.google.com:19302
|
||||||
|
- stun:stun2.l.google.com:19302
|
||||||
|
- stun:stun3.l.google.com:19302
|
||||||
|
- stun:stun4.l.google.com:19302
|
||||||
|
- stun:openrelay.metered.ca:80
|
||||||
|
enable_web_origin_blacklist: true
|
||||||
|
origin_blacklist_simple_whitelist:
|
||||||
|
- type the name of your client's domain here
|
||||||
|
- (if 'origin_blacklist_use_simple_whitelist' is true)
|
||||||
|
- g.lax1dude.net
|
||||||
|
protocol_support_fix: false
|
||||||
|
origin_blacklist_subscriptions:
|
||||||
|
- https://g.lax1dude.net/eaglercraft/origin_blacklist.txt
|
||||||
|
player_limit: -1
|
||||||
|
origin_blacklist_block_invalid_origin_header: true
|
||||||
|
voice_enabled: true
|
||||||
|
display_ban_type_on_kick: false
|
||||||
|
origin_blacklist_block_offline_download: false
|
||||||
|
accept_bukkit_console_command_packets: false
|
||||||
|
authservice:
|
||||||
|
authfile: auths.db
|
||||||
|
register_enabled: true
|
||||||
|
ip_limit: 0
|
||||||
|
join_messages:
|
||||||
|
- '&3Welcome to my &aEaglercraftBungee &3server!'
|
||||||
|
login_timeout: 30
|
||||||
|
enabled: false
|
||||||
|
disabled_commands: []
|
||||||
|
bungee_on_bungee: false
|
||||||
|
origin_blacklist_block_replit_clients: false
|
||||||
|
stats: 1795b100-6c57-4568-957f-810efbd77cc3
|
||||||
|
listeners:
|
||||||
|
- fallback_server: lobby
|
||||||
|
tab_list: GLOBAL_PING
|
||||||
|
websocket: true
|
||||||
|
texture_size: 16
|
||||||
|
host: 0.0.0.0:25565
|
||||||
|
forced_hosts: {}
|
||||||
|
max_players: 60
|
||||||
|
tab_size: 60
|
||||||
|
default_server: lobby
|
||||||
|
force_default_server: true
|
||||||
|
forward_ip: false
|
||||||
|
server_icon: server-icon.png
|
||||||
|
motd1: '&6An Eaglercraft server'
|
||||||
|
allow_motd: true
|
||||||
|
allow_query: true
|
||||||
|
request_motd_cache:
|
||||||
|
cache_ttl: 7200
|
||||||
|
online_server_list_animation: false
|
||||||
|
online_server_list_results: true
|
||||||
|
online_server_list_trending: true
|
||||||
|
online_server_list_portfolios: false
|
||||||
|
ratelimit:
|
||||||
|
ip:
|
||||||
|
enable: true
|
||||||
|
period: 90
|
||||||
|
limit: 60
|
||||||
|
limit_lockout: 80
|
||||||
|
lockout_duration: 1200
|
||||||
|
exceptions: []
|
||||||
|
login:
|
||||||
|
enable: true
|
||||||
|
period: 50
|
||||||
|
limit: 5
|
||||||
|
limit_lockout: 10
|
||||||
|
lockout_duration: 300
|
||||||
|
exceptions: []
|
||||||
|
motd:
|
||||||
|
enable: true
|
||||||
|
period: 30
|
||||||
|
limit: 5
|
||||||
|
limit_lockout: 15
|
||||||
|
lockout_duration: 300
|
||||||
|
exceptions: []
|
||||||
|
query:
|
||||||
|
enable: true
|
||||||
|
period: 30
|
||||||
|
limit: 15
|
||||||
|
limit_lockout: 25
|
||||||
|
lockout_duration: 900
|
||||||
|
exceptions: []
|
||||||
|
forward_ip_header: X-Real-IP
|
||||||
|
java_host: 'null'
|
||||||
|
permissions:
|
||||||
|
default:
|
||||||
|
- bungeecord.command.server
|
||||||
|
- bungeecord.command.list
|
||||||
|
- bungeecord.command.eag.domain
|
||||||
|
- bungeecord.command.eag.changepassword
|
||||||
|
admin:
|
||||||
|
- bungeecord.command.alert
|
||||||
|
- bungeecord.command.end
|
||||||
|
- bungeecord.command.ip
|
||||||
|
- bungeecord.command.reload
|
||||||
|
- bungeecord.command.eag.ban
|
||||||
|
- bungeecord.command.eag.banwildcard
|
||||||
|
- bungeecord.command.eag.banip
|
||||||
|
- bungeecord.command.eag.banregex
|
||||||
|
- bungeecord.command.eag.reloadban
|
||||||
|
- bungeecord.command.eag.banned
|
||||||
|
- bungeecord.command.eag.banlist
|
||||||
|
- bungeecord.command.eag.unban
|
||||||
|
- bungeecord.command.eag.ratelimit
|
||||||
|
- bungeecord.command.eag.blockdomain
|
||||||
|
- bungeecord.command.eag.blockdomainname
|
||||||
|
- bungeecord.command.eag.unblockdomain
|
||||||
|
timeout: 30000
|
|
@ -0,0 +1,3 @@
|
||||||
|
#whitelistMode: false
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,3 @@
|
||||||
|
@echo off
|
||||||
|
java -Xmx32M -Xms32M -jar bungee-dist.jar
|
||||||
|
pause
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
java -Xmx32M -Xms32M -jar bungee-dist.jar
|
Binary file not shown.
After Width: | Height: | Size: 8.6 KiB |
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,26 @@
|
||||||
|
window.initializeVoiceClient=()=>{class k{constructor(a,b,c,e){this.client=a;this.peerId=b;this.peerConnection=c;this.stream=null;this.peerConnection.addEventListener("icecandidate",f=>{f.candidate&&this.client.iceCandidateHandler(this.peerId,JSON.stringify({sdpMLineIndex:f.candidate.sdpMLineIndex,candidate:f.candidate.candidate}))});this.peerConnection.addEventListener("track",f=>{this.rawStream=f.streams[0];const g=new Audio;g.autoplay=!0;g.muted=!0;g.onended=function(){g.remove()};g.srcObject=
|
||||||
|
this.rawStream;this.client.peerTrackHandler(this.peerId,this.rawStream)});this.peerConnection.addStream(this.client.localMediaStream.stream);e&&this.peerConnection.createOffer(f=>{this.peerConnection.setLocalDescription(f,()=>{this.client.descriptionHandler(this.peerId,JSON.stringify(f))},g=>{console.error('Failed to set local description for "'+this.peerId+'"! '+g);this.client.signalDisconnect(this.peerId)})},f=>{console.error('Failed to set create offer for "'+this.peerId+'"! '+f);this.client.signalDisconnect(this.peerId)});
|
||||||
|
this.peerConnection.addEventListener("connectionstatechange",f=>{"disconnected"!==this.peerConnection.connectionState&&"failed"!==this.peerConnection.connectionState||this.client.signalDisconnect(this.peerId)})}disconnect(){this.peerConnection.close()}mute(a){this.rawStream.getAudioTracks()[0].enabled=!a}setRemoteDescription(a){try{const b=JSON.parse(a);this.peerConnection.setRemoteDescription(b,()=>{"offer"===b.type&&this.peerConnection.createAnswer(c=>{this.peerConnection.setLocalDescription(c,
|
||||||
|
()=>{this.client.descriptionHandler(this.peerId,JSON.stringify(c))},e=>{console.error('Failed to set local description for "'+this.peerId+'"! '+e);this.client.signalDisconnect(this.peerId)})},c=>{console.error('Failed to create answer for "'+this.peerId+'"! '+c);this.client.signalDisconnect(this.peerId)})},c=>{console.error('Failed to set remote description for "'+this.peerId+'"! '+c);this.client.signalDisconnect(this.peerId)})}catch(b){console.error('Failed to parse remote description for "'+this.peerId+
|
||||||
|
'"! '+b),this.client.signalDisconnect(this.peerId)}}addICECandidate(a){try{this.peerConnection.addIceCandidate(new RTCIceCandidate(JSON.parse(a)))}catch(b){console.error('Failed to parse ice candidate for "'+this.peerId+'"! '+b),this.client.signalDisconnect(this.peerId)}}}class d{constructor(){this.ICEServers=[];this.hasInit=!1;this.peerList=new Map;this.readyState=0;this.microphoneVolumeAudioContext=this.peerDisconnectHandler=this.peerTrackHandler=this.descriptionHandler=this.iceCandidateHandler=
|
||||||
|
null}voiceClientSupported(){return"undefined"!==typeof window.RTCPeerConnection&&"undefined"!==typeof navigator.mediaDevices&&"undefined"!==typeof navigator.mediaDevices.getUserMedia}setICEServers(a){for(var b=this.ICEServers.length=0;b<a.length;++b){var c=a[b].split(";");1===c.length?this.ICEServers.push({urls:c[0]}):3===c.length&&this.ICEServers.push({urls:c[0],username:c[1],credential:c[2]})}}setICECandidateHandler(a){this.iceCandidateHandler=a}setDescriptionHandler(a){this.descriptionHandler=
|
||||||
|
a}setPeerTrackHandler(a){this.peerTrackHandler=a}setPeerDisconnectHandler(a){this.peerDisconnectHandler=a}activateVoice(a){this.hasInit&&(this.localRawMediaStream.getAudioTracks()[0].enabled=a)}initializeDevices(){this.hasInit?this.readyState=1:navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(a=>{this.microphoneVolumeAudioContext=new AudioContext;this.localRawMediaStream=a;this.localRawMediaStream.getAudioTracks()[0].enabled=!1;this.localMediaStream=this.microphoneVolumeAudioContext.createMediaStreamDestination();
|
||||||
|
this.localMediaStreamGain=this.microphoneVolumeAudioContext.createGain();this.microphoneVolumeAudioContext.createMediaStreamSource(a).connect(this.localMediaStreamGain);this.localMediaStreamGain.connect(this.localMediaStream);this.readyState=this.localMediaStreamGain.gain.value=1;this.hasInit=!0}).catch(a=>{this.readyState=-1})}setMicVolume(a){this.hasInit&&(.5<a&&(a=.5+2*(a-.5)),1.5<a&&(a=1.5),0>a&&(a=0),this.localMediaStreamGain.gain.value=2*a)}getReadyState(){return this.readyState}signalConnect(a,
|
||||||
|
b){try{const c=new RTCPeerConnection({iceServers:this.ICEServers,optional:[{DtlsSrtpKeyAgreement:!0}]}),e=new k(this,a,c,b);this.peerList.set(a,e)}catch(c){}}signalDescription(a,b){a=this.peerList.get(a);"undefined"!==typeof a&&null!==a&&a.setRemoteDescription(b)}signalDisconnect(a,b){var c=this.peerList.get(a);if("undefined"!==typeof c&&null!==c){this.peerList.delete(c);try{c.disconnect()}catch(e){}this.peerDisconnectHandler(a,b)}}mutePeer(a,b){a=this.peerList.get(a);"undefined"!==typeof a&&null!==
|
||||||
|
a&&a.mute(b)}signalICECandidate(a,b){a=this.peerList.get(a);"undefined"!==typeof a&&null!==a&&a.addICECandidate(b)}}window.constructVoiceClient=()=>new d};window.startVoiceClient=()=>{"function"!==typeof window.constructVoiceClient&&window.initializeVoiceClient();return window.constructVoiceClient()};
|
||||||
|
window.initializeLANClient=()=>{class k{constructor(){this.ICEServers=[];this.dataChannel=this.peerConnection=null;this.readyState=1;this.remotePacketHandler=this.remoteDisconnectHandler=this.remoteDataChannelHandler=this.descriptionHandler=this.iceCandidateHandler=null}LANClientSupported(){return"undefined"!==typeof window.RTCPeerConnection}initializeClient(){try{null!==this.dataChannel&&(this.dataChannel.close(),this.dataChannel=null),null!==this.peerConnection&&this.peerConnection.close(),this.peerConnection=
|
||||||
|
new RTCPeerConnection({iceServers:this.ICEServers,optional:[{DtlsSrtpKeyAgreement:!0}]}),this.readyState=1}catch(d){this.readyState=-2}}setICEServers(d){for(var a=this.ICEServers.length=0;a<d.length;++a){var b=d[a].split(";");1===b.length?this.ICEServers.push({urls:b[0]}):3===b.length&&this.ICEServers.push({urls:b[0],username:b[1],credential:b[2]})}}setICECandidateHandler(d){this.iceCandidateHandler=d}setDescriptionHandler(d){this.descriptionHandler=d}setRemoteDataChannelHandler(d){this.remoteDataChannelHandler=
|
||||||
|
d}setRemoteDisconnectHandler(d){this.remoteDisconnectHandler=d}setRemotePacketHandler(d){this.remotePacketHandler=d}getReadyState(){return this.readyState}sendPacketToServer(d){null!==this.dataChannel&&"open"===this.dataChannel.readyState?this.dataChannel.send(d):this.signalRemoteDisconnect(!1)}signalRemoteConnect(){const d=[];this.peerConnection.addEventListener("icecandidate",a=>{if(a.candidate){if(0===d.length){let b=[0,0],c;setTimeout(c=()=>{if(null!==this.peerConnection&&"disconnected"!==this.peerConnection.connectionState){const e=
|
||||||
|
++b[1];b[0]!==d.length&&3>e?(b[0]=d.length,setTimeout(c,2E3)):(this.iceCandidateHandler(JSON.stringify(d)),d.length=0)}},2E3)}d.push({sdpMLineIndex:a.candidate.sdpMLineIndex,candidate:a.candidate.candidate})}});this.dataChannel=this.peerConnection.createDataChannel("lan");this.dataChannel.binaryType="arraybuffer";this.dataChannel.addEventListener("open",async a=>{for(;0<d.length;)await new Promise(b=>setTimeout(b,10));this.remoteDataChannelHandler(this.dataChannel)});this.dataChannel.addEventListener("message",
|
||||||
|
a=>{this.remotePacketHandler(a.data)},!1);this.peerConnection.createOffer(a=>{this.peerConnection.setLocalDescription(a,()=>{this.descriptionHandler(JSON.stringify(a))},b=>{console.error("Failed to set local description! "+b);this.readyState=-1;this.signalRemoteDisconnect(!1)})},a=>{console.error("Failed to set create offer! "+a);this.readyState=-1;this.signalRemoteDisconnect(!1)});this.peerConnection.addEventListener("connectionstatechange",a=>{"disconnected"===this.peerConnection.connectionState?
|
||||||
|
this.signalRemoteDisconnect(!1):"connected"===this.peerConnection.connectionState?this.readyState=2:"failed"===this.peerConnection.connectionState&&(this.readyState=-1,this.signalRemoteDisconnect(!1))})}signalRemoteDescription(d){try{this.peerConnection.setRemoteDescription(JSON.parse(d))}catch(a){console.error(a),this.readyState=-1,this.signalRemoteDisconnect(!1)}}signalRemoteICECandidate(d){try{const a=JSON.parse(d);for(let b of a)this.peerConnection.addIceCandidate(b)}catch(a){console.error(a),
|
||||||
|
this.readyState=-1,this.signalRemoteDisconnect(!1)}}signalRemoteDisconnect(d){null!==this.dataChannel&&(this.dataChannel.close(),this.dataChannel=null);null!==this.peerConnection&&this.peerConnection.close();d||this.remoteDisconnectHandler();this.readyState=0}}window.constructLANClient=()=>new k};window.startLANClient=()=>{"function"!==typeof window.constructLANClient&&window.initializeLANClient();return window.constructLANClient()};
|
||||||
|
window.initializeLANServer=()=>{class k{constructor(a,b,c){this.client=a;this.peerId=b;this.peerConnection=c;this.dataChannel=null;const e=[];let f=!1;this.peerConnection.addEventListener("icecandidate",g=>{if(g.candidate){if(0===e.length){let h=[0,0],l;setTimeout(l=()=>{if(null!==this.peerConnection&&"disconnected"!==this.peerConnection.connectionState){const m=++h[1];h[0]!==e.length&&3>m?(h[0]=e.length,setTimeout(l,2E3)):(this.client.iceCandidateHandler(this.peerId,JSON.stringify(e)),e.length=0,
|
||||||
|
f=!0)}},2E3)}e.push({sdpMLineIndex:g.candidate.sdpMLineIndex,candidate:g.candidate.candidate})}});this.peerConnection.addEventListener("datachannel",async g=>{for(;!f;)await new Promise(h=>setTimeout(h,10));this.dataChannel=g.channel;this.client.remoteClientDataChannelHandler(this.peerId,this.dataChannel);this.dataChannel.addEventListener("message",h=>{this.client.remoteClientPacketHandler(this.peerId,h.data)},!1)},!1);this.peerConnection.addEventListener("connectionstatechange",g=>{"disconnected"!==
|
||||||
|
this.peerConnection.connectionState&&"failed"!==this.peerConnection.connectionState||this.client.signalRemoteDisconnect(this.peerId)})}disconnect(){null!==this.dataChannel&&(this.dataChannel.close(),this.dataChannel=null);this.peerConnection.close()}setRemoteDescription(a){try{const b=JSON.parse(a);this.peerConnection.setRemoteDescription(b,()=>{"offer"===b.type&&this.peerConnection.createAnswer(c=>{this.peerConnection.setLocalDescription(c,()=>{this.client.descriptionHandler(this.peerId,JSON.stringify(c))},
|
||||||
|
e=>{console.error('Failed to set local description for "'+this.peerId+'"! '+e);this.client.signalRemoteDisconnect(this.peerId)})},c=>{console.error('Failed to create answer for "'+this.peerId+'"! '+c);this.client.signalRemoteDisconnect(this.peerId)})},c=>{console.error('Failed to set remote description for "'+this.peerId+'"! '+c);this.client.signalRemoteDisconnect(this.peerId)})}catch(b){console.error('Failed to parse remote description for "'+this.peerId+'"! '+b),this.client.signalRemoteDisconnect(this.peerId)}}addICECandidate(a){try{const b=
|
||||||
|
JSON.parse(a);for(let c of b)this.peerConnection.addIceCandidate(new RTCIceCandidate(c))}catch(b){console.error('Failed to parse ice candidate for "'+this.peerId+'"! '+b),this.client.signalRemoteDisconnect(this.peerId)}}}class d{constructor(){this.ICEServers=[];this.hasInit=!1;this.peerList=new Map;this.remoteClientPacketHandler=this.remoteClientDisconnectHandler=this.remoteClientDataChannelHandler=this.descriptionHandler=this.iceCandidateHandler=null}LANServerSupported(){return"undefined"!==typeof window.RTCPeerConnection}initializeServer(){}setICEServers(a){for(var b=
|
||||||
|
this.ICEServers.length=0;b<a.length;++b){var c=a[b].split(";");1===c.length?this.ICEServers.push({urls:c[0]}):3===c.length&&this.ICEServers.push({urls:c[0],username:c[1],credential:c[2]})}}setICECandidateHandler(a){this.iceCandidateHandler=a}setDescriptionHandler(a){this.descriptionHandler=a}setRemoteClientDataChannelHandler(a){this.remoteClientDataChannelHandler=a}setRemoteClientDisconnectHandler(a){this.remoteClientDisconnectHandler=a}setRemoteClientPacketHandler(a){this.remoteClientPacketHandler=
|
||||||
|
a}sendPacketToRemoteClient(a,b){var c=this.peerList.get(a);"undefined"!==typeof c&&null!==c&&(null!=c.dataChannel&&"open"===c.dataChannel.readyState?c.dataChannel.send(b):this.signalRemoteDisconnect(a))}signalRemoteConnect(a){try{const b=new RTCPeerConnection({iceServers:this.ICEServers,optional:[{DtlsSrtpKeyAgreement:!0}]}),c=new k(this,a,b);this.peerList.set(a,c)}catch(b){}}signalRemoteDescription(a,b){a=this.peerList.get(a);"undefined"!==typeof a&&null!==a&&a.setRemoteDescription(b)}signalRemoteICECandidate(a,
|
||||||
|
b){a=this.peerList.get(a);"undefined"!==typeof a&&null!==a&&a.addICECandidate(b)}signalRemoteDisconnect(a){if(0===a.length){for(var b of this.peerList.values())if("undefined"!==typeof b&&null!==b){this.peerList.delete(a);try{b.disconnect()}catch(c){}this.remoteClientDisconnectHandler(a)}this.peerList.clear()}else if(b=this.peerList.get(a),"undefined"!==typeof b&&null!==b){this.peerList.delete(a);try{b.disconnect()}catch(c){}this.remoteClientDisconnectHandler(a)}}countPeers(){return this.peerList.size}}
|
||||||
|
window.constructLANServer=()=>new d};window.startLANServer=()=>{"function"!==typeof window.constructLANServer&&window.initializeLANServer();return window.constructLANServer()};
|
|
@ -0,0 +1,5 @@
|
||||||
|
onmessage = function(o) {
|
||||||
|
importScripts("classes_server.js");
|
||||||
|
eaglercraftServerOpts = o.data;
|
||||||
|
main();
|
||||||
|
};
|
|
@ -0,0 +1,170 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
To correctly download this file on github, right click on this page of code and press 'Save As...'
|
||||||
|
|
||||||
|
To correctly download this file on google drive, press the download button at the top right of the screen near the picture of your google account photo
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
Eaglercraft 1.6.4 is still under development
|
||||||
|
|
||||||
|
This version of eaglercraft you are using right now is from ${date}
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<title>My Drive - Google Drive</title>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.addEventListener("load", function() {
|
||||||
|
countdown();
|
||||||
|
setTimeout(function(){
|
||||||
|
document.getElementById("locally").remove();
|
||||||
|
const relayId = Math.floor(Math.random() * 3);
|
||||||
|
window.eaglercraftOpts = {
|
||||||
|
container: "game_frame", assetsURI: getAssetsURI(),
|
||||||
|
serverWorkerURI: createWorkerURI("sp_worker"),
|
||||||
|
worldsFolder: "TEST", mainMenu: { splashes: [
|
||||||
|
"Darviglet!", "eaglerenophile!", "You Eagler!", "Yeeeeeee!", "yeee",
|
||||||
|
"EEEEEEEEE!", "You Darvig!", "You Vigg!", ":>", "|>", "You Yumpster!"
|
||||||
|
]}, worldsFolder: "OFFLINE", relays: [
|
||||||
|
{ addr: "wss://relay.deev.is/", name: "lax1dude relay #1", primary: relayId == 0 },
|
||||||
|
{ addr: "wss://relay.lax1dude.net/", name: "lax1dude relay #2", primary: relayId == 1 },
|
||||||
|
{ addr: "wss://relay.shhnowisnottheti.me/", name: "ayunami relay #1", primary: relayId == 2 } ]
|
||||||
|
};
|
||||||
|
main();
|
||||||
|
}, 6000);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function getAssetsURI() {
|
||||||
|
return "data:application/octet-stream;base64,${assets_epk_base64}";
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function createWorkerURI(el) {
|
||||||
|
var eee = document.getElementById(el);
|
||||||
|
var str = eee.innerHTML;
|
||||||
|
eee.remove();
|
||||||
|
str = "onmessage = function(o) { eaglercraftServerOpts = o.data; main(); };\n" + str;
|
||||||
|
return URL.createObjectURL(new Blob([str], {type:"text/javascript"}));
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<link type="image/png" rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAGAUlEQVRYw7VXa0xTZxj+oKjJNjWZ10EtZqIQjBdsT2utlZYiMsfiZltUtpiYOZ0zceOmcZfsGLmoQ25hS1jmNJpBL1xEuWwZGduPjW0xcVniLn/YfmlrK6wDRulpz7v3O+1BCgUs4pc8+U5Ov6/P877v837nHEKiGzHEZpYQVhcXEfQ3uuaJjOCfP9pSG5E8GXIzmS+r0Rtk1bqcxCrti+NB76XVaA3EzM6fUxHmELmm7bXkjVde6pPV6WD1x/owyBDrEaTOAD9fTeqDLpJM98CciIBgTRVW0211Rx4k1WWOSiu0flnlDgGrEBsQpELnZz9hRuErAqNNMb8IW+Ex/SCvPzJPILebjm69eQAYm8m7+doeWHVRC0guIBGxDkEupsPfDSsBmokXumLB10TeFETUk3mPFbmq89VFCovJxdhNIG80BhirCVLqd4G0Yjtg9LC5UgvkIx1c/XQTJQevXRLgWwj47MSFJVg860yMRW81VW1tPwCKRqNPYTECxZaGV2B1VTqswUw8jZFrq7ZDv/UZ8Ddh+u0xCOKDL1FEM6maVRZE46ls5lSFNUiK4IW50Qg0C6mXdsPmCg2QCj10f54iRD9il1Bymn6ezhwVZCOpURtSFIDkHaob+yk5J0YvQoMg1YbA0RpVwGsnAvEEcNAhiOiISoCuB080HEqLKUfVti8iOcU2qylArr0MfzTIaPQoQjJJBGZCEOG3kxxBRA+Jm/moDQ2M/jdlSy4l808kZ1DUdswMseW2IHkLdCI5kkXIgh/aaFuS3x96expDisaTW4wFE403DtQLvBa7gjS/nogCEgMt4bWfAMGQWIqC6Q3JsrF0SrOZl2HbebDnHxpvPFAUFYciq8WtSFxNSShZBAG8v1kQ50EfLBNEsCQ2QvTyYNtZjPVC9JaI0QfoeYDlcctt5sVjaf2aLEYCd6j/AxGz0IVeaCb1dP2tiVkQXS+37NvC2M1ItJePZDwqiopjbMZjwsYeNk40Fgo4RkmmyIKQCWgl1LBbJnUFC8H0Y2TfTON8v7IVTYnPhImGFY2FIm7DjaD5JgmgHdEuZKgndDrGhrUdYzXmBnt+LzdF9ChgH2AJDMI+VjfWUlhT4ZprJQa4OYUA8WzoFMTkhrVlUm3tAoUlr49pysPzfn9A0YhCwoGpP4gi8q7T9S/Udi4w20CiY3viKAhed+I9+pvXvu46dD0HPhuWwhYLExCAVpztsX1Qm7RgrASMfdMhdZcWa7vNh4BwqHllkwYUNqUnpZssmfEZ9hNZgrX2+NsWga+V8AgIQwsashsNeZ0cGtuUVP49m1x9B9aW9/qSynshqfyHEHrpPf758z+C4vyduzvLfA0ZZcOthnJvU0bZf83jocd7e8oGW8k5+OJbtuHuaAGBB/lKfiA/FQby10NwToV/8tf74PRG8BSlsmMClr41ol9ZNAorTvT7V7zdDyJWIpaf6AfZOwO8vsQPu6oAsi5OjWyEAdfknBmCv3Yc5N1pa8HBaMCpUD0Eo/IPKdXgStDoxR4U2iGh2HFD+t4wxBfd4xKK7tEZpIhlhXdBxfZDZvkQry8d4jJKh6fF7pJ/uacucPxnhb3g2UHAma2D+1kKBAOuLIbz7t4Krl3MTeG9kdD2DwmIP+lKji908vGFDkDwCTgvL7gH6065wFA6BBlRIAuxoWwEfs1lYYCKyNSCy8Dw9w0MULiz5CnBd13xTfvILeFkii92VkjfH0UBTh8VsKLAAZozHjCUDUclILtkENaUj8KZ03/Cg3QJ3M/UUGIfl62mQiqE01AuH3caAggHydKTroXxRU6ntNgNSwscgQ3vuiETyfVRZoACSwGScxx8d+gSeDQk4M7SU3KnS6NZGPmpGMqCtNh1OOEDPyQUOUbSzw5yBqG2Q1FjZ8kgx5SNcG986OAcmeoRyE4D107t4cnRhzVxMBPPFjra1RfQ1ZUhh1fODntwL6kB6D51C4bUpH3G9wFRAF7E6EqHj2Ptr2A0l9HdswKa97IW/2P/Wc9xkRhm/HYcEzH3Ax79wxUzwELcXIFFwBP7an7M8T8H1bLLDGWzFAAAAABJRU5ErkJggg==" />
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
${classes_js}
|
||||||
|
${eagswebrtc_js}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/eaglerworker" id="sp_worker">
|
||||||
|
${classes_server_js}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function countdown() {
|
||||||
|
const c = document.getElementById("countdown");
|
||||||
|
setTimeout(function(){ c.innerText = "(Game will launch in 4)"; }, 1000);
|
||||||
|
setTimeout(function(){ c.innerText = "(Game will launch in 3)"; }, 2000);
|
||||||
|
setTimeout(function(){ c.innerText = "(Game will launch in 2)"; }, 3000);
|
||||||
|
setTimeout(function(){ c.innerText = "(Game will launch in 1)"; }, 4000);
|
||||||
|
setTimeout(function(){ c.innerText = "(Game will launch in 0)"; }, 5000);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body style="margin:0px;width:100vw;height:100vh;font-family:sans-serif;" id="game_frame">
|
||||||
|
<div id="locally" style="text-align:center;">
|
||||||
|
<div style="height:5vh;"></div>
|
||||||
|
<h2>Eaglercraft 1.6.4</h2>
|
||||||
|
<h3>the version you are currently using is from <span style="color:#cc0000;font-size:larger;">${date}</span></h3>
|
||||||
|
<p id="countdown" style="text-align:center;">(Game will launch in 5)</p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,19 @@
|
||||||
|
@echo off
|
||||||
|
setlocal enabledelayedexpansion
|
||||||
|
title ZipStableDownload
|
||||||
|
cd ..
|
||||||
|
echo enter the path to your java 11 installation (or leave blank to assume it is the default):
|
||||||
|
SET /P "JAVA11PATH="
|
||||||
|
if "!JAVA11PATH!" neq "" (
|
||||||
|
set "JAVA11PATH=!JAVA11PATH:\=/!"
|
||||||
|
if "!JAVA11PATH:~-1!" neq "/" (
|
||||||
|
set "JAVA11PATH=!JAVA11PATH!/"
|
||||||
|
)
|
||||||
|
if "!JAVA11PATH:~-5!" neq "/bin/" (
|
||||||
|
set "JAVA11PATH=!JAVA11PATH!bin/"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
echo Using java at: "!JAVA11PATH!java"
|
||||||
|
"!JAVA11PATH!java" -cp zip-generator/deps/*;zip-generator/zipGenerator.jar net.lax1dude.eaglercraft.zip_generator.ZipGenerator
|
||||||
|
endlocal
|
||||||
|
pause
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,61 @@
|
||||||
|
package net.lax1dude.eaglercraft.zip_generator;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.lang.ProcessBuilder.Redirect;
|
||||||
|
|
||||||
|
// taken from 1.8 buildtools
|
||||||
|
public class JARSubprocess {
|
||||||
|
|
||||||
|
public static final char classPathSeperator;
|
||||||
|
|
||||||
|
static {
|
||||||
|
classPathSeperator = System.getProperty("os.name").toLowerCase().contains("windows") ? ';' : ':';
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int runJava(File directory, String[] javaExeArguments, String logPrefix) throws IOException {
|
||||||
|
if(logPrefix.length() > 0 && !logPrefix.endsWith(" ")) {
|
||||||
|
logPrefix = logPrefix + " ";
|
||||||
|
}
|
||||||
|
String javaHome = System.getProperty("java.home");
|
||||||
|
if(classPathSeperator == ';') {
|
||||||
|
File javaExe = new File(javaHome, "bin/java.exe");
|
||||||
|
if(!javaExe.isFile()) {
|
||||||
|
javaExe = new File(javaHome, "java.exe");
|
||||||
|
if(!javaExe.isFile()) {
|
||||||
|
throw new IOException("Could not find /bin/java.exe equivelant on java.home! (java.home=" + javaHome + ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
javaHome = javaExe.getAbsolutePath();
|
||||||
|
}else {
|
||||||
|
File javaExe = new File(javaHome, "bin/java");
|
||||||
|
if(!javaExe.isFile()) {
|
||||||
|
javaExe = new File(javaHome, "java");
|
||||||
|
if(!javaExe.isFile()) {
|
||||||
|
throw new IOException("Could not find /bin/java equivelant on java.home! (java.home=" + javaHome + ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
javaHome = javaExe.getAbsolutePath();
|
||||||
|
}
|
||||||
|
|
||||||
|
String[] fullArgs = new String[javaExeArguments.length + 1];
|
||||||
|
fullArgs[0] = javaHome;
|
||||||
|
System.arraycopy(javaExeArguments, 0, fullArgs, 1, javaExeArguments.length);
|
||||||
|
|
||||||
|
ProcessBuilder exec = new ProcessBuilder(fullArgs);
|
||||||
|
exec.directory(directory);
|
||||||
|
|
||||||
|
exec.redirectOutput(Redirect.INHERIT);
|
||||||
|
exec.redirectError(Redirect.INHERIT);
|
||||||
|
|
||||||
|
Process ps = exec.start();
|
||||||
|
|
||||||
|
while(true) {
|
||||||
|
try {
|
||||||
|
return ps.waitFor();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,185 @@
|
||||||
|
package net.lax1dude.eaglercraft.zip_generator;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.zip.ZipEntry;
|
||||||
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
|
import org.apache.commons.codec.binary.Base64;
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
|
|
||||||
|
public class ZipGenerator {
|
||||||
|
|
||||||
|
public static void main(String[] args) throws IOException {
|
||||||
|
|
||||||
|
System.out.println();
|
||||||
|
System.out.println("Notes:");
|
||||||
|
System.out.println();
|
||||||
|
System.out.println(" - please run \"gradlew teavmc\" on the client and integrated server");
|
||||||
|
System.out.println(" - please run \"epkcompiler/run.bat\" (or run.sh) to generate \"javascript/assets.epk\"");
|
||||||
|
System.out.println(" - compile eaglercraftbungee and put it in it's \"stable-download/java/bungee_command\" folder");
|
||||||
|
System.out.println();
|
||||||
|
|
||||||
|
try {
|
||||||
|
if(!(boolean) Class.forName("net.lax1dude.eaglercraft.v1_8.buildtools.Java11Check").getMethod("classLoadCheck").invoke(null)) {
|
||||||
|
throw new RuntimeException("wtf?");
|
||||||
|
}
|
||||||
|
}catch(Throwable t) {
|
||||||
|
System.err.println("ERROR: A minimum of Java 11 is required to run this tool!");
|
||||||
|
System.err.println();
|
||||||
|
System.err.println("You are using Java " + System.getProperty("java.version"));
|
||||||
|
System.err.println();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String date = (new SimpleDateFormat("MM/dd/yyyy")).format(new Date());
|
||||||
|
System.out.println("Using date: " + date);
|
||||||
|
|
||||||
|
System.out.println();
|
||||||
|
|
||||||
|
System.out.println("Running closure compiler on 'eagswebrtc.js'...");
|
||||||
|
JARSubprocess.runJava(new File("."), new String[] { "-jar", "zip-generator/google-closure-compiler.jar", "--js", "javascript/eagswebrtc.js",
|
||||||
|
"--js_output_file", "stable-download/web/eagswebrtc.js", "-O", "SIMPLE" }, "[ClosureCompiler]");
|
||||||
|
|
||||||
|
System.out.println("Loading 'javascript/classes.js'");
|
||||||
|
String classesJs = FileUtils.readFileToString(new File("javascript/classes.js"), "UTF-8");
|
||||||
|
|
||||||
|
File f = new File("crash_report_override.txt");
|
||||||
|
if(f.isFile()) {
|
||||||
|
classesJs = classesJs.replace("If this has happened more than once then please copy the text on this screen and publish"
|
||||||
|
+ " it in the issues feed of this fork\\'s GitHub repository.", FileUtils.readFileToString(f, "UTF-8").trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println("Loading 'javascript/classes_server.js'");
|
||||||
|
String classesServerJs = FileUtils.readFileToString(new File("javascript/classes_server.js"), "UTF-8").replaceFirst("\\/\\/# sourceMappingURL=.*(\\r\\n|\\r|\\n)*", "").trim();
|
||||||
|
|
||||||
|
System.out.println("Loading 'javascript/assets.epk'");
|
||||||
|
String assetsEpk = Base64.encodeBase64String(FileUtils.readFileToByteArray(new File("javascript/assets.epk")));
|
||||||
|
|
||||||
|
System.out.println("Loading 'stable-download/web/eagswebrtc.js'");
|
||||||
|
String classesWebRTCJs = FileUtils.readFileToString(new File("stable-download/web/eagswebrtc.js"), "UTF-8").replaceFirst("[\\'\\\"]use strict[\\'\\\"]\\;(\\r\\n|\\r|\\n)*", "").trim();
|
||||||
|
|
||||||
|
System.out.println("Loading 'zip-generator/Offline_Download_Version_Template.html'");
|
||||||
|
String offlineTemplate = FileUtils.readFileToString(new File("zip-generator/Offline_Download_Version_Template.html"), "UTF-8");
|
||||||
|
|
||||||
|
System.out.println("Writing 'stable-download/Offline_Download_Version.html'");
|
||||||
|
|
||||||
|
offlineTemplate = offlineTemplate.replace("${date}", date).replace("${assets_epk_base64}", assetsEpk).replace("${classes_js}",
|
||||||
|
classesJs.replaceFirst("\\/\\/# sourceMappingURL=.*(\\r\\n|\\r|\\n)*", "").trim());
|
||||||
|
offlineTemplate = offlineTemplate.replace("${eagswebrtc_js}", classesWebRTCJs).replace("${classes_server_js}", classesServerJs);
|
||||||
|
|
||||||
|
FileUtils.writeStringToFile(new File("stable-download/Offline_Download_Version.html"), offlineTemplate, "UTF-8");
|
||||||
|
|
||||||
|
System.out.println("Writing 'javascript/classes.js' to 'stable-download/web/classes.js'");
|
||||||
|
FileUtils.writeStringToFile(new File("stable-download/web/classes.js"), classesJs, "UTF-8");
|
||||||
|
|
||||||
|
System.out.println("Copying 'javascript/classes.js.map' to 'stable-download/web/classes.js.map'");
|
||||||
|
FileUtils.copyFile(new File("javascript/classes.js.map"), new File("stable-download/web/classes.js.map"));
|
||||||
|
|
||||||
|
System.out.println("Copying 'javascript/classes_server.js' to 'stable-download/web/classes_server.js'");
|
||||||
|
FileUtils.copyFile(new File("javascript/classes_server.js"), new File("stable-download/web/classes_server.js"));
|
||||||
|
|
||||||
|
System.out.println("Copying 'javascript/classes_server.js.map' to 'stable-download/web/classes_server.js.map'");
|
||||||
|
FileUtils.copyFile(new File("javascript/classes_server.js.map"), new File("stable-download/web/classes_server.js.map"));
|
||||||
|
|
||||||
|
System.out.println("Copying 'javascript/assets.epk' to 'stable-download/web/assets.epk'");
|
||||||
|
FileUtils.copyFile(new File("javascript/assets.epk"), new File("stable-download/web/assets.epk"));
|
||||||
|
|
||||||
|
System.out.println("Copying 'javascript/worker_bootstrap.js' to 'stable-download/web/worker_bootstrap.js'");
|
||||||
|
FileUtils.copyFile(new File("javascript/worker_bootstrap.js"), new File("stable-download/web/worker_bootstrap.js"));
|
||||||
|
|
||||||
|
System.out.println("Writing 'stable-download/stable-download.zip'");
|
||||||
|
|
||||||
|
ZipOutputStream zOut = new ZipOutputStream(new FileOutputStream(new File("stable-download/stable-download.zip")));
|
||||||
|
zOut.setLevel(9);
|
||||||
|
|
||||||
|
zipFolder(zOut, "web", new File("stable-download/web"));
|
||||||
|
zipFolder(zOut, "java", new File("stable-download/java"));
|
||||||
|
|
||||||
|
zOut.close();
|
||||||
|
|
||||||
|
System.out.println("Writing 'stable-download/stable-download_repl.zip'");
|
||||||
|
|
||||||
|
zOut = new ZipOutputStream(new FileOutputStream(new File("stable-download/stable-download_repl.zip")));
|
||||||
|
zOut.setLevel(9);
|
||||||
|
|
||||||
|
zipFolder(zOut, "web", new File("stable-download/web"), "web/classes.js", "web/classes_server.js",
|
||||||
|
"web/worker_bootstrap.js", "web/eagswebrtc.js", "web/index.html", "web/classes.js.map",
|
||||||
|
"web/classes_server.js.map");
|
||||||
|
|
||||||
|
zipFolder(zOut, "java", new File("stable-download/java"));
|
||||||
|
|
||||||
|
zOut.putNextEntry(new ZipEntry("web/classes.js"));
|
||||||
|
IOUtils.write(classesJs + "\n" + classesWebRTCJs, zOut, "UTF-8");
|
||||||
|
|
||||||
|
if(classesServerJs.startsWith("\"use strict\";")) {
|
||||||
|
classesServerJs = classesServerJs.substring(13).trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
zOut.putNextEntry(new ZipEntry("web/worker_bootstrap.js"));
|
||||||
|
IOUtils.write(FileUtils.readFileToString(new File("zip-generator/repl_worker_bootstrap.js"), "UTF-8")
|
||||||
|
.replace("${classes_server}", classesServerJs), zOut, "UTF-8");
|
||||||
|
|
||||||
|
zOut.putNextEntry(new ZipEntry("web/index.html"));
|
||||||
|
IOUtils.write(FileUtils.readFileToByteArray(new File("zip-generator/repl_index.html")), zOut);
|
||||||
|
|
||||||
|
zOut.close();
|
||||||
|
|
||||||
|
System.out.println("Writing 'stable-download/stable-download_livestream.zip'");
|
||||||
|
|
||||||
|
zOut = new ZipOutputStream(new FileOutputStream(new File("stable-download/stable-download_livestream.zip")));
|
||||||
|
zOut.setLevel(9);
|
||||||
|
|
||||||
|
zipFolder(zOut, "web", new File("stable-download/web"), "web/index.html");
|
||||||
|
zipFolder(zOut, "java", new File("stable-download/java"));
|
||||||
|
|
||||||
|
zOut.putNextEntry(new ZipEntry("web/index.html"));
|
||||||
|
IOUtils.write(FileUtils.readFileToByteArray(new File("zip-generator/livestream_index.html")), zOut);
|
||||||
|
|
||||||
|
zOut.close();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void zipFolder(ZipOutputStream zOut, String pfx, File file, String... exclude) throws IOException {
|
||||||
|
zipFolder0(zOut, file.getAbsolutePath().replace('\\', '/'), pfx, file, exclude);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void zipFolder0(ZipOutputStream zOut, String pfx, String writePfx, File file, String... exclude) throws IOException {
|
||||||
|
for(File f : file.listFiles()) {
|
||||||
|
if(f.isDirectory()) {
|
||||||
|
zipFolder0(zOut, pfx, writePfx, f);
|
||||||
|
}else if(f.isFile()) {
|
||||||
|
String path = f.getAbsolutePath().replace('\\', '/').replace(pfx, "");
|
||||||
|
if(path.startsWith("/")) {
|
||||||
|
path = path.substring(1);
|
||||||
|
}
|
||||||
|
if(writePfx.length() > 0 && !writePfx.endsWith("/")) {
|
||||||
|
writePfx = writePfx + "/";
|
||||||
|
}
|
||||||
|
path = writePfx + path;
|
||||||
|
if(!shouldExclude(path, exclude)) {
|
||||||
|
zipFile(zOut, path, f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void zipFile(ZipOutputStream zOut, String name, File file) throws IOException {
|
||||||
|
zOut.putNextEntry(new ZipEntry(name));
|
||||||
|
IOUtils.write(FileUtils.readFileToByteArray(file), zOut);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean shouldExclude(String name, String... exclude) {
|
||||||
|
for(int i = 0; i < exclude.length; ++i) {
|
||||||
|
if(exclude[i].equalsIgnoreCase(name)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Binary file not shown.
Loading…
Reference in New Issue