#help-development

1 messages · Page 251 of 1

tender shard
#

you print out "delta" but you check "lastClick"

#

those are two totally unrelated variables

minor garnet
#

this is so stranger..

tender shard
#

print out lastClick instead of printing out delta

minor garnet
#

this value is being modified elsewhere

#

but nvm ty

tender shard
#

print out lastClick and you'll see why lastClick is not between 0.19 and 0.21

minor garnet
#

yee

tender shard
#

because it's probably 918526175 or sth lol

#

wow great. now gradle does not include ANY .class file in my .jar

#

what the fuck

#

okay I'll commit it now, maybe someone has any ideas

quiet ice
#

Would I need to spend hours running BT in order to test the output?

tender shard
#

you simply go into the Example-Plugin folder, all dependencies are declared in proper repos in the build.gradle

#

it should work right out of the box. except for the fact that it doesn't work ofc lol

quiet ice
#

Time to copy over the gradle wrapper files and go bug hunting

tardy delta
#

go bug hunting over my parser lmao

tender shard
#

I've been spending an hour on this now lol

tender shard
quiet ice
#

I sadly have very few gradle projects made by myself these days (most of them have been migrated to in-house buildchains), and no using minimize and relocations

tender shard
#

damn

#

yeah somehow noone knows how it works lol

quiet ice
#

It's the include directive I guess

tender shard
#

yeah but it says "include" so AT LEAST those things should be there, right?! 😄

quiet ice
#

Whatever you want to do, you don't want to use that keyword

tender shard
#

but I need to specify that minimize() should ignore certain classes from being excluded

remote swallow
#

Did someone say gradle

tender shard
#

yes

quiet ice
tender shard
#

I also fucking hate how the minimize() option has an exclude option, but not include? like wtf, why would someone EXCLUDE something from minimize? It should have an INCLUDE option, not EXCLUDE

tender shard
#

I found the solution

#

you have to EXCLUDE classes in minimize to make them INCLUDED

#
shadowJar {
    relocate('com.jeff_media.jefflib', 'me.username.jefflib')
    minimize {
        exclude 'com/jeff_media/jefflib/internal/nms/**'
    }
}
#

that's the most stupid naming scheme ever

#

I have to EXCLUDE stuff from being EXCLUDED

quiet ice
#

Include means whitelist, exclude means blacklist

tender shard
#

yeah that's quite stupid imho

#

instead of !false, why not just use true

quiet ice
#

that is the most sensical naming scheme ever...

tender shard
#

"include" should ALWAYS include the mentioned files

#

I want to INCLUDE those files in the .jar so I tell "minimizeJar" to "include" them

quiet ice
#

Yes, and as the default is to include everything, and that default does not make sense if there is at least one include thingy, so it throws away the default

tender shard
#

well anyway, thanks, it's working now 😄 and as always in gradle, only took 1.5 hours to find the solution

#

the idea is basically "if you want to include something in the .jar, then add it to the exlude section"

quiet ice
#

The idea actually is "if you want to exclude something from the minimize process you exclude it"

tender shard
#

I know

#

but that's just ridiculous

#

excluding it from that process makes it included in the .jar

quiet ice
#

Consider relocate/minimize as sub-tasks - which doesn't make all too much sense but that is gradle for ya

tender shard
#

yeah I know the reason behind it, it just makes no sense to the reader of a build.gradle file on first glance

#

it could also just be other way around

#

for example like this, it works except for the relocation ```gradle
shadowJar {
relocate('com.jeff_media.jefflib', 'me.username.jefflib') {
include 'com/jeff_media/jefflib/internal/nms/**'
}
minimize()
}

#

I use "include" and "minimize()" and it works as expected

#

when moving the include into the minimize() thing, expecting it to the same thing, it now does the opposite

#

that's stupid

quiet ice
#

I never use minimize (be it in maven, gradle or elsewhere) due to that fragility

nimble zinc
#

Hello! I'm trying to serialize a list of objects from my config file, but I can't manage to do it. I guess the problem comes from the fact that objects are in a list and the list is not serialized, is that correct ? How can I fix this easily (maybe without making a serializable list class ?)

Here is the config:

# Setup cooldowns for commands here
cooldowns:
  - expression: 'nation leave'
    duration: 1m 30s
    aliases:
      - 'n leave'

And here is the code that causes problem:

private static void SetupCommandCooldowns()
    {
      List<Object> list = (ArrayList<Object>) KokiriaSettings.getCooldownsConfig().getList("cooldowns");
        for (Object obj : list)
        {
            CooldownableCommand cooldownableCommand = (CooldownableCommand) obj;

Error:

java.lang.ClassCastException: class java.util.LinkedHashMap cannot be cast to class net.dgwave.kokiria.objects.CooldownableCommand (java.util.LinkedHashMap is in module java.base of loader 'bootstrap'; net.dgwave.kokiria.objects.CooldownableCommand is in unnamed module of loader 'Kokiria.jar' @2e647244)
    at net.dgwave.kokiria.modules.CommandCooldowns.SetupCommandCooldowns(CommandCooldowns.java:35) ~[Kokiria.jar:?]```
#

My serializable class:

@SerializableAs("CooldownableCommand")
public class CooldownableCommand extends SavedCommand implements ConfigurationSerializable {

    double duration;

    public CooldownableCommand(String expression, List<String> aliases, double duration) {
        super(expression, aliases);
        this.duration = duration;
    }

    public CooldownableCommand(Map<String, Object> args) {

        String expression = "";
        List<String> aliases = new ArrayList<>();
        double duration = 0;

        if (args.containsKey("expression")) {
            expression = ((String) args.get("expression"));
        }

        if (args.containsKey("aliases")) {
            aliases = (List<String>) args.get("aliases");
        }

        if (args.containsKey("duration")) {
            duration = ((Double) args.get("duration"));
        }

        this.expression = expression;
        this.aliases = aliases;
        this.duration = duration;

    }

    public double getDuration()
    {
        return duration;
    }

    public static CooldownableCommand deserialize(LinkedHashMap<String, Object> args) {
        String expression = "";
        List<String> aliases = new ArrayList<>();
        double duration = 0;

        if (args.containsKey("expression")) {
            expression = ((String) args.get("expression"));
        }

        if (args.containsKey("aliases")) {
            aliases = (List<String>) args.get("aliases");
        }

        if (args.containsKey("duration")) {
            duration = ((Double) args.get("duration"));
        }


        return new CooldownableCommand(expression, aliases, duration);
    }

    @Override
    public Map<String, Object> serialize() {
        LinkedHashMap<String, Object> result = new LinkedHashMap<String, Object>();
        result.put("expression", this.expression);
        result.put("duration", this.duration);
        result.put("aliases", aliases.toArray());
        return result;
    }
}
tardy delta
#

please dont check contains and then get

#

you didnt do config.set("some-key", cooldownobject) too

#

you just set a list of config sections

nimble zinc
#

Oh ok I see

tardy delta
#

call get, assign it to a local variable and check if its not null

nimble zinc
#

That's not the issue here though, right ?

nimble zinc
#

If I could get these values without serialization that would be good too, I just can't find a way to access values inside a list.

orchid gazelle
#

//push another one

nimble zinc
#

something like config.getList("cooldowns)[0].getFloat("duration")

eternal oxide
#

List are indexed, they don't have keys

nimble zinc
#

I mean it's an example, but my list is a list of objects

eternal oxide
#

you tried to use .getFloat on the returned object

#

you have to cast it to whatever object it is first

nimble zinc
#
# Setup cooldowns for commands here
cooldowns:
  - expression: 'nation leave'
    duration: 1m 30s
    aliases:
      - 'n leave'
  - expression: 'nation join'
    duration: 1m 30s
    aliases:
      - 'n join'
eternal oxide
#

that is a List of Maps

nimble zinc
#

What kind of object does the List returned by getList contain ?

tardy delta
#

did you register that class as being serializable?

tardy delta
#

and are you even calling set with your custom object?

#

im not talking about extends configserializable

nimble zinc
#

No I didn't call set, I assumed it would be serialized like this in the config. I'll try with set, but is there a way to get it from config without serialization ?

eternal oxide
#

a serialized object set in teh config would not look like that

tardy delta
#

how are you setting your object to config then? manually setting all primitives?

nimble zinc
#

Okay thanks that 's the issue then

nimble zinc
eternal oxide
#

Object

minor fox
#

Does anyone have experience with removing smoke particles from a wither entity?

eternal oxide
#

a generic untyped Object

nimble zinc
#

Can I cast them to anything else ?

#

Like Map

eternal oxide
#

yes, with a warning

nimble zinc
#

In the case of the config.yml I sent above, could I cast config.getList("cooldowns")[0] to a map or something

#

So that I can get the values of "expression", "duration" etc

eternal oxide
#

yes

tardy delta
#
List<CustomCooldown> cooldowns = config.getList("cooldowns", CustomCooldown.class /* idk if this is a thing */);
cooldowns.add(new CustomCooldown(1));
config.set("cooldowns", cooldowns);```
#

dunno why its a list and not a map tho

#

and use ConfigurationSerialization.registerClass(CustomCooldown.class)

#

in a static block would be the best thing

nimble zinc
eternal oxide
#

yes

nimble zinc
#

Alright I'll try this, thanks for your help everyone

solid cargo
#

i dont have the capability to test the following rn so could you answer the following?:
Does PlayerCommandPreProcessEvent also disable bungeecord messages??

#

nvm, solved it myself

remote swallow
#

why are you trying to type enum things in a normal class

#

in an enum

#

public enum not public class

#

?learnjava

undone axleBOT
tardy delta
#

dont think you should hardcode those locations

remote swallow
#

what version

#

minecraft

rotund ravine
#

You’re using the API version and not the full version

remote swallow
#

the gameprofile lib only got added in 1.18 iirc

#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

remote swallow
#

for 1.12 add

<repositories>
        <repository>
            <id>minecraft-repo</id>
            <url>https://libraries.minecraft.net/</url>
        </repository>
</repositories>
<dependencies>
        <dependency>
            <groupId>com.mojang</groupId>
            <artifactId>authlib</artifactId>
            <version>1.5.21</version>
            <scope>provided</scope>
        </dependency>
</dependencies>
rotund ravine
#

Remove -api

#

Did you build it with buildtools?

#

Do that

stoic vigil
#

is there an event, if a player jumps while falling / in the air? so such as an elytra start but without an elytra or smth on?

opal juniper
#

you could see if the jump thing works? It is the statistic increase event

tardy delta
#

me being sad cuz i added three lines of code which cause extra overhead

nimble zinc
#

Hi! I'm trying to set cooldowns for commands coming from other plugins. Is there a way to check if a command has been executed or not (for example, when trying to go spawn while in not allowed zone, command wouldn't be executed, so I don't want to add cooldown for the player). Maybe plugins send message error to players that we can detect, idk ? (I'm guessing there is no solution but we never know)

river oracle
#

PlayerCommandPreProcessEvent? seems like a viable solution

vocal cloud
#

Depends which plugin but it's easily doable

nimble zinc
river oracle
vocal cloud
#

Which plugins? All plugins? Or specific plugins

nimble zinc
#

When plugin sends message to player to tell him that command did not executed, can it not be detected ?

#

No specific plugin

vocal cloud
#

So all plugins

river oracle
#

wait couldn't you use reflection to get into the command map and then attempt to find the plugins commands

nimble zinc
#

Yes

vocal cloud
#

That's going to lead to a disaster

nimble zinc
#

For example, if I use /tpa Y2K
and Y2K refuses the tp, can it be detected ?

river oracle
#

not easily if at all

#

the only solutions to this are hacky or plugin specific

vocal cloud
#

Just use a plugin that has cooldowns

nimble zinc
#

I could check the color of the message lol and assume red is error

nimble zinc
#

But for Towny for example some commands don't have cooldown

#

Towny has an API anyway but I wanted an easy way to add cooldown to any command

#

I just wanted to be sure that I wasn't missing some "player.senderrormessage" thing

vocal cloud
#

Why would they need to?

#

Also isn't towny open source? I imagine you could build a custom version quite easily with cooldowns

eternal oxide
#

add your cooldowns in the pre event

#

if on cooldown, cancel and give a message

potent ibex
#

Hi guys, I'm building a plugin that can save the last location of players before they teleport to different world.

#

For example, if they were at coordinate (0, 10, 0) in world_survival, it will save the coordinate when player teleport to world_nether

#

and when player teleport back to world_survival, plugin will teleport player to the saved coordinate

#

I currently have no idea how to build this mechanism

last sleet
#

Is EntityDamageByEntity or EntityDamage event called first? In other words, if I modify the damage in the first event and then get it in the second, will it be the modified damage?

#

Or are there any ways to force event priorities?

worldly ingot
#

Fun little secret, neither are called first

#

When an EntityDamageByEntityEvent is called, EntityDamageEvent listeners are also invoked

#

The latter extends the former, so by hierarchy they're both called at the same time

#

If you're listening to EDBEE, you're just listening to a very specific type of EDE

last sleet
#

okay

worldly ingot
#

TL;DR: It still boils down to your EventPriority

last sleet
#

Then I guess I should do everything in one EDE to minimize risks

last sleet
#

you can set that?

worldly ingot
#

You can, yeah. In the annotation

@EventHandler(priority = EventPriority.LOW)
public void yourListener(EntityDamageEvent event) {

}```
remote swallow
#

@EventHandler(priority = EventPriority.LEVEL)

last sleet
#

oh

#

Nice

#

thanks !

worldly ingot
#

LOWEST called first, HIGHEST* called last

remote swallow
#

whats monitor for

worldly ingot
#

monitoring the result of an event

#

Say a block logging plugin

remote swallow
#

ah

worldly ingot
#

(that's why I said "HIGHEST***** called last", because MONITOR is actually called last)

#

If you're changing the event or world in any way, you should not be doing it in MONITOR

remote swallow
#

im guessing that would be used in chat to discord log stuff

worldly ingot
#

Another good use case for it, yes

nimble zinc
remote swallow
#

technically there isnt an actual way to check if the command passed or not because not every one uses return false, they return true and send their own message

nimble zinc
#

If assuming they return false ?

#

Is there a way to get the boolean value ?

rotund ravine
#

It already does

nimble zinc
#

?

#

What do they do with the returned value

#

I mean, it's a way to make the player perform the command, it's not called when the player sends a command by message

#

Or if it is, how can I get the result ?

indigo iron
#

?paste

undone axleBOT
indigo iron
remote swallow
#

Caused by: java.lang.ClassCastException: class java.lang.Double cannot be cast to class java.lang.Integer

#

at me.kingchoices.AncientWorld.Events.BlockBreak.onBreak(BlockBreak.java:29)

hazy parrot
#

You can just use Double#intValue

indigo iron
hazy parrot
#

I should definetly start to read conversations

indigo iron
#

still printing 0.0 instead of the 5 im adding in it

eternal oxide
#

5.0d + playergold

#

as yoru playergold is a Double and not a double

indigo iron
delicate lynx
#

5.0d not 5d

indigo iron
last sleet
potent ibex
#

how?

eternal oxide
last sleet
# potent ibex how?

I've got a utility PDC class I made, you can use it in to store locations (in a stringified form) in a player

indigo iron
indigo iron
last sleet
#

here you go

eternal oxide
potent ibex
#

umm..okay

indigo iron
last sleet
#

just use pdc.set(player, key, location), key bring a String, and location being a stringified form of a Location object

#

and pdc.get(player, key) to get it back ^^

potent ibex
#

where should I import the pdc

#

to my main?

last sleet
#

no, make a separate class and put it there (to avoid confusion and keeping code clean)

potent ibex
#

I see

last sleet
#

here's how I do it

#

It's a bit messy, but in the end, it works

remote swallow
hazy parrot
#

?namingconventions

last sleet
#

XD

hazy parrot
#

Ig no

remote swallow
#

?convetions

#

?conventions

remote swallow
#

upper camel case for class names

last sleet
#

conventions bad tho

#

xd

potent ibex
#

almost there but then this pops up

remote swallow
#

?di

undone axleBOT
potent ibex
#

didn't get it

#

🤔

indigo iron
remote swallow
#
public class MyClassName {
    private final MainClassName plugin;

    public MyClassName(MainClassNme plugin) { 
      this.plugin = plugin;
    }
}
#

@potent ibex

potent ibex
#

hmm okay

remote swallow
#

also from my short attempt at json you shouldnt need to save

indigo iron
remote swallow
#

yeah, i would give file writer a go and see if that makes it write to the file

fervent panther
#

I'm trying to make a throwable dagger and it works fine, but the armorstand hitbox is causing problems. Any idea how to avoid this? If I set it to marker, velocity doesn't do anything

potent ibex
#

how do I register other plugin's placeholder in my own plugin?

remote swallow
#

with placeholder api?

potent ibex
#

I just want to show %online player% when mouse hover to certain icon in UI

#

yea

remote swallow
potent ibex
#

I did this step

#

but still have no idea to use placeholders

remote swallow
#

check the PlaceholderAPI. methods

#

if you just need online_players check the Bukkit.getOnlinePlayers().size(); method

potent ibex
#

🤔

sterile token
#

I having some issues with my command flow, for some reason the server is telling me that the command i created was not found but only happen when i dont have the permissions - To clarify my command flow register them thru spigot command map

#

I have added many debugg messages but i cannot understand what is happening

potent ibex
#

for instance, if you mouseover to grassblock icon in UI, its lore should includes %some placeholder%

remote swallow
#

meta.setLore(Arrays.asList("ur name: " + PlaceholderAPI.setPlaceholders(player, "%player_name%"))

potent ibex
#

Ahmm..

#

how do you add that statement in here

#
        ItemStack stack = new ItemStack(type, amount);
        ItemMeta meta = stack.getItemMeta();
        meta.setDisplayName(name);
        meta.setLore(Arrays.asList(lore));
        stack.setItemMeta(meta);
        return stack;
    }
remote swallow
#

add a comma after lore

#

then the "ur name: " + PlaceholderAPI.setPlaceholders(player, "%player_name%"

potent ibex
#

the placeholderapi part works but player part doesn't work

#

cannot resolve symbol player

remote swallow
#

you would need a player instance

potent ibex
#

woah.. it's so complicated

remote swallow
#

not really

potent ibex
#

how would I add player instance?

remote swallow
#

add Player player to the method constructor

#

then add a player instance to the where you call the method

potent ibex
#
    private static ItemStack buildItem(Material type, int amount, String name, String... lore) {
        Player player
        ItemStack stack = new ItemStack(type, amount);
        ItemMeta meta = stack.getItemMeta();
        meta.setDisplayName(name);
        meta.setLore(Arrays.asList(lore, " " + PlaceholderAPI.setPlaceholders(player, "%player_name%"));
        stack.setItemMeta(meta);
        return stack;
    }
#

something like this?

remote swallow
#

thats not the constructor

#
  private static ItemStack buildItem(Player player, Material type, int amount, String name, String... lore) {
        ItemStack stack = new ItemStack(type, amount);
        ItemMeta meta = stack.getItemMeta();
        meta.setDisplayName(name);
        meta.setLore(Arrays.asList(lore, " " + PlaceholderAPI.setPlaceholders(player, "%player_name%"));
        stack.setItemMeta(meta);
        return stack;
    }
potent ibex
#

Cannot resolve method 'buildItem(Material, int, String, String, String)'

#

player part would work but the other codes get messed up

remote swallow
#

you need to add a player instance to where you call that method

potent ibex
#

idk it just brings another error

#

here's the entire code

remote swallow
#

you cant have a placeholder there then

#

you would have to get the placeholder some other way

#

placecholder api requires a player instance to get the placeholder return

jagged monolith
#

Do you really need a playerholder there, just use player.getName()

potent ibex
#

player name was just an example

remote swallow
summer scroll
#

Can someone tell me what is the minimum/maximum world height in the latest version please?

potent ibex
#

I actually need placeholder for # of online player in particular world

remote swallow
remote swallow
#

?google

undone axleBOT
summer scroll
potent ibex
remote swallow
#

lore, String.valueOf(Bukkit.getWorld("worldname").getPlayers().size();)

#

?basics

undone axleBOT
potent ibex
#

I should rly study java before plugin 😂

jagged monolith
#

?learnjava!

undone axleBOT
river oracle
remote swallow
nimble zinc
#

Hi, is there an easy way to keep a chunk loaded for X seconds ?

#

Will world.loadChunk keep the chunk loaded more than 1 tick and if so for how long ?

wet breach
kind hatch
#

@wet breach It's back. 😭
At this point, I probably need to rewrite those connection classes. Like, this has to be something with my code at this point.

wet breach
#

Loaddatabase line106

#

Probably missed something. But yes highly recommend rewriting so that every method isn't doing its own connection

#

Would also recommend a method responsible for doing the query part too because you don't really need all them methods having that either. Just need to feed the query you want it to do

#

So this should only leave 2 methods that have try blocks for anything possibly 3

kind hatch
#

Is there a way to do that so I can still access the ResultSet? I know I can return a ResultSet, but it needs an open connection to read it for some reason.

wet breach
#

Not counting initialization chexks

wet breach
#

Not home right now. Currently at work. Is your code on GitHub?

kind hatch
#

GitLab

#

I'll have to push the changes.

wet breach
#

Ah. Well I can pull it later and help make changes

#

When I am home

kind hatch
wet breach
#

@wet breach

#

Tagging myself to find it later lol

kind hatch
#

:p

nimble zinc
#

I read somewhere in the bukkit docs that chunk would only be unloaded if requested manually after world.loadChunk

wet breach
nimble zinc
#

Alright thanks

boreal sparrow
#

What's the easiest way to seperate the online players into four "groups" (I already have a team method and object etc. set up) using a for loop?

#

Note: I already made sure the number of online players will always be divisible by four

crimson terrace
#

you get all the players and forEach through them

#

maybe Collections.shuffle them first

kind hatch
#

You could sublist.

hazy parrot
boreal sparrow
#

i got a really crap solution but i mean:

int i = 0;
                for(Player p : Bukkit.getOnlinePlayers()){
                    int playercount = Bukkit.getOnlinePlayers().size();
                    if(i < playercount*0.25){
                        //add to team 1
                    }
                    else if (i < playercount*0.5){
                        //add to team 2
                    }

                    else if (i < playercount*0.75){
                        //add to team 3
                    }
                    else{
                        //add to team 4
                    }
                }
#

since it will always be divisible by four this should work

crimson terrace
boreal sparrow
#

oh yea

#

thanks

crimson terrace
#

then you dont need it to be 4 at all times

torn shuttle
#

oh god I am stuck in the html center align memescape again

#

ah of course it was bootstrap again

#

I might have to get rid of bootstrap

chrome beacon
#

Tailwind ❤️

torn shuttle
#

I should probably just not use a framework or something

chrome beacon
#

Tailwind is great. Highly recommend

torn shuttle
#

every time I get stuck on something it's because some framework is overriding something in the backend without me realizing it

molten hearth
#

Put !important on all custom css lol

torn shuttle
#

I'm pulling bootstrap off wish me luck

molten hearth
#

F

#

Gl

#

I use bulma usually

torn shuttle
#

next you'll be telling you also use ligma

molten hearth
#

Tailwind is weird looking by default and the docs kinda sucked their examples always use a quadrillion classes

#

But if you're willing to give elements a hundred classes it's pretty gud

torn shuttle
#

I really don't want to do that because I am declaring every element via js

molten hearth
#

Lmao

molten hearth
#

Relatable

chrome beacon
#

At least use Vue or smth

molten hearth
#

I hate jsx so I write my elements with JS

torn shuttle
#

it's a webapp so I need a lot of custom generated stuff to be happening all the time

ivory sleet
#

Svelte (:

torn shuttle
#

I was using templates but then I got 3k lines of templates and found myself having to copy paste hundreds of elements

molten hearth
#

lmao yeah

torn shuttle
#

but yeah I am done doing this with styles that I do not know what they do in the backend, I don't even particularly need complex styling

molten hearth
#

average template experience

#

do you have the website public?

torn shuttle
#

yes

molten hearth
#

share

#

🔫

torn shuttle
molten hearth
#

I remember once found myself re-creating some premium plugin's web backend to test my programming skills

#

nice

#

AH BRUH

#

why is it so goofy

onyx fjord
#

chug_jug.mp3

torn shuttle
#

ayy

#

1 in 1000 chance to play

onyx fjord
#

nah im just digging in files of your webapp

molten hearth
torn shuttle
#

autofill suggestions

#

how bad of an idea is it to make this responsive by using a percentual width and a percentual left margin?

#

because it seems to work

onyx fjord
#

wdym

torn shuttle
#
.container{
    width: 50%;
    margin-left: 25%;
}
#

sorta seems to work

vast kelp
#

Should be fine long as no-one tries to view it on a pez dispenser

torn shuttle
#

damn that's my core audience

onyx fjord
#

top right sound better tho

torn shuttle
#

why?

onyx fjord
#

muscle memory for me for example

molten hearth
#

this is as sane as people who do css top: 50%; bottom: 50%; left: 50%; right: 50%;

torn shuttle
#

wait top right what

onyx fjord
#

buttons

#

like on window decorations

torn shuttle
#

oh nothing in the screenshot that I posted is correct aside from the fact that the card itself is in the middle

#

I just yoinked bootstrap out so now I have to go back and reapply the same styles but without bootstrap

onyx fjord
#

ah the main container?

torn shuttle
#

yeah

#

everything just defaulted to getting center aligned

onyx fjord
#

why does it have col-5 on it?

torn shuttle
#

because bootstrap was in it up until a few minutes ago

onyx fjord
#

bootstrap is ass fr

torn shuttle
#

as far as I am concerned, bootstrap is like jquery, a poisoned apple

onyx fjord
#

its just not flexible

#

!important

torn shuttle
#

a shortcut to doing something real quickly but the second you need complexity you realize you don't know enough about the inner workings and it becomes a struggle to figure out why the behavior you are expecting isn't happening

onyx fjord
#

tbh even custom css is easier than bootstrap

torn shuttle
#

I started using bootstrap because it made me not have to think too much about the look of individual elements of the page, I'm not a designer nor do I aspire to become one

molten hearth
#

bootstrap is just not it

#

it also looks quite ugly

torn shuttle
#

it looks like a website

molten hearth
#

no

#

there is a difference between this

#

and this

#

with bootstrap you are essentially in between

#

but more towards the first

#

the first looks like it could be rendered in a terminal lol

torn shuttle
#

so I'm between a website from 98 by some dude and a website designed by a mutlitrillion dollar corporation?

#

damn that's pretty good

#

maybe I should sell my website

molten hearth
#

i guess but some dude on codepen with 2 free hours can do the same too

#

also I dont think this company is very successful

#

it hasnt been updated in 3 years and they removed the apple logo probably due to copyright

#

there is also no company info when you google it

torn shuttle
#

and picasso could make a drawing worth several millions of dollars in just a few minutes, just because someone can do it quickly doesn't mean you can replicate their skill just as fast

molten hearth
#

there is however a dictionary description for "runlet" lol

molten hearth
#

people sell fake picasso paintings to bozos

torn shuttle
#

I doubt the people faking them are taking as long as picasso did to replicate his style

molten hearth
#

they're not they're taking a lot less time

#

im sure its easier when you're copying and not using your imagination lol

torn shuttle
#

yeah for sure, art forgery is a fast and easy process with no effort put into it

#

I was thinking about using my printer to start doing it myself

molten hearth
#

lmao

#

idk maybe if you find some blind grandma you can sell her a picture

#

but painting it prolly takes a bit of time

#

just do it over and over and ez

molten hearth
#

@torn shuttle what do you think about this framework

torn shuttle
onyx fjord
#

Do wider container

torn shuttle
#

still trying to figure out what's up with the container getting shorter but it's well on its way

onyx fjord
#

I generally aim for 1280px wide

molten hearth
#

just become a padding enjoyer

#

what like this? @onyx fjord

#

i feel like there's too much space lol

onyx fjord
#

Now something needs to be done with green buttons

onyx fjord
#

One way is to add image behind each button and by that making it wider and taller

#

Another way is to use a drop-down perhaps

molten hearth
#

I would personally just display an icon for each category

#

one of those images from that one site maybe

#

I forgot the name

#

they made buycraft icons

#

CRAFTILLDAWN

#

do they still exist

onyx fjord
#

I don't have codepen near me so can't visualize for you

molten hearth
#

near you?

onyx fjord
#

Yeah no codepens unfortunately

molten hearth
#

oh

onyx fjord
#

Yk how coding on phone is

molten hearth
#

tru

torn shuttle
#

man why the hell is my toolbar like 15 pixels too wide

kind hatch
#

CSS?

torn shuttle
#

it has no padding, it has no margin

kind hatch
#

border?

torn shuttle
#

sure but the top one aligns just fine

kind hatch
#

Is that second one inside of a container div?

torn shuttle
#

hm I think it might be my row css but it's just set to 100%

kind hatch
#

The width?

torn shuttle
#

like how can it even overdraw from 100%

#

yeah

tardy delta
#

is that bootstrap?

kind hatch
#

is this a public site?

torn shuttle
#

not bootstrap anymore, code is not currently live because the page is too unfinished

tardy delta
#

we learnt workin with bootstrap today lol

torn shuttle
#

I dropped bootstrap earlier, it was causing too many issues

onyx fjord
#

Pain

kind hatch
torn shuttle
#

well the screenshot shows it's overdrawing

kind hatch
torn shuttle
#

I would like to but this is like a small detail on what is becoming a very large nearly pure js project

#

it probably wouldn't run anyway because I was relying on page requests to load some of the content so technically it sources templates from multiple pages

kind hatch
#

Hmm, you think you could ?paste the html and css relating to that section?

torn shuttle
#

because I was in the middle of redoing the entire project 50% of the code is across 15 html pages and 50% is across 15 js pages which create page elements so I'm not sure it will help

kind hatch
#

Ohhh.

torn shuttle
#

I think I narrowed it down to it being my row class

#

oh

#

yeah I got it

#

it's two things, the border is thicker which would be almost entire fine except the content is aligned using margin-left 50% so when the borders are of different thicknesses the difference builds up to that offset

#

I guess I'll stick to using the same border width, I don't know that I will find a better way of center aligning these in a way that is responsive without it being a headache

kind hatch
#

Are you using a css reset file?

torn shuttle
#

reset?

#

actually hold on this is a part of the issue but it's not even the whole thing

kind hatch
#

Basically some css at the top of the of the file that removes the default styling of the browser elements. It's also common to change the box-sizing property, since it gives you better control over styling.

torn shuttle
#

no

kind hatch
#

Well, there is a property called box-sizing that is responsible for the calculations of an element's width and height. By default, it includes the padding and border as part of the calculations, which an lead to some elements looking bigger than what they should be.

torn shuttle
#

oh now this is interesting

#

I think I found the actual issue

#

when I apply the border to the bottom box it eats up inner space but when I apply it to the top box it expands outwards

kind hatch
#

If you set box-sizing: border-box;, it will ignore the padding as it starts it calculation at the border instead of at the content box.

torn shuttle
#

how do I define if the border expands outwards or inwards?

kind hatch
#

See, it's been so long since I've used the default stylings, I've forgotten those types of rules.

kind hatch
#

As per the box model.

#

You can only really go outwards.

torn shuttle
#

fuck it, you know what, close enough

#

I'm not even sure of how I did this one

#

it's not at all what I was trying to do

kind hatch
#

@torn shuttle You probably have something like this.

#

When what you need is this.

torn shuttle
#

thanks!

kind hatch
#

You should really take that css property and apply it to everything. It makes everything easier to work with and more in line with what you would expect.

#

Hence, the reset file.

torn shuttle
#

I see

onyx fjord
#

Oh yea that's standard

quaint mantle
#

Hey

#

Have I to use this here
ExampleEvent exampleEvent = new ExampleEvent("Msrules123"); // Initialize your Event

#

Only one time

#

on the plugin load

#

Or every time before i call the event

honest vector
#

So do I need to use a MySQL server to connect all server in auth me?

smoky oak
#

also events normally call themselves by whatever is in their arguments, once again, thats different if u are working with ur own event

orchid gazelle
#

uhm why the hell does this happen???

smoky oak
#

looks like a client bug tbh
gonna need more context than a screenshot

orchid gazelle
#

for example if I kill it, it is just continueing existing without hitbox

#

Seems like minecraft does not like FallingBlockEntities with the EntityType Shulker huh?

orchid gazelle
smoky oak
#

well for example how do u spawn it in

#

thatd be helpful

orchid gazelle
#

with serverLevel.addFreshEntity(testShulker, SpawnReason.CUSTOM);

smoky oak
#

is ur testshulker a object of the shulker class?

orchid gazelle
#

no

#

its a FallingBlockEntity with the EntityType Shulker

#

lol

smoky oak
#

it might not correctly draw the connection between ur fallingEntity and entityLiving
this is a bit outside my expertise tbh

orchid gazelle
#

well isn't it outside of the expertise of just about every single person?

smoky oak
#

no i meant

#

i usually do world manipulation

#

not entity shenanegans

orchid gazelle
#

yeah

#

well I cannot see why it would get the player in this state to be honest

#

like neither Shulkers nor FallingBlocks should have any functionality connected to that state

#

is there any event getting called when a player enters this state? maybe I can cancel that

smoky oak
#

might have something related to crawling

orchid gazelle
#

thats from 2012

#

crawling wasn't added back then

smoky oak
orchid gazelle
#

yeah I cannot find anything related in there

smoky oak
#

maybe try the search

#

i know theres a event for the gliding state

orchid gazelle
#

yep seems like there is no event for crawling

quaint mantle
#
[15:45:08 ERROR]: Could not pass event StandardPaperServerListPingEventImpl to test v1.0
java.lang.IllegalStateException: PluginServerPingEvent may only be triggered synchronously.
#

Any idea

#

?

eternal night
#

don't trigger it off main thread ?

quaint mantle
#

How that?

#

Bukkit.getPluginManager().callEvent(callEvent);

#

I use that

eternal night
#

or, maybe more applicable, define the event to be ran off the main thread

#

as I presume you are recieving whatever you define a PluginServerPingEvent off the main thread

quaint mantle
#

Hm

#

And how do I fix that

eternal night
#

one of the event parent constructor takes a boolean

quaint mantle
#

sry i dont know how and where to use that

twilit roost
#

why does this throw UnsupportedOperationException?

eternal night
#

invoke the parent constructor in your custom event type

quaint mantle
#

Here???

PluginServerPingEvent callEvent = new PluginServerPingEvent(event);
Bukkit.getPluginManager().callEvent(callEvent);
eternal night
#

no usually you do it in the impl e.g.

quaint mantle
#

could you may send me an ... code?

eternal night
#
public final class MyCustomEventOffMainThread extends Event {
    private final String someData;

    public MyCustomEventOffMainThread(final String someData) {
        super(true);
        this.someData = someData;
    }
}
#

yea

quaint mantle
#

super(true);

#

for what is that?

eternal night
#

that is the parent constructor call

#

that I talked about before

quaint mantle
#

Like that?

#

super(false);

#

(super(isAsync: false);)

eternal night
#

idk why you'd call super(false) but eh

#

I am having trouble following your question

tender shard
#

ugh I just realized gradle still fails to exclude classes from minimize

quaint mantle
eternal night
#

well no

tender shard
#
shadowJar {
    minimize {
        exclude 'com.jeff_media.jefflib.internal.nms.**'
    }
    relocate('com.jeff_media.jefflib', 'me.username.jefflib')
}

any idea why none of those NMS classes are included in my jar?

eternal night
#

you call super(true)

quaint mantle
#

may only be triggered synchronously.

eternal night
#

yes

#

that boolean is "isAsync"

quaint mantle
#

and true would be async

eternal night
#

yes

#

which is what you want right ?

quaint mantle
#

yeah and I wantit sync

eternal night
#

you are triggering this off the main thread

quaint mantle
#

i think

#

to fix this error

eternal night
#

Well do you tho

quaint mantle
#

ill just try if it works

#

xD

#

tryandsee

eternal night
#

well this will fix it

#

but that means the event is off main thread

#

e.g. plugins listening cannot mutate the world etc

#

they'd need to jump back to the main thread before doing so

quaint mantle
#

false is not working

eternal night
#

obviously not....

quaint mantle
#

i dont understand

#

xD

eternal night
#

false means "hey I promise I will only call the event on the main thread"

quaint mantle
#

oh true is working as you said

orchid gazelle
#

ok so weirdly I could not find any documentation about crawling online

eternal night
#

while true means "hey I promise I only call it off the main thread"

quaint mantle
eternal night
#

only for events you call off the main thread

quaint mantle
#

off = not in

eternal night
#

yes

quaint mantle
#

ok

#

and whats better?

#

Not main

#

or main

#

not main

#

async, correct?

eternal night
#

it doesn't whats better

#

that depends on the context of the event

#

would it make sense to call BlockBreakEvent off main thread ? no

torn shuttle
#

tell that to fawe

eternal night
quaint mantle
eternal night
#

what damage

#

no

quaint mantle
#

ok

eternal night
#

entity damage is also on the main thread

#

if something happens on the main thread

quaint mantle
#

so I set it to false?

eternal night
#

and you want to throw an event

#

it should be on the main thread

quaint mantle
#

or just nothing

eternal night
#

if something happens off the main thread

quaint mantle
#

so true

#

😕

torn shuttle
#

use your human brain to think about if async makes sense or not

eternal night
#

you call it off the main thread

#

yes ^

#

use the human brain

torn shuttle
#

do you want players to be damaged at some random point in the future

quaint mantle
#

so i say true

#

correct?

eternal night
#

Well i have no idea what your event is

#

and when it is called

quaint mantle
#

😕^3

tender shard
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

torn shuttle
orchid gazelle
#

yo Jägermeister guy

torn shuttle
#

do you really want me to detail why that is

orchid gazelle
#

do you have any idea why the hell the game feels free to put me into crawling state when walking at a shulker?

quaint mantle
#

on command:
if command is "/plugins" or "/pl":
cancel event
message "Wist je dat Panda's eigenlijk gebaseerd zijn op Elma."

#

With what should I replace event.setMotd("")

quaint mantle
#

Why is the EntityDamageEvent not working?
The first 5 minutes it works

#

But after then it just stops working

#

Ive set the event priority to highest

#

no error

#

nothing in console

#

but it stops working

quaint mantle
#

And is there a way to check if events get unregistered

#

And if so say from which plugin / line of plugin

chrome beacon
#

Other plugins won't unregister your listener

quaint mantle
#

why is it then not working anymore

#

I made an output to the chat

#

And when I start the server

#

the output comes

#

but after ~ 5 min not anymoer

chrome beacon
#

Send your code

#

?paste

undone axleBOT
quaint mantle
#

no

chrome beacon
#

Then we can't help

scarlet breach
#

that not workhttps://paste.md-5.net/eferiramaq.java why?

smoky oak
#

did u tell ur plugin to load after vault

scarlet breach
#

no

#

i have vault installed but ii isn't working

smoky oak
#

in ur plugin.yml

#

softdepend: [vault]

#

*depend

scarlet breach
#

?

chrome beacon
#

Yeah like that

scarlet breach
#

but it isn't working

chrome beacon
#

Make sure to do a full server restart

scarlet breach
#

i made

chrome beacon
#

any errors?

tardy delta
#

please use PreparedStatements

#

i hope that random id is not user input or i would have fun sql injecting your database

torn shuttle
#

I'm losing it

tardy delta
#

me at webdev

#

cant even display two divs next to eo

torn shuttle
#

it's almost decent, why is it like this

tardy delta
#

whats bad about it

torn shuttle
#

red line clips on right side

#

I am using border-box this time which fixed the previous issue and I think it should fix the current one too

tardy delta
#

ahh had that too

kind hatch
#

Did you apply it to all elements?

*, *::before, *::after {
  box-sizing: border-box;
}
torn shuttle
#

yeah

tardy delta
#

what if you set the width smaller or margin-right negative?

torn shuttle
#
html {
    height: 100%;
    position: relative;
    font-family: "Open Sans";
    background: var(--background-color);
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

kind hatch
#

.-.

torn shuttle
#

and I mean it works for the other elements and it even affects this issue

tardy delta
#

lmao

torn shuttle
#

it is contained before the blue line on the right

#

without it it just clips way out

tardy delta
#

send me css and html lol

kind hatch
torn shuttle
#

like before there is basically no way to send it nor is there html

tardy delta
#

ahh ;-;

torn shuttle
#

also I did try that

#

I know the border-box works because this is not the only thing border-box affects

#

this is what it looks like without it

kind hatch
#

Hmm. Can't say I've had this issue with that property before. Must be something else then.

tardy delta
#

i know how it feels man 🥺

torn shuttle
#

it fits perfectly when I don't modify the margin

kind hatch
#

Oh, you're modifying margin.

torn shuttle
#

isn't border-box meant to contain that?

tardy delta
#

college today

torn shuttle
#

or is it just padding?

kind hatch
#

No

tardy delta
#

i have some issues with border-box too

kind hatch
#

It's meant to work around the border and padding. Refer back to the box model.
The blue box is the content. (AKA the content-box)
The border is the stage above padding.

So when you set box-sizing to border-box, it now treats everything inside of the border box as the new content box.

orchid gazelle
kind hatch
#

The cool thing about it is, you can still use padding like normal.

tardy delta
#

so its not around the margin?

kind hatch
#

No

#

It's around the border

#

Everything inside of it

tardy delta
#

i guess thats why my stuff never wants to display next to each other

torn shuttle
#

ok I guess I just used padding to do what I needed then

#

I really need to stop using margin then

tardy delta
#

anyways my media queries are overwriting eo ig

haughty idol
#

hey! would this work for creating a homing bow?

kind hatch
#

When you use border-box, the CSS rules change a little bit. You use margins to space your elements, and padding for everything else.

smoky oak
#

?tryandsee

undone axleBOT
torn shuttle
#

thanks shadow

#

appreciate it

haughty idol
#

i'm more so asking for advice on how to make it better

kind hatch
torn shuttle
#

really the only core thing my margins are doing is centering my content

#

the big cards

kind hatch
#

And that's a valid common usecase.

torn shuttle
#

other than that I basically just use them to space content vertically which I think is correct

#

I like the little visual tab I put on the script, that's pretty neat

#

nice little visualization of groupings

tardy delta
#

anyways do you guys maybe know how i can place three figure elements with 2 next to eeach other?

kind hatch
#

You got an example image?

tardy delta
#

trying some shit with float and inline-block but ig grid is the best

#

uh trying smth like this but know when i make my screen wider, suddenly a third pops up

#

next media query should put three next to eo

#

i guess we took over the channel now 🏴‍☠️

kind hatch
#

Is the third image on a row below those images or is it hidden until the screen is large enough?

haughty idol
#

https://paste.md-5.net/useduyaxuj.java this code is for making a homing bow, but because i'm modifying the velocity, iit makes it accelerate instead of staying the same speed... any tips on making it better?

tardy delta
#

if i make it bigger they all start to display next eo

kind hatch
tardy delta
#

uh ig wrap means that it goes to to the next line, ye it should

#

i could maybe use grid with grid-template-columns 1fr 1fr or smth

kind hatch
#

Then either grid or flexbox will work for you. You might want to use grid if you want a more modern approach.

tardy delta
#

i cant modify the html tho and i dont have an element surrounding all those images

#

pain

wet breach
kind hatch
#

:3

#

It is what it is.

wet breach
#

there is always tomorrow, hopefully will have more time lol

#

however the weekend is my day offs though

kind hatch
#

Tmw 3 days later.

kind hatch
tardy delta
#

hmm settings figure > * to block doesnt do anything

kind hatch
#

That's because block is the default.

#

For nearly every element.

tardy delta
#

oh ye cant you just force elemnts to be underneath eo?

#

i guess thats not how im supposed to do it but anyways

kind hatch
#

By default, all elements should be created on a new line of sorts. So those images without any css should be stacked on top of each other.

kind hatch
#

Oh, I didn't realize floats were this simple.

tardy delta
#

@jade marsh i do not accept dms

#

get your help here instead

wet breach
kind hatch
# tardy delta

If you define a width and a float on the figure element, then it should give the functionality you want/need.

tardy delta
#

smth like this

kind hatch
#

Not a max width. Just a normal width.

tardy delta
#

i seem to have some big margin on my figure so 50% doesnt work

#

hmm

kind hatch
#

Then change the margin. 😛

tardy delta
#

im wondering where it is smh

kind hatch
#

Check your dev tools. It'll show it on the element you hover over.

tardy delta
#

hmm looks like default

wet breach
kind hatch
#

Margin of 19.2px 40px 25px

wet breach
#

width: calc(100% - 60px); height: calc(100% - 60px)

tardy delta
#

not working

#

margin: 0 together with width: 50% makes it like this but i still need a margin right

#

this is how the assignment shows it

kind hatch
#

Then use the shorthand margin syntax.

tardy delta
#

too much cats lmao

kind hatch
#

margin: top right bottom left

#

margin: 0 1rem 0 0

tardy delta
#

still wondering why i even have webdev in a programming course

wet breach
kind hatch
tardy delta
#

i saw my teacher doing it with width 50%

#

so must work

wet breach
#

margin-left: margin-right: etc or use what shadow said

wet breach
tardy delta
#

had to include <meta name="viewport" content="width=device-width, initial-scale=1">

#

dunno what it does but whatever

#

i only know initial scale sets that users dont need to zoom

wet breach
#

it says that the width should be no more then the width of the viewport

#

and the scale is at a factor of 1

kind hatch
#

Viewport really just refers to your screen size and what it can currently display on it.

tardy delta
#

hmm

kind hatch
tardy delta
#

dunno if i would get less marks but i saw him once creating something related with the width of the individual elements at 50%

kind hatch
#

They must of been in containers then.

#

Because like frostalf said, if you set it to 50% in this case, it will use the viewport.

#

Instead of the parent element.

wary harness
#

Best approach for doing my placeholders would be to use Pattern or just String.replaceAll("%placeholder%" ,value) ?

tardy delta
#

replace and use String#replace not replaceAll

#

replaceAll is for regex, the name is just chosen stupidly

wary harness
tardy delta
#

all

#

believe so

wary harness
#

ok

tardy delta
#

replaceFirst and Last exists too

fervent prawn
kind hatch
tardy delta
#

nah first param is the position of the ? mark

kind hatch
#

Be that as it may, you shouldn't be using a variable for that parameter.

String query = "INSERT INTO player_data VALUES (?, ?, ?, ?, ?, ?, ?)";

PreparedStatement statement = connection.prepareStatement(query);
statement.setString(1, "MyString");
statement.setBoolean(2, false);
statement.setInt(3, 1);
//etc etc

That parameter works off of the ? you have in your query.
@fervent prawn

tardy delta
#

so 1 would be the first ?, 2 the second, not that its begins with 1 and not 0

#

^^

tardy delta
fervent prawn
#

@kind hatch@tardy deltathank you so much.
Благодарю от всего сердца!

kind hatch
tardy delta
#

ah default is all

gray merlin
#

Has anyone encountered this issue before? Maven says that my POM is missing, even though it is NOT

#
[WARNING] The POM for com.mrkelpy:Commons:jar:1.0 is missing, no dependency information available```
#

StackOverflow is down, too, so yeah pain.

gray merlin
#

yes

#

Change "Partygames" to "PartyGames"

wet breach
#

do you have dependencyreducedpom set to false?

gray merlin
proper notch
#

If you're going to rename a class, don't just change one part, always use IntelliJ's refactor. You must change both the file name and the name in the class. IJ refactoring will do both for you in the future.

gray merlin
#

Oh wait

#

it started working again

#

well nevermind I guess, I was blessed by the code gods.

opaque scarab
#

Quick question that probably won’t get answered LOL. How would I spawn an armor-stand in for only one person. What I mean is sending an NMS packet to a specific player so only one client has the armor-stand. How would I do this in 1.19.2? Thanks

#

In spigot of course

rough drift
#

Is there a Vector2

#

basically a normal Vector but without the Z

sullen marlin
#

hideEntity

heavy perch
#

questionnnn

#

regarding async threading

#

I run a command, inside it I run async schedule, can I schedule a normal sync task inside the async task?

sullen marlin
#

yes

heavy perch
#

ty md

smoky oak
tardy delta
#
scheduler.runTaskAsync(() -> {
  // async stuff
  // go back to main thread
  scheduler.runTask(() -> {
    // sync stuff
  });
})```
heavy perch
#

okiee

#

I have to since I need to do the get method in the bukkit api

#

and idk how risky that is

#

since it gets offline player

#

so I rather do it risk free

prime quarry
sullen marlin
#

because its nullable now

prime quarry
#

oh, makes sense lol

kind coral
#

how do i dynamically add servers on runtime with bungeecord?

deft tartan
#

Where can I find a download for spigot 1.19.3 .jar files

river oracle
#

BuildTools

deft tartan
river oracle
#

?bt

undone axleBOT
deft tartan
#

How do I install that

river oracle
#

Lord read

deft tartan
river oracle
#

Just use paper then oh nvm they probably aren't updated

deft tartan
#

yeh

river oracle
#

just wait for paper so you don't have to run a java command in console

#

otherwise you could read its pretty well explained

deft tartan
tender shard
#

it probably doesnt tell you to open "something"

river oracle
#

I mean thats because its obvious how to open a file

#

moreso run it

tender shard
#

so what is it that you are not able to open?

river oracle
#

I think buildtools docs are actually good I don't get whats hard to read

#

if your sturggling with understanding a specific section paste it I am happy to explain

tender shard
#

people just never read it from the beginning

#

it does explain every step in detail lol

river oracle
#

I mean I usually skim, but I can... I know java and how jar files work

river oracle
tender shard
#

you should do any file or database stuff async unless it's in onenable() or ondisable()

river oracle
#

I built a small api for my school project, but I did that all sync

#

ok thanks

river oracle
#

finally something I actually will finish and post for portfolio

torn shuttle
#

slowest webapp developer on the market jesus christ

#

just a glacial pace

dry bison
#

Hi

#

does anyone know how can i use simplescore with multiverse plugin?

#

???

#

plz anyone help me i beg u

torn shuttle
dry bison
#

oh

#

sorry

long zephyr
#

hello :3, someone know how to convert the player location to map location ? i've tried with :

int s = 1 << worldmap.scale;
        int i = worldmap.x;
        int j = worldmap.z;
        int x = Mth.floor(location.getX() - (double)i) / s + 64;
        int z = Mth.floor(location.getZ() - (double)j) / s + 64;

        return new int[] { x, z };
tender shard
#

1_19_R2 comes with funny changes to the CLientboundSetEntityDataPacket

long zephyr
#

MapView or the map pixels :3

#

<.< you mean % ? or wdym ¿

#

hahahaha okay :3

#

mmm i'll try ty ^^

#

noup still not working :(

torn shuttle
#
function generateEvents(button) {
    button.innerHTML = ""
    button.append(getTrashIcon())
    button.onclick = function () {
        scriptZoneButtonClearer(this, function (){
            generateEvents(button)
        })
    }
...
}

I just want to take a second to point out that this is code that I, a human, wrote, and that it totally works

opaque scarab
#

I have this line on 1.19.2 spigot: ((CraftPlayer) p).getHandle().playerConnection.sendPacket etc. the playerConnection class doesn’t seem to exist because it doesn’t show up in InteliJ and says can;t resolve symbol “playerConnect”

long zephyr
opaque scarab
#

@long zephyr Sorry that doesn’t seem to work either

opaque scarab
#

@tender shard Oh ok thanks

nimble zinc
#

Hi! Does plugin.getCommand work with aliases ?

#

If my command is "wild" and has "rtp" as alias, will plugin.getCommand("rtp")
return me the same command as plugin.getCommand("wild") ?

gleaming grove
#

Is there any better way to get all Classes from plugin then this chunk of code? private List<Class<?>> getPluginClasses(JavaPlugin plugin) { List<Class<?>> result = new ArrayList<>(); var file = FileUtility.pluginFile(plugin); if(file == null) { return result; } var packageName = plugin.getClass().getPackageName(); try(var inputStream = new JarInputStream(new FileInputStream(file))) { JarEntry entry; while ((entry = inputStream.getNextJarEntry()) != null) { try { var name = entry.getName(); if (!name.endsWith(".class")) { continue; } var classPath = name.substring(0, entry.getName().length() - 6); classPath = classPath.replaceAll("[\\|/]", "."); if (!classPath.contains(packageName)) { continue; } result.add(Class.forName(classPath)); } catch (Exception ex) { FluentApi.logger().error("Could not load class", ex); } } inputStream.closeEntry(); } catch (Exception ex) { FluentApi.logger().error("Could not package", ex); } return result; }

nimble zinc
#

Thanks and sorry haha

#

I can't get the command executors of other plugins commands right ?

tender shard
tender shard
#

then you can call getEcecutor on that

nimble zinc
#

Oh interesting thanks

#

Also, I have issues with commands being case sensitive sometimes and sometimes not

dusk flicker
#

are you including uppercase commands for some reason?

nimble zinc
#

I think I understood that commands are case sensitive when ran from chat but when I cancel the event and run player.performCommand it seems that it's not case sensitive

#

Is that correct ?

nimble zinc
tender shard
#

1 min

dusk flicker
dusk flicker
tender shard
#

and then e.g. you do ```java
List<String> clazzesOfMyOwnPlugin = ClassUtils.listAllClasses(MyListenerClass.class)

#

where "MyListenerClass" can be ANY class from your plugin, doesn't matter which one

#

it only returns their name so you can throw them into Class.forName when needed

#

otherwise you'd force-load all classes, that sounds like a very bad idea

gleaming grove
#

ye it looks like better approach thanks for code

nimble zinc
#

So at first I tried commands and it seemes that they were case sensitive

#

But then when i cancel the commandpreprocess event and use player.performCommand 5s later to delay the command, it seems that commands are not case sensitive anymore

eternal oxide
#

commands should not be case sensitive, so lower case them all

nimble zinc
#

Yeah but if the player use /SPAWN
And I lowercase it when trying to match, it will match with /spawn. But /SPAWN won't work so it will be delayed even if command doesnt exist

#

/spawn is working

#

And sometimes /SPAWN works I don't get it

eternal oxide
#

you lower case compare, then use their original command to process

nimble zinc
#

?

eternal oxide
#

however /spawn and /SPAWN should be identical commands