mirror of
https://github.com/barkeser2002/pterodactyl-addons.git
synced 2026-09-25 10:46:01 +03:00
97 lines
2.6 KiB
Plaintext
97 lines
2.6 KiB
Plaintext
Hey, thanks for your purchase.
|
|
|
|
1 - run this command on your server :
|
|
|
|
mkdir /root/wings
|
|
cd /root/wings
|
|
|
|
2 - after run a wget command with last wings version (you can get it here : https://github.com/pterodactyl/wings/releases), unzip it and go to wings folder. For exemle with the wings 1.11.5 :
|
|
|
|
wget https://github.com/pterodactyl/wings/archive/refs/tags/v1.11.5.zip
|
|
unzip v1.11.5.zip
|
|
mv wings-1-11.5/* ./
|
|
|
|
|
|
3 - In router/router.go after "server.POST("/power", postServerPower)" add :
|
|
|
|
server.GET("/checkjar", getCheckJar)
|
|
|
|
4 - In router/router_server.go at end of file add :
|
|
|
|
func getCheckJar(c *gin.Context) {
|
|
s := middleware.ExtractServer(c)
|
|
var data struct {
|
|
JAR string `json:"jar"`
|
|
}
|
|
|
|
if err := c.BindJSON(&data); err != nil {
|
|
c.JSON(http.StatusAccepted, gin.H{
|
|
"status": false,
|
|
})
|
|
|
|
}
|
|
isjar := s.Filesystem().CheckJar(data.JAR)
|
|
c.JSON(http.StatusAccepted, gin.H{
|
|
"status": isjar,
|
|
})
|
|
}
|
|
|
|
|
|
5 - In server/filesystem/filesystem.go at end of file add :
|
|
|
|
func (fs *Filesystem) CheckJar(p string) bool {
|
|
cleaned, err := fs.SafePath("/")
|
|
if err != nil {
|
|
return false
|
|
}
|
|
|
|
read, err := zip.OpenReader(cleaned + "/" + p)
|
|
if err != nil {
|
|
err := filepath.Walk(cleaned + "/libraries/net/minecraftforge",
|
|
func(path string, info os.FileInfo, err error) error {
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
return err
|
|
})
|
|
|
|
if err != nil {
|
|
return false
|
|
} else {
|
|
return true
|
|
}
|
|
|
|
}
|
|
defer read.Close()
|
|
for _, file := range read.File {
|
|
if(strings.HasPrefix(file.Name, "net/minecraft/") || strings.HasPrefix(file.Name, "net/minecraftforge/") || strings.HasPrefix(file.Name, "org/bukkit/craftbukkit/") || strings.HasPrefix(file.Name, "libraries/net/minecraftforge/") || strings.HasPrefix(file.Name, "org/spongepowered/") || strings.HasPrefix(file.Name, "io/papermc/") || strings.HasPrefix(file.Name, "com/velocitypowered/") || strings.HasPrefix(file.Name, "net/md_5/bungee/") ) {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
|
|
6 - In same file under "time" add :
|
|
|
|
"archive/zip"
|
|
|
|
7 - Install go on your server (https://golang.org/doc/install or you can use https://askubuntu.com/a/1222190 if you are on ubuntu)
|
|
|
|
8 - run go build
|
|
|
|
9 - run :
|
|
|
|
rm /usr/local/bin/wings
|
|
cp wings /usr/local/bin/wings
|
|
chmod u+x /usr/local/bin/wings
|
|
|
|
10 - Restart wings (service wings restart)
|
|
|
|
|
|
FOR A URGENT HELP CONTACT ME DIRECTLY BY SMS OR EMAIL!!
|
|
If you need help contact me on discord : http://discord.bagou450.com/ (or https://discord.gg/bagou450)
|
|
You don't have discord ? Send me a SMS to +33 7 56 89 00 36 (Unsurcharged number, No call)
|
|
You prefer emails? Send a email to contact@bagou450.com
|