Compare commits

...

6 Commits

Author SHA1 Message Date
Auxilor
d36551a94b libreforge-updater 2022-10-18 14:15:28 +01:00
Auxilor
42ed601fd7 libreforge-updater 2022-10-16 23:27:52 +01:00
Auxilor
3cd800aeac libreforge-updater 2022-10-13 20:13:29 +01:00
Auxilor
a8e4f886a5 Updated to 1.50.2 2022-10-11 13:06:54 +01:00
Auxilor
fffdca4515 libreforge-updater 2022-10-10 21:05:04 +01:00
Auxilor
03fe0f6116 libreforge-updater 2022-10-09 15:03:50 +01:00
8 changed files with 65 additions and 12 deletions

View File

@@ -48,7 +48,7 @@ allprojects {
dependencies {
compileOnly 'com.willfp:eco:6.42.0'
implementation 'com.willfp:libreforge:3.110.0'
implementation 'com.willfp:libreforge:3.113.0'
implementation 'org.joml:joml:1.10.4'
compileOnly 'org.jetbrains:annotations:23.0.0'

View File

@@ -1,16 +1,29 @@
package com.willfp.ecopets.commands
import com.willfp.eco.core.EcoPlugin
import com.willfp.eco.core.command.impl.PluginCommand
import com.willfp.ecopets.pets.Pets
import com.willfp.libreforge.LibReforgePlugin
import com.willfp.libreforge.lrcdb.CommandExport
import com.willfp.libreforge.lrcdb.CommandImport
import com.willfp.libreforge.lrcdb.ExportableConfig
import org.bukkit.command.CommandSender
class CommandEcopets(plugin: EcoPlugin) : PluginCommand(plugin, "ecopets", "ecopets.command.ecopets", false) {
class CommandEcopets(plugin: LibReforgePlugin) : PluginCommand(plugin, "ecopets", "ecopets.command.ecopets", false) {
init {
this.addSubcommand(CommandReload(plugin))
.addSubcommand(CommandGive(plugin))
.addSubcommand(CommandGiveEgg(plugin))
.addSubcommand(CommandGiveXP(plugin))
.addSubcommand(CommandReset(plugin))
.addSubcommand(CommandImport("pets", plugin))
.addSubcommand(CommandExport(plugin) {
Pets.values().map {
ExportableConfig(
it.id,
it.config
)
}
})
}
override fun onExecute(sender: CommandSender, args: List<String>) {

View File

@@ -10,7 +10,7 @@ import org.bukkit.entity.Player
import org.bukkit.event.EventHandler
import org.bukkit.event.Listener
import org.bukkit.event.player.PlayerQuitEvent
import java.util.*
import java.util.UUID
import kotlin.math.PI
import kotlin.math.abs
@@ -44,10 +44,18 @@ class PetDisplay(
location.y += NumberUtils.fastSin(tick / (2 * PI) * 0.5) * 0.15
try {
stand.teleport(location)
} catch (_: Exception) {
if (location.world != null) {
try {
stand.teleport(location)
} catch (_: Throwable) {
/*
For anyone reading - I KNOW TO NEVER CATCH THROWABLE
but NMS is really stupid and does this sometimes:
java.lang.Throwable: null
at net.minecraft.world.entity.Entity.teleportTo(Entity.java:3336) ~[paper-1.19.2.jar:git-Paper-186]
so I guess that's what has to be done. Not sure what the actual cause is.
*/
}
}
if (!pet.entityTexture.contains(":")) {

View File

@@ -274,5 +274,3 @@ potions:
particles:
permanent: false
triggered: true
share-configs: true # If your configs are allowed to be used to gather data and improve the plugin. Nothing identifying (IP, Name, etc) is shared.

View File

@@ -25,6 +25,13 @@ messages:
no-pet-active: "&cYou don't have a pet active!"
activated-pet: "&fYou have activated the %pet%&f pet!"
deactivated-pet: "&fYou have deactivated the %pet%&f pet!"
must-specify-lrcdb-id: "&cYou must specify the ID of the config to download! Not sure what this means? Go to &alrcdb.auxilor.io"
lrcdb-import-error: "&cError importing config: &f%message%"
lrcdb-import-success: "&fImported &a%name%&f! Reload the plugin to install it"
must-specify-config-name: "&cYou must specify the config name!"
invalid-config-name: "&cInvalid config name!"
lrcdb-export-error: "&cError exporting config: &f%message%"
lrcdb-export-success: "&fExported &a%name%&f! View it on &alrcdb.auxilor.io&f, or share your config ID: &f%id%"
menu:
title: "Pets"

View File

@@ -0,0 +1,19 @@
# Options for lrcdb (https://lrcdb.auxilor.io), a website to share configs
# with other server owners, so you can get more configs without making them
# yourself!
author: "Unknown Author" # The name attached to configs you export
# Options about automatically sharing configs you create
share-configs:
# If you want all your configs to automatically be publicly available,
# set this to true. This really helps out other users!
publicly: false
# If you don't want your configs to be usable to gather information about
# plugin usage or to improve the plugins in the future, disable this.
# Nothing identifying is shared.
enabled: true
# If you disable share-configs, you can still share select configs publicly
# with /ecopets export <config>.

View File

@@ -54,6 +54,8 @@ permissions:
ecopets.command.reset: true
ecopets.command.activate: true
ecopets.command.deactivate: true
ecopets.command.import: true
ecopets.command.export: true
ecopets.command.reload:
description: Allows reloading the config
@@ -76,6 +78,12 @@ permissions:
ecopets.command.reset:
description: Allows the use of /ecopets reset.
default: op
ecopets.command.import:
description: Allows the use of /ecopets import.
default: op
ecopets.command.export:
description: Allows the use of /ecopets export.
default: op
ecopets.command.activate:
description: Allows the use of /pets activate.
default: true

View File

@@ -1,4 +1,4 @@
#libreforge-updater
#Fri Oct 07 19:52:35 BST 2022
version=1.49.0
#Tue Oct 18 14:15:28 BST 2022
version=1.52.0
plugin-name=EcoPets