#help-development

1 messages · Page 2053 of 1

tardy flame
#

You really shouldn't write a code like this

vocal cloud
rough drift
#
    public class PrestigeTeleport implements CommandExecutor {
        @Override
        public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
            return sender instanceof Player&&args.length>0&&Bukkit.getPlayer(args[0])!= null?((Player)sender).teleport(Bukkit.getPlayer(args[0]).getLocation())||true:false;
        }
    }
#

shortest one i can make that syntax allows iirc

rough drift
tardy flame
#

._.

rough drift
#

i don't actually write my code like that

tardy flame
#

alr great

#

also this code won't work

rough drift
#

it will

vocal cloud
#

Except we lose the error message which you'd need to let the player know the name is wrong kekw

tardy flame
#

There is no method for Bukkit.getPlayer(Location)

tardy flame
rough drift
tardy flame
#

no need for that

unique geyser
#

I write mine like this:

{
}
/* What Does Bracket Mean?
Brackets, or braces, are a syntactic construct in many programming languages. They take the forms of "[]", "()", "{}" or "<>." They are typically used to denote programming language constructs such as blocks, function calls or array subscripts.

Brackets are also known as braces.

Techopedia Explains Bracket
Brackets are an important syntactic element in most major programming languages. They may take several forms. The most common are the "{}", "[]", ()" and "<>" brackets. There are several other names for these characters. The "{}" are referred to as curly brackets or braces while "<>" are often called angle brackets or braces. The term "curly braces" is more favored in the U.S., while "brackets" is more widely used in British English. The "()" are also frequently abbreviated as "parens" since they are parantheses characters. These characters are encoded in both ASCII and Unicode.

These brackets define important constructs in a programming language. For example, in C and languages influenced by C, "{}" denote a code block while "[]" refers to an array subscript. In Perl, the "<>" is referred to as the filehandle operator for reading from and writing to files. */

unique geyser
tender shard
#

not adding comments hurts turtles and puppies

unique geyser
#

facts

#

im gonna go sleep now
satisfied with the amount i learned on plugin making

#

thanks to everyone who helped

#

gn

tardy flame
#
    @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {return sender instanceof Player && args.length > 0 && Bukkit.getPlayer(args[0]) != null && (((Player) sender).teleport((Bukkit.getPlayer(args[0])).getLocation() == null ? (Bukkit.getPlayer(args[0])).getLocation() : ((Player) sender).getLocation()) || true);}

#

with location check

rough drift
#

no

#

shortest readable

vocal cloud
#

Still lacks an error message for warning the player

tardy flame
#

how no :C

rough drift
#

not shortest in total

vocal cloud
#
    public class PrestigeTeleport implements CommandExecutor {
        @Override
        public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
            if (!(sender instanceof Player player) || args.length != 1) return false;
            if (Bukkit.getPlayer(args[0]) == null) player.sendMessage(ChatColor.RED + "Unable to locate player" + args[0]);
            else player.teleport(player.getLocation());
            return true;
        }
    }
rough drift
tardy delta
#
    public class PrestigeTeleport implements CommandExecutor {
        @Override
        public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
            if (!(sender instanceof Player player) || args.length != 1) return false;
            Player target = Bukkit.getPlayer(args[0]);
            Optional.ofNullable(target).ifPresent(t -> t.teleport(player.getLocation())).orElseRun(player.sendMessage(ChatColor.RED + "Unable to locate player" + args[0]));
            return true;
        }
    }```
#

3

rough drift
#

.

#

1

vocal cloud
#

No error message

#

therefore lost information

rough drift
#

there is one

#

use usage as the error message ;)

#

so i still stop you

quiet ice
#

Does anyone know some artifact that has a seperate jar where the IntelliJ annotations are stored? I'm writing a maven resolver and I'm interested in how the files are laid out. Reading the documentation did not make me much smarter

topaz cape
#

it's been done in a simpler way already

#

thanks geol

quiet ice
#

Thought so

#

You could've just splitted the string now that I think about it

#

eh, you probably did that

topaz cape
#

\$\{[A-Za-z]+}

#

something close to that

#

I'm on phone

#

i think it was that anyway

quiet ice
#

ah, just got rid of allowing whitespaces altogether huh

topaz cape
#

yep. i had gotten help from one of my friends though just to not take credit

#

\$\{[a-z]{1,}\} he gave me that

#

which is pretty much the same thing except i just added the capital letters thing

#

tbh i should have done that in the first place but i was just very blind somehow lmao

tardy flame
#
    @Override
    public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String @NotNull [] args) {
        Optional.ofNullable(Bukkit.getPlayer(args[0])).ifPresentOrElse(player1 -> player1.teleport(((Player) sender).getLocation()), () -> sender.sendMessage("No player for name" + args[0]));
        return true;
    }
#

@rough drift

vocal cloud
#

That will error if send isn't a player

#

No wait

tardy flame
#

oh wai

#

will it?

vocal cloud
#

Where do you check for the player being a player

quiet ice
#

it will

tardy flame
#

nowhere

#

:boohoowaa:

quiet ice
#

player1.teleport(((Player) sender) the cast will just throw an exception

tardy flame
#

yeah...

quiet ice
#

Probably can ignore though

vocal cloud
#
    public class PrestigeTeleport implements CommandExecutor {
        @Override
        public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
            if((!(sender instanceof Player) || args.length != 1)) return false;
            Optional.ofNullable(Bukkit.getPlayer(args[0])).ifPresentOrElse((p) -> p.teleport(((Player)sender).getLocation()),() -> sender.sendMessage(ChatColor.RED + "Unable to locate player" + args[0]));
            return true;
        }
    }
``` the shortest you can get while keeping integrity would be something like this I imagine
quaint mantle
#

Omggg it’s still going on

halcyon mica
#

I figured the spacing issue out

#

And it's disgusting

#

One bold space and one regular space

#

Per pixel

quaint mantle
#

Oh you were trying to do that the whole time

urban trout
#

hey guys, how would i go about making a lava rising plugin?

tardy flame
vocal cloud
#

check the docs but I assume no

quaint mantle
halcyon mica
#

It's not, but it's optimized very poorly

#

Every pixel is its own component, and every empty pixel is 2

lethal coral
#

Bump

vocal cloud
#

What do you mean by entity ID? The unique ID or

quaint mantle
#

Yea he’s spawning an entity but trying to cancel it for the player who is using the disguise by listening to the packets

#

But he can’t cancel it cuz he doesn’t have the id cuz it doesn’t exist yet

vocal cloud
#

I assume you'll need to apply a runlater or something if you can get the entity.

tardy flame
#

Lol

#

It should work

tardy delta
#

meh

tardy flame
#
    @Override
    public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String @NotNull [] args) {
        return ((Runnable) () -> Optional.ofNullable(Bukkit.getPlayer(args[0])).ifPresentOrElse(player1 -> {
            if (sender instanceof Player player) player1.teleport(player.getLocation());
            else sender.sendMessage("Imagine being console, i would prefer to die");
        }, () -> sender.sendMessage("No player for name" + args[0]))) == null;
    }
#

Technically it's one line

tardy delta
#

lmao

#

imagine codin liiek tha

tardy flame
#

imagine

vocal cloud
#

If you press ctrl + alt + l and it's 1 line then it's 1 line

#

otherwise it's not kekw

lethal coral
rough drift
#

So

#

why is rotating

#

so difficult

#

location.getDirection is not even correct

#

i just have like 3 armor stands

#

and i need to rotate them on themselves

#

(so middle stays middle)

#

and for some reason or another i am too dumb to figure it out

mortal cedar
#

Is it possible to generate vanilla structures like mansions, villages or just the simple ones like boats without using minecraft packages?

tardy flame
# vocal cloud If you press ctrl + alt + l and it's 1 line then it's 1 line
    @Override
    public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String @NotNull [] args) {
        return ((Runnable) () -> Optional.ofNullable(Bukkit.getPlayer(args[0])).ifPresentOrElse(player1 -> {if (sender instanceof Player player) player1.teleport(player.getLocation());else sender.sendMessage("Imagine being console, i would prefer to die");}, () -> sender.sendMessage("No player for name" + args[0]))) == null;
    }
#

1 line !

#

😛

vocal cloud
#

Does that even execute though?

tardy flame
#

idk

#

lol

vocal cloud
#

I'm guessing it does not

tardy flame
#

I think it will work

#

but it will have performance issues

#

beacuse of runnable casting -/

vocal cloud
#

Nope it doesn't work

tardy flame
#

it will run even it's called on return false

#

and this will always return null because you compare runnable to null

#

._.

vocal cloud
#

Uh yeah it actually does

#

Because returning false makes it print the usage

tardy flame
#

you can change == to != ._.

vocal cloud
#

The runnable still doesn't execute

tardy flame
#

eh

vocal cloud
#

also ctrl+alt+l still returns

#

4 lines

tardy flame
#

it's one statement tho

vocal cloud
#

But it's still wrong

tardy flame
#

we should compare statement lines not lines

vocal cloud
#

That's not what we're doing lol

grim ice
#

guys give lib ideas

vocal cloud
#

Except it's functionally useless so shrug1

grim ice
#

its cool

#

functionally = function = fun in kotlin = fun = cool

tardy delta
#

fn

mortal cedar
#

Can you access vanilla structures with the Bukkit#getStructureManager?

#

getStructures and getStructure with namespace key doesn't seem to work with vanilla ones

modern vigil
#

Is there a way to get the enchant level from an instance of Enchantment?

grim ice
#

No.

modern vigil
#

how would I get it then?

topaz cipher
#

java. lang. NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor (org.bukkit.command.CommandExecutor)" because the return value of "main.main.getcommand (String)" is null

What is wrong with the plugin?

tardy delta
#

register the command in your plugin yml

grim ice
#

not sure

mortal cedar
#

nope

grim ice
topaz cipher
grim ice
mortal cedar
#

getStructures map ist completely empty and getStructure with any vanilla namespace is null

grim ice
#

producing the error

tardy delta
#

i wont die

grim ice
#

you will 100% be dead

tardy delta
#

im god

topaz cipher
#

Sorry it was the Automatic correcture

#

🤣

tardy delta
#

this dude is a machine

topaz cipher
#

Sorry

grim ice
#

Assuming you're at least 10 years old, there is a 0.0000002% chance you will live 100 more years, and if you do, you're called a Supercentenarian

topaz cipher
modern vigil
#

i have a quick kotlinx serialization question

#

I want to parse a list of objects with the properties id and level

#

They will be parsed into the same object, but id is now an key of Enchantment

quiet ice
topaz cipher
#
name: VaroManager
version: 1.0
author: ITM
main: main.MainClass

commands:
   vmwhitelist:
   vmoverview:
   vmrestriction:
   vmrestart:
   vmfastrestart:
tardy delta
#

thats invalid yml too

modern vigil
#

making an object that implements KSerializer<Array<ItemEnchant>> gives a warning

quiet ice
#

What warning?

tardy delta
#

if you dont want to provide a description and such do ```yaml
commands:

  • vmwhitelist
  • something
modern vigil
#

Serializer has not been found for type 'Enchantment'. To use context serializer as fallback, explicitly annotate type or property with @Contextual

#

waitt

#

lemme do some stuff

topaz cipher
#

what ? is this since the newer versions ?

modern vigil
#

nvm

tardy delta
#

wait

#

that doesnt look right

quiet ice
#

The yaml may be valid, but the bigger question is whether spigot will accept it

modern vigil
#

~

tardy delta
#

mye

modern vigil
#

is that like an empty object?

tardy delta
#

checker added that

topaz cipher
#

thank you. can you copy the text in discord ?

#

the plugin doesn't works if there is just one wrong space

tardy delta
#
author: ITM
commands: 
  vmfastrestart: ~
  vmoverview: ~
  vmrestart: ~
  vmrestriction: ~
  vmwhitelist: ~
main: main.MainClass
name: VaroManager
version: 1.0```
#

why is there stuff under the commands list

#

people usually put it somewhere above

topaz cipher
#

hmm idk

raw ibex
#

would this work??

#
@EventHandler
    public void joinServer(PlayerJoinEvent e) {
        Player p = e.getPlayer();
        p.setDisplayName("Steven He");
    }```
topaz cipher
#

It's still the same error

quiet ice
tardy delta
#

smh

quiet ice
#

Which error is it even?

tardy delta
#

i think you need to provide a desciption

#

as bukkit wont be able to generate the help page otherwise

topaz cipher
#

i don't think so i have programmed some plugins for 1.13.2 and it worked without a description

rough drift
#

question

#

how can you replace text in a component

#

component.replaceText gives you a builder, so i tried .matchLiteral .replacement, that works no?

tardy delta
rough drift
#

(don't have access to my testing server atm)

raw ibex
tardy delta
#

packets or scoreboard api

raw ibex
#

like in tab and above their head

tardy delta
#

dont ask me how

modern vigil
#

how is this code unreachable . _.

raw ibex
#

pretty sure there's an easy way @tardy delta

tardy delta
#

you cant return a try

quiet ice
rough drift
tardy delta
#

return {} doesnt exist

#

waiitttt

#

kotlin

rough drift
#

yes

tardy delta
#

REeeeeee

rough drift
#

maybe intelli messed up

#

try restarting it

modern vigil
#

then intellij is on some weird shi

rough drift
#

reachable*

rough drift
modern vigil
#

also

#

I made a serializer for an array of ItemEnchants

#

but

quiet ice
#

In the try-catch block you either throw an exception or return outright

#

As such you never exit the try-catch block without also exiting the method

modern vigil
#

the dataclass has to be annotated with @Serializable, the thing is, the serializer only serializes arrays..

#

and you gotta parse the json before using forEach on an array

quiet ice
#

DataOutputStream goes brrr

grim ice
#
        return ((Supplier<Boolean>) () -> {
            Optional.ofNullable(Bukkit.getPlayer(args[0])).ifPresentOrElse(player1 -> {
                if (sender instanceof Player player) player1.teleport(player.getLocation());
                else sender.sendMessage("Imagine being console, i would prefer to die");
            }, () -> sender.sendMessage("No player for name" + args[0]));
            return true;
        }).get();
#

be dumb and abuse functions

#

actually

#

use a supplier

granite owl
#

if i apply PDC data to an EntityPlayer

eternal night
#

👀

granite owl
#

is the data stored in the playerdata file`?

#

or where is it

eternal night
#

PDC data to an entity player ?

#

like, the server internal ?

modern vigil
granite owl
#

ehm

eternal night
#

PDC is an API concept, idk how/why you'd interact with it on an EntityPlayer

quiet ice
#

I think it will be stored to NBT either way

eternal night
#

yes the PDC ends up as playerdata

modern vigil
#

cuz i want to parse the list but the dataclass is not of type Array<LemonItem>

eternal night
#

but like, EntityPlayer has nothing to do with it o.O

quiet ice
#

However PDC would not be persistent if it is stored in NBT, so aah

modern vigil
#

btw

#

wait no lemme test it first

granite owl
#

uhm

#

what about this snipped

#
String surname = "Alex";
PersistentDataContainer pdc = player.getPersistentDataContainer();
NamespacedKey surnameKey = new NamespacedKey(myPlugin, "surname");
pdc.set(surnameKey, PersistentDataType.STRING, surname);
slim shell
granite owl
#

from this site ppl here been advocating

#

thats the page ppl on this server kept advocating

quaint mantle
#

What are you asking?

granite owl
#

in which file

quaint mantle
#

In the player data file

granite owl
#

in the main world

#

?

#

so if i delete the playerdata file

#

i delete any to that player associated nbt tags?

quaint mantle
#

Well yea because you deleted their data file…

granite owl
#

kk ty

quaint mantle
#

So yes it’s all gone

granite owl
#

sorry for asking so dumb its more of a legal concern

#

xD

#

so i wanna be 100% clear

quaint mantle
#

Yea it would be like they first join the server again

granite owl
#

hm?

clear raptor
#

When Player.getDisplayName() is deprecated how I should get string value of user's "friendly" name? displayName() returns Component and .toString() does not return the display name but string representation of Component.

granite owl
#

okay cool just tried pdc, apparently its nullptr safe

modern vigil
#

ok so that crashed

granite owl
#

unless it deprecated since 1.18.2

#

im using 1.18.1

modern vigil
#
object ItemEnchantSerializer : KSerializer<ArrayList<ItemEnchant>> {
    override val descriptor: SerialDescriptor = ItemEnchant.serializer().descriptor

    override fun serialize(encoder: Encoder, value: ArrayList<ItemEnchant>) {
        value.forEach {
            val itemEnchant =
                Enchantment.getByKey(NamespacedKey.minecraft("minecraft:${it.id.toString().lowercase()}"))
                    ?.let { it1 -> ItemEnchant(it1, it.level) } ?: throw InvalidItemFormatException("The id of one of the enchantments is not valid")
            encoder.encodeSerializableValue(ItemEnchant.serializer(), itemEnchant);
        }
    }

    override fun deserialize(decoder: Decoder): ArrayList<ItemEnchant> {
        return decoder.decodeSerializableValue(ItemEnchantSerializer);
    }
}```i know something is wrong with `deserialize`, but idk what
granite owl
#

if you meddle with vanilla methods

#

you cant throw exceptions

#

if you do you crash the main thread

#

thats one bullet point why ppl say stick to the api

#

no errors allowed

modern vigil
#

yeah... i noticed that throwing an err isnt that handy

granite owl
#

you simply cant

#

your code has to work flawlessly

#

or will crash the worker thread

modern vigil
#

how would i do it then?

frozen thorn
#

(my only world is named "world")

granite owl
#

use unsafe enchantments

modern vigil
#

it's not above the ench limit

granite owl
#

if i get it right

#
val itemEnchant =
                Enchantment.getByKey(NamespacedKey.minecraft("minecraft:${it.id.toString().lowercase()}"))
                    ?.let { it1 -> ItemEnchant(it1, it.level) } ?: throw InvalidItemFormatException("The id of one of the enchantments is not valid")
```checks if its a valid ench?
modern vigil
#

yeah

#

waitt

#

lemme remove the minecraft:

modern vigil
#

that won't fix everything

rough drift
granite owl
#

not my code

rough drift
#

its amazing right?

quaint mantle
#

i think his code is just messy

rough drift
granite owl
#

it is

modern vigil
#

i didnt write that piece of code

rough drift
granite owl
#

@modern vigil check wheter or not your returned value is null first

#

before you compare it to anything else

granite owl
#

but ppl told me im a terrible human being for this too

tardy delta
granite owl
#
public IniParser()
        {
            try
            {
                ptr = (Object) IniParserPtr.invoke(IniParserClassPtr);
            }
            catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e)
            {
                e.printStackTrace();
            }
        }
#

xD

rough drift
granite owl
rough drift
#

no need to add minecraft:

modern vigil
#

i removed that

rough drift
#

as NamespacedKey.minecraft already does that iirc

granite owl
#

most important part @modern vigil is

#

to check if its null or not

#

if its null and u compare it to anything else

#

u throw an exception

modern vigil
#

error

#

yeah ik

granite owl
#

and meddling with exceptions in vanilla methods 😉

modern vigil
#
object ItemEnchantSerializer : KSerializer<ArrayList<ItemEnchant>> {
    override val descriptor: SerialDescriptor = ItemEnchant.serializer().descriptor

    override fun serialize(encoder: Encoder, value: ArrayList<ItemEnchant>) {
        value.forEach {
            println(it);
            val enchantment = Enchantment.getByKey(NamespacedKey.minecraft(it.id.toString().lowercase())) ?: return;
            val itemEnchant = ItemEnchant(enchantment, it.level);
            encoder.encodeSerializableValue(ItemEnchant.serializer(), itemEnchant);
        }
    }

    override fun deserialize(decoder: Decoder): ArrayList<ItemEnchant> {
        println(decoder.decodeString())
        // return decoder.decodeSerializableValue(ItemEnchantSerializer);
        return arrayListOf();
    }
}```i refactored it now
#

it's not the best code, ik

granite owl
#

ive learned that when i wrote custom mobs and wrote custom pathfindergoals

#

cause that crashed my server xD

tardy delta
#

always read the stacktraces

modern vigil
#

the thing is

#

minehut lets you go to a certain point

#

like u can only see a part of the error

tardy delta
#

kek

granite owl
#

it is that any mistake crashes stuff, hard to reverse engineer, manual updates required etc

dire salmon
#

how do i make an event

modern vigil
#

whats the taggg

granite owl
modern vigil
#

?event-system

#

nvm

quaint mantle
undone axleBOT
modern vigil
#

ther

dire salmon
#

thx

granite owl
#

i thought he meant runables

#

btw are runables actually multithreaded or are they just splitting computing power of one physical core?

#

xD

modern vigil
#

yeah I got the error i imagined

granite owl
#

nullptr exception?

modern vigil
#

Unexpected JSON token at offset 123: Expected beginning of the string, but got [

#

nope

#

attempting to serialize a plain obj instead of an array of objects

granite owl
#

serializing is something i have to get into soon

#

when building an admin system to view offline players invs

modern vigil
#

then u gotta dig into the .dat files

granite owl
#

nope

#

Inventories are serializable on their own

modern vigil
#

are there json files for that?

granite owl
#

i grab them on logoff

#

and apply them on logon

modern vigil
#

ah

granite owl
#

the team wants it because they want mods to have access to the function without mods having direct access to player files

modern vigil
#

quick q

#

back to the problem tho

granite owl
#

check inventories

tardy delta
#

i want mod 👉👈

granite owl
#

grab the players inv

#

then add it

modern vigil
#

i need to parse an array of LemonItem

#

but

granite owl
#

yes?

modern vigil
#
@Serializable
data class LemonItemData(val id: String,
                         val name: String,
                         @EncodeDefault val lore: List<String> = listOf(),
                         @Serializable(with = MaterialSerializer::class) val material: Material,
                         @EncodeDefault @Serializable(with = ItemEnchantSerializer::class ) val enchants: ArrayList<ItemEnchant> = arrayListOf(),
                         @EncodeDefault val unbreakable: Boolean = false
                    )```
#

i need to serialize an arraylist of these

granite owl
#

is that java?

modern vigil
#

kotlin

granite owl
#

xD

modern vigil
#

i need to do this

granite owl
#

tbh

#

i have almost no knowledge in serializing yet

#

all i did was copying an 8liner and translating it so i can use it as pagefile

modern vigil
#

basically

#
{
    "id": "RAIDERS_AXE",
    "material": "IRON_AXE",
    "name": "&f&l&k??? &c&lRaider's Axe &f&l&k???",
    "enchants": [
        {
            "id": "sharpness",
            "level": 250
        }
    ],
    "unbreakable": true
}```this needs to be turned into an ItemStack
#

the only issue is with the enchants

#

the rest works

sacred mountain
#

hey how do i prevent this happening?

java.lang.NullPointerException
        at com.clonkc.vlands.kitpvp.vlandsutils.utility.utils.ServerUtils.sendMessage(ServerUtils.java:53) ~[?:?]
        at com.clonkc.vlands.kitpvp.vlandsutils.utility.cooldownlib.Cooldown.removeCooldown(Cooldown.java:57) ~[?:?]
        at com.clonkc.vlands.kitpvp.vlandsutils.utility.cooldownlib.Cooldown.handleCooldowns(Cooldown.java:69) ~[?:?]
        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59) ~[core.jar:1.8.8-R0.1-SNAPSHOT]
        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:352) [core.jar:1.8.8-R0.1-SNAPSHOT]
        at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:786) [core.jar:1.8.8-R0.1-SNAPSHOT]
        at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:380) [core.jar:1.8.8-R0.1-SNAPSHOT]
        at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:716) [core.jar:1.8.8-R0.1-SNAPSHOT]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:620) [core.jar:1.8.8-R0.1-SNAPSHOT]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]```

Heres the cooldown manager code:
```java
public static void handleCooldowns() {
        if(cooldownPlayers.isEmpty()) {
            return;
        }
        for(Iterator<String> it = cooldownPlayers.keySet().iterator(); it.hasNext();) {
            String key = it.next();
            for(Iterator<String> iter = cooldownPlayers.get(key).cooldownMap.keySet().iterator(); iter.hasNext();) {
                String name = iter.next();
                if(getRemaining(key, name) <= 0.0) {
                    removeCooldown(key, name);
                }
            }
        }
    }```
mellow edge
#

any good libraries that I can implement to make a costum gui in code or should I do it all by myself

sacred mountain
#
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, Cooldown::handleCooldowns, 1L, 1L);```
my main class
modern vigil
#

I only need to parse the array to another array

#

. _.

#

the dataclass needs to be an arraylist

granite owl
#
for (NamespacedKey s : pdc.getKeys())
{
    pdc.remove(s);
}
```does this work to remove all keys from all plugins from an object or entity?
#

Persistant data containers*

sacred mountain
#

u cant remove in a foreach right ? idk i thought u had to use iterator to do thay

sacred mountain
#

oh so

#

enhanced for

#

doesnt habe that problem?

chrome beacon
granite owl
#

its iterating an iteratable

#

and for each match of the specified data type

#

it loops

sacred mountain
#

i seem to remember one threw and concurrect modification excpetion or sum

granite owl
#

u can set a cooldown like for enderpearls on any item

eternal night
#

yes

granite owl
#

aighty

eternal night
#

that basically clears the entire PDC

granite owl
#

kk

#

ty

#

just threw this in 10sec but wasnt sure enough of that api, like if it works like this xD

quiet ice
#

not really

#

These days you mean spigot with bukkit however

vast sapphire
#

What am i doing wrong that I can't have more than one type of item in my shop? ```java
FileConfiguration config = Main.getInstance().getConfig();
ConfigurationSection section = config.getConfigurationSection("shop");
List<ItemStack> stacks = new ArrayList<>();
if (config.getInt("inventory.size") > 0) {
Inventory shop = Bukkit.createInventory(null, config.getInt("inventory.size"), format("&6Shop"));
for (String key : section.getKeys(false)) {

                        String displayname = config.getString("shop." + key + ".name");
                        int price = config.getInt("shop." + key + ".price");
                        boolean unbreakable = config.getBoolean("shop." + key + ".unbreakable");

                        ItemStack configItem = new ItemStack(Material.matchMaterial(key));

                        ItemMeta meta = configItem.getItemMeta();
                        List<String> lore = new ArrayList<>();
                        lore.add(format("&eCost: &a" + price + "&e points"));
                        meta.setLore(lore);
                        if (displayname != null)
                            meta.setDisplayName(format(displayname));
                        if (unbreakable) {
                            meta.spigot().setUnbreakable(true);
                        }
                        configItem.setItemMeta(meta);
                        stacks.add(configItem);
                        int slot = Main.getInstance().getConfig().getInt("shop." + key + ".slot");
                        for (ItemStack is : stacks) {
                            shop.setItem(slot, is);

                        }
                    }

                    ((Player) commandSender).openInventory(shop);```
tardy delta
#

my eyes

quiet ice
#

Well technically bukkit is just an API and spigot implements it

vast sapphire
#

it must be at the for loop that loops through all itemstacks but shouldn't it add the new itemstack as well?

visual tide
quiet ice
#

There are some non-spigot bukkit implementations but those are rare

quiet ice
granite owl
#

spigot is a superset of bukkit

visual tide
#

you can use buildtools to compile craftbukkit without spigot patches

granite owl
#

most modern methods are from spigot since bukkit died a long time ago

visual tide
granite owl
#

oh nvm

quiet ice
#

It actually uses spigot patches

granite owl
#

xD

quiet ice
#

Just not the spigot spigot patches

#

But those are rare

granite owl
#

spigots super anticheat xD

#

that never triggers

quiet ice
#

Md is increasingly cracking down on cb

#

Not sure how long it will remain buildable seperately.

visual tide
#

the only thing is impossible velocity warnings

#

"<player> moved wrongly!"

quiet ice
#

Which uhm is kinda broken

visual tide
#

well any proper client can bypass it

#

but spigot is not meant to be an anticheat

quiet ice
#

Especially tp plugins are prone to triggering it

granite owl
#

ik

#

its silly

granite owl
#

im writing my own lightweight anticheat rn to counter those your grandma hacks

quiet ice
#

I should really make my own actually leightweight ac

#

Making use of 0 short-lived objects. Would be a pain to create but defo worth it

granite owl
#

i should prob put as much effort in my anticheat as they put into their hacks

#

so ill hardcode everything

#

hell jea xD

#

ive put like 2 months of time into writing a modular plugin that gurantees EU data protection law compiliance

quiet ice
#

Sadly modding other games takes a lot of time so I don't really have much time to spend on such pretty useless endeavours

granite owl
#

now lets throw this in 1day

next stratus
#

What's the easiest way to make configurable guis?

granite owl
#

cause GUIs are managed by the client

#

or do u mean

next stratus
#

I mean from config

granite owl
#

with clickable items

next stratus
#

Like when you run /command and it pops up with your own gui with items in

granite owl
#

i wrote one

#

easy no

next stratus
#

It's mainly the getting the things from config is the worse part unless I make it static.

quiet ice
#

TextUIs are kinda nice and take a bit less time to write

granite owl
#
- create a new inventory
- set ur items up
- whenever player clicks any item in any inventory
  -> check if its ur custom inv, if yes cancel event and trigger effect
next stratus
#

I don't think you understand where I'm coming from :/

quiet ice
#

I recommend using inventory gui libraries however

next stratus
#

I know how to make the gui's, it's just how to get it from the config

granite owl
#

he wants to know how to read from files

#

xD

#

either get an existing file paresr

#

parser

next stratus
#

I want it to be configurable via config.

granite owl
#

or write ur own

hasty prawn
granite owl
#

ive hated all solutions so ive written my own ini parser

arctic moth
#

anyone know how to make the red border thing

quiet ice
#

ini parser based for what? Itemstacks?

arctic moth
#

its like the border but red all the pvp servers have it

next stratus
granite owl
#

ini parser for parsing ini files containing the information about your inv interface?

arctic moth
quiet ice
#

Make the client believe that it is outside the world border

next stratus
#

no I'm asking for a image

quiet ice
#

I think that is how it works

hasty prawn
arctic moth
#

no its like they have a blue one and then when its shrinking its red

next stratus
#

there's a blue one but idk about red

hasty prawn
#

Cause I think the WorldBorder turns red when it shrinks and green when it's growing.

arctic moth
#

but how

next stratus
#

like this?

arctic moth
#

is there some kinda builtin thing i dont know about?

arctic moth
#

looks more red

#

lol

next stratus
#

It's not my pic

arctic moth
#

oh

next stratus
#

I'm just trying to get a idea what you're after

arctic moth
#

cuz the one im talking about is semitransparent like the normal border

granite owl
#

wrong person pinged

next stratus
#

can you get a picture of it?

granite owl
#

@next stratus you can either create your inventory in memory and if everything is serializeable serialize it and write the bytestream to the harddrive, or make your own json, ini, whatever file format and store information from which you can create the inventories instance

arctic moth
#

it turns red when shrinking, but idk if theres a builtin function

arctic moth
next stratus
#

video?

granite owl
arctic moth
# next stratus video?

15 minutes or bust
Thanks for Watching! :D I appreciate all feedback and support :L!

Twitter → http://twitter.com/TapLHarV
Discord Server → http://discord.gg/TapL
Instagram → http://instagram.com/taplharv
Twitch → https://twitch.tv/tapl
Snapchat → itstapl

Server IP: tapple.world
Tapple Twitter: https://twitter.com/OfficialTapple
Tapple Discor...

▶ Play video
arctic moth
#

the red one moves smoothly

#

in the vid its blue while its not moving

#

but its red when it moves

hasty prawn
#

That's why you give it the 2nd argument for "over time".

arctic moth
#

oh

hasty prawn
#

Just give it a big ass number that it'll never reach LOL

arctic moth
#

lol

hasty prawn
#

Should always been red, atleast, I think.

craggy sapphire
#

yo can anyone help one of the plugins in my server was generating an error and I need to fix it but I dont know how. I dont code java but I can understand the basics. Can anyone help me fix my problem?

arctic moth
#

so it is a builtin thing

hasty prawn
#

Should be, yes.

undone axleBOT
granite owl
#

rather not sorry xD

craggy sapphire
#

wdym

#

its literally a free plugin

#

i just want to fix it

granite owl
#

still doesnt make decompiling legal

hasty prawn
#

He never said he was going to decompile.

#

Send the error NoSleep

craggy sapphire
#

i pasted it but dont know how to send

#

this works?

hasty prawn
#

Hm

#

Yeah it worked

craggy sapphire
#

ive tried looking everywhere but nobody posted the same problem about this specific plugin and all the solutions I could find included coding which I didnt know how to do

#

so can anybody please help me?

granite owl
#

it doesnt say what failed

craggy sapphire
#

it failed to path player death event to the plugin

granite owl
#

only that the problem is with the PlayerDeathEvent of the fr.neatmonster.nocheatplus.compat plugin

craggy sapphire
#

wait so

#

you are saying no cheat plus could be causing this?

granite owl
#

alot of vanilla methods fail

#

and its being traced back to that plugins methods

craggy sapphire
#

how should I fix it?

#

what do I cahnge in no cheat plus?

granite owl
#

erm

#

u dont

craggy sapphire
#

but

granite owl
#

it could be so much

craggy sapphire
#

i want the plugin to work

#

and my console to not be spammed

granite owl
#

maybe its using vanilla methods and ur using a different server version

#

or the data is being handled incorrectly

craggy sapphire
#

the server is on 1.8

granite owl
#

doesnt matter

#

must be 1.18.3

#

wait

hasty prawn
#

Is there more to that error? Perhaps under it.

granite owl
#

v1_8_R3

#

or maybe im just dumb

#

and someone else can read more off it

craggy sapphire
#

there is nothing under it but above when the same error happened it gave a bit more info

hasty prawn
#

Yeah send the one with more info.

craggy sapphire
granite owl
#

seems the error just crashes the entire callback

#

for all following plugins in order

hasty prawn
#

Send the Caused by that you cut off NoSleep

granite owl
#

and its caused by

arctic moth
#

what location within the chunk does chunk.getz() get

granite owl
#

KitPvP

arctic moth
#

is it the center or smth?

#

same for getx()

granite owl
#

ah

sacred mountain
arctic moth
granite owl
#

it gets the lower point

arctic moth
#

the corner?

granite owl
#

like coords are always 0,0,0 to 1,1,1 for a block

craggy sapphire
granite owl
#

so it gets u the lower corner

arctic moth
#

ok thx

sacred mountain
#

wdym vanilla cooldown btw timinator

granite owl
sacred mountain
hasty prawn
granite owl
craggy sapphire
#

yes it does but that scoreboard doesnt work because the title i put was too long so i just used another scoreboard plugin

granite owl
#

or like cooldown for

#

the next tick of that ability

hasty prawn
#

The full one, including the Caused By

craggy sapphire
#

if you look there is the error there

#

its just

#

a lot of text

sacred mountain
#

i posted the wrong error even

#

the actual error is some concurrent hashmap modification thing

#

how do i fix that

hasty prawn
sacred mountain
#

currentlt im using an iterator<string>

hasty prawn
#

OH wait I see now

#

I didn't realize I could scroll peepoGiggles

arctic moth
#

how do you check if a liquid is flowing

craggy sapphire
#

look in DMs ill send a picture of the console

#

i didnt cut the error off

#

it just

#

ended there

arctic moth
#

since stationary is deprecated

hasty prawn
#

I have a feeling it is still trying to set that scoreboard.

#

And it can't, so it's throwing errors.

#

If you're using another scoreboard plugin, just disable the KitPvP scoreboard, or replace the lines with something that isn't 32 characters

craggy sapphire
#

okay ill disable it and see what happens

#

1 second

#

i did /kill and my name and there was no error

#

but

#

im not sure if thats because im owner and op

#

my member player died

#

and it threw the erorr

#

ill log on an alt

#

and die

#

and see what happens

granite owl
#

dont the remapped jars contain those imports anymore? ```java
import com.mojang.authlib.GameProfile;
import org.bukkit.craftbukkit.v1_18_R3.entity.CraftPlayer;

arctic moth
#

how do i check what type of Fluid a block is?

tardy delta
#

i dont think so

arctic moth
#

im trying to see if its flowing

#

but the only thing i can find is the fluid enum

#

that has flowing

sand vector
#

check to see if the .getData() of the block is equal to 0

arctic moth
#

wdym

#

so without data, its a source block?

sand vector
#

If the liquid is a source block then .getData will return 0

#

anything else is flowing

#

if you get me

craggy sapphire
#

you literally

#

thank you

#

i dont know how

#

but that was the issue

hasty prawn
arctic moth
#

blockdata doesnt return 0

sand vector
#

Whats the best way to store lots of information about the player? I know you can just do yml files but is there any other way of doing it thats safer?

vocal cloud
#

using a database?

sand vector
#

what would be the best one tho

vocal cloud
#

There is no best database

#

you pick one that best suits your needs

sand vector
#

ah

low temple
#

Is there any way to check if a block is breakable by tnt?

sacred mountain
#

is yaml slower or faster than a database

#

like setring a value and changing it, maybe using it to store stats

vocal cloud
#

You really want to avoid loading/saving db values all the time. Either async saving, occasional saving, or using something like redis

#

YML stores everything in memory

ivory sleet
#

I mean yaml/yml is just a format language/syntax

vocal cloud
#

I assume most people are using the bukkit impl for it

ivory sleet
#

doesn't really have any notion of speed inherently

vocal cloud
#

It's disk read/write speed more or less

arctic moth
#

is there a blockstate for flowing?

granite owl
#

how can i import craftbukkit methods now that the shaded version must be used

arctic moth
arctic moth
#

so how do i distinguish between flowing and source liquids

granite owl
#

mhm

chrome beacon
#

?1.18

undone axleBOT
chrome beacon
#

Hm no

arctic moth
chrome beacon
#

Read the 1.18 release post on what to put in your pom

granite owl
#

idk yml sucks

#

i wrote my own parser

#

xD

#

i mean mine is bad too but it does what i want at least

hexed hatch
#

Is there not a getLocation(path) method in the config object

arctic moth
#

could block.getType().getKey() == Fluid.FLOWING_LAVA.getKey()

#

work

#

?

ivory sleet
vocal cloud
ivory sleet
#

I mean it doesnt totally suck

#

but they're definitely too ambitious in the aspects of flexibility

vocal cloud
#

Just use JSON like a regular human

ivory sleet
#

valid json is valid yaml tho

#

so you could say json is yaml to some extent

vocal cloud
#

Except better

ivory sleet
#

well depends

#

if you got json then its yaml as well

granite owl
ivory sleet
#

myeah a little bit

granite owl
#

and most of the time u dont even know whats representing waht

#

like ive said my ini parser is also far from perfect

#

but it does what i want at least

#

xD

ivory sleet
#

I mean you can make its ability to represent something as good as in json, or toml or even hocon

granite owl
#

i mean i love

#

how most vanilla stuff is stored in json

#

then we have the server.properties written in ini

#

spigot using yml

#

xD

vocal cloud
#

Databases are best for holding tonnes of stuff

#

configs don't really matter

granite owl
chrome beacon
#

SQLite config 💀

vocal cloud
#

Yes they do

#

but if you can't afford to run a database then you can't exactly afford to run an MC server either so shrug1

ivory sleet
granite owl
#

on a server of a host provider

#

blocking all binary code execution

ivory sleet
#

they might provide a db for you?

chrome beacon
#

Host providers usually give you a db. At least if you're using a decent one

vocal cloud
#

Then it sounds like the hosting provider is trash

granite owl
#

honestly about storing configs

#

i was always worried to store it wrong

#

until ive noticed that the server is using like 5 different formats anyway

ivory sleet
#

myeah nbt and snbt, then just properties and json which is from the default server jar, additionally bukkit chose yml, subsequently spigot, paper and all other forks use it

granite owl
#

dont forget that even it doesnt say it

#

server.properties is using the "default" ini format

#

although there is no real ini standard ofc

#

dont u use

#

this.getInstance() ?

ivory sleet
#

I mean he's probably accessing the plugin instance from another class

#

share more code

#

thats too little to go, we need the entire class principally

granite owl
#

this works guranteed

#

sec

#
private static void hellfireDamageSheduler(Entity e)
{
  if (e instanceof LivingEntity)
  {      
    new BukkitRunnable()
    {
      int i = 0;
                                    
      public void run()
      { 

        i++;            
        if (i >= 20 || target.isDead()) this.cancel();
      } 
    }.runTaskTimer(Main.getPlugin(Main.class), 0, 5);
  }
}
#

ive just removed all the stuff u dont need

#

almost

ivory sleet
#

that presupposes their main plugin class is named Main but sure

#

also spoonfeed bad bad

granite owl
#

sorry i mean

#

nvm

#

xD

#

that snipped is like 4years old

ivory sleet
#

Well literally that their java plugin derivative is named Main

#

nothing else

granite owl
#

havent touched it in ages

ivory sleet
#

fair but ye

granite owl
#

i like to run my shedulers that way

#

so i can make it tick dependend

#

and end it on condition

#

at the same time

ivory sleet
#

hmm yeah, I don't see any overall issue with what it does tbf

granite owl
#

iirc bukkit shedulers timing is set in ticks?

#

so 5 as param = 250ms?

#

xD

#

like ive said havent touched it in a long time

ivory sleet
#

yes

#

in best case

granite owl
#

yea^^

#

thats why i prefer delta timing

#

but that eats too much processing power

rough drift
#

So i need to create a Component to use with click events and stuff, however ComponentBuilder returns BaseComponent[] and that's deprecated, what other way can i do this?

ivory sleet
#

mye, Idk I distance myself from the BukkitScheduler since its a bit limited but ye

granite owl
#

i prefer doing tick based events like the callbacks

#

but some things

ivory sleet
#

observer pattern?

granite owl
#

like independent operating things like

#

firewaves

#

require multithreading

#

altough im not really sure the sheduler does actual multithreading

#

feels more like splitting cpu power

ivory sleet
#

well anyhow i tend to "adapt" the bukkit scheduler a bit

#

well it does

granite owl
#

and creating virtual threads rather than real

ivory sleet
#

because you have the async variants

#

which basically send the task to a cached thread pool

granite owl
#

yea but is async really multithreaded on a different core

#

?

ivory sleet
#

nope

granite owl
#

^^

ivory sleet
#

you cant ensure that

granite owl
#

is it capable to?

ivory sleet
#

but multithreading doesnt require more cores

#

concurrency is still a thing

granite owl
#

ik

ivory sleet
#

yes Java might opt in to use more than one core

#

altho the developer afaik cant explicitly specify that

#

not with the given std api at least

ivory sleet
#

cuz then yes, a ton of stuff is gonna be deprecated

#

but yes Timinator

#

this is also why testing multithreaded designs is excruciatingly painful

granite owl
#

^^

vast sapphire
#

How do I get a list of materials from the config and allow duplicate materials?

ivory sleet
#

like the way I have it is to just use 200 threads (Java threads) and repeat the test like 5 times

vast sapphire
#

I'm making a shop

granite owl
#

the guys asked me why i outsource some stuff to the global scale rather than local

#

but thing is

#

ram can be extended

ivory sleet
granite owl
#

a cpu core hits its limit at about 4.6ghz

#

xD

ivory sleet
#

x)

granite owl
vast sapphire
ivory sleet
granite owl
#

we arent required to do that actually

ivory sleet
granite owl
#

because we dont use user data comercially

#

and dont store any besides ip anyway

ivory sleet
#

cuz it looks like you want an Int2ObjMap czkn

granite owl
#

which is required as per anti crime law

#

xD

#

but we comply anyway just to be safe

ivory sleet
#

mye the laws isnt my field of expertise

granite owl
#

neither is it mine

arctic moth
granite owl
#

my name doesnt stand under the server contract

#

xD

#

i just do what the legally responsible guy tells me to

#

^^

arctic moth
ivory sleet
#

oh im blind

arctic moth
#

lol

#

arent we all

vast sapphire
arctic moth
#

so why cant i compile it

#

it normally works ive used this same pom with many projects (besides changing the name) and it worked fine

vast sapphire
vast sapphire
#

Do you need something specific in 17?/

arctic moth
#

no not rlly

ivory sleet
#

so tristan

#

did u change to 17 in project settings

#

equals mostly

vast sapphire
ivory sleet
#

oh

#

Well

arctic moth
ivory sleet
#

a Map<Integer,ItemStack> or sth could suit for this (or the superior alternative Int2ObjMap<ItemStack>)

vast sapphire
#

I had issues with slots getting replaced by duplicate material names

ivory sleet
#

ckzn

vast sapphire
#

Do i need the int?

ivory sleet
#

thing is you probably wanna track stuff primarily by slot

arctic moth
#

could this be the piece of shit thats been messing with me this whole time

#

in the iml

ivory sleet
#

oh

#

interesting maven depends on that when on intellij

arctic moth
ivory sleet
#

oh thats easier

#

Settings -> Build, Exec... -> Compiler -> Java Compiler

#

and set it to 17 I believe

#

bytecode ver that is

arctic moth
ivory sleet
#

File -> Settings

arctic moth
#

oh wait submenu on the side

ivory sleet
#

ye

#

lol

arctic moth
#

so i have to change the version again lol

#

oh cool

#

ok now it works thx :)

#

why does this not do anything

((Levelled) event.getBlock().getState()).setLevel(0);

is there some kind of setState() or smth?

quaint mantle
#

BlockState#update

arctic moth
#

ok

#

thx

arctic moth
ivory sleet
#

imagine btw, hit 60k msgs :3

quaint mantle
#

im 2.3k away

ivory sleet
#

hehe

quaint mantle
#

i remember when i was the most active in the server

arctic moth
#

im using blockfromtoevent

quaint mantle
#

then i got a life 😔

ivory sleet
#

I mean thats nice?

#

Idk who's even most active here tbf

quaint mantle
#

opticfusion imo

#

or mfnalex

arctic moth
#

ok so apparently isLiquid doesnt work on water

#

that makes sense

quaint mantle
#

why not?

arctic moth
#

...

quaint mantle
#

did you debug it

arctic moth
#

idk

#

yes

arctic moth
ivory sleet
arctic moth
#

so wtf is going on

#

maybe the getToBlock() is before it actually changes?

quaint mantle
#

wouldnt make sense

arctic moth
#

ik

#

but how is water not a liquid

#

lol

quaint mantle
#

it is

#

your ordering just must be messed up

arctic moth
#

thats before the other lines run

#

ok so smh water is air

#

so it is before it updates ig

#

ok so if i run it in a runnable it works

#

and then why is levelling not castable

arctic moth
#

but its still not castable tot Levelled

sand vector
#

ok still a bit confused by what to use however would yml be more than enough to store all uuid and loads of info in one file? I find making a file is easier than more code for all the sql/ mongodb.

#

or is it best to just go with a database. Just struggling to choose and setup seems too complicated for what its purpose is for (having a big brain fart)

vocal cloud
#

Can you? Yes. Should you? Maybe.

ivory sleet
#

kianj I'd at least split it up to a user per file

vocal cloud
#

The thing is with YML is it'll all be stored in memory.

ivory sleet
#

and a normal flat file storage can be fine altho its not really reliable nor scalable, but for mocking it might be fine

ivory sleet
vocal cloud
#

Can you only half load a yml config?

ivory sleet
#

in principle yes but that'd lead to corruption probably

#

bukkit just wraps a yaml snake parser instance and uses it for loading/saving

#

the actual data when stored in memory doesn't have any strong coupling towards yaml specifically

#

its literally just a glorified linked hash map

sand vector
#

ok, so for the long run a database is the better option.

ivory sleet
#

yes

#

and generally speaking you could go with flatfile initially but it can be a bit painful to convert

#

altho its doable

sand vector
#

The only other really big thing for me is can you constantly read and write to databases? because ideally I want to have cooldowns and other short term things aswell as kills, money etc

ivory sleet
#

nah dont do that

#

you cache stuff

#

like in memory

#

such that accessing data you use frequently becomes relatively cheap in terms of speed

#

and by cache I mean, creating classes encapsulating data, then having a map or something to make it accessible (transferable and indexable)

sand vector
#

im not too sure if I understand fully as i've never looked into this side but have a file/s holding all the players data and when they log out after a period of time that data is then added to the database

#

then if the player doesnt have an existing file it creates one and adds all the info to that file from the database. If this isn't the correct way how would you do it and how would you cache stuff? @ me

pliant oyster
#

How can I show text or something above a players head?

#

in a vanilla world with commands, you can do that with scoreboard

#

but how do I do it in code

vocal cloud
#

If you can do it in Vanilla you can do it in Spigot

pliant oyster
#

Yeah so do I just create a scoreboard?

vocal cloud
#

I don't know. You'd have to do the research on it

pliant oyster
#

Well that's why I'm asking here xD

#

I couldnt find anything on google abt it

#

ohh wait

#

nvm I got it

#

nvm I dont got it breh

#

Ok so I got a scoreboard below name to work

#

but how do I make it so it's only below a single entities name

#

not everyones

vague oracle
#

Idk if this is correct but im pretty sure you can only do that with packets (Unless some new Api methods came out)

pliant oyster
#

oof

#

Idk how packets work

#

I cba to learn it for a single thingy

vague oracle
#

this might work idk what this does havent tested it

pliant oyster
#

@vague oracle How do I do it with packets

summer scroll
#

Can you somehow slowing fire spread rate?

vague oracle
#

Use BlockSpreadEvent and if its fire maybe generate a random boolean and if true cancel the event

#

or if you don't want 50/50 use random numbers

summer scroll
#

Ah okay, didn't knoe that exist.

#

Thank you so much!

summer scroll
vague oracle
#

idk 😦 never used it just know the event exists

Called when a block spreads based on world conditions.
Use BlockFormEvent to catch blocks that "randomly" form instead of actually spread.

Examples:

Mushrooms spreading.
Fire spreading.
If a Block Spread event is cancelled, the block will not spread.
#

thats all I got xD

summer scroll
#

Yeah I've read that too. I'm just gonna test it later, thanks anyways!

desert musk
#

the EntityX isnt a class for me

#

public class CustomZombie extends EntityZombie

vague oracle
#

You need to have a jar with craftbukkit embedded into it

quaint mantle
#

spigot it's legit to use discord api for a discord bot to receive messages form server mc?

vague oracle
glass inlet
#

I have a question about bungeecord, can player intercept plugin messages? I'm asking about security of plugin messaging.

dusk flicker
#

I'm no expert on PMCs but I wouldent send any secure data across anything like that

patent horizon
#

if i want to run a task every 5 minutes, which field do i change?

dusk flicker
#

?scheduling

undone axleBOT
dusk flicker
#

So you would want to change the period in your case