#help-development

1 messages Ā· Page 1678 of 1

solid cargo
#

so

#

what now

#

am i fudged?

prime reef
#

no lmao

#

CommandSender is an interface

#

it's applied to Players as well

solid cargo
#

ohhh

#

i should make it so that

#

if its console, dont send the sound?

prime reef
#

all you have to do is check if the command sender is a player and, if so, cast the sender to a Player object and call playSound on that

fading lake
#

If you can't figure it out ||((Player) sender).playsound||

solid cargo
prime reef
#

that's basically what that does, yes

solid cargo
#

yeah now its cool and all but

#

how do i make it stop the command at that point?

#

return false?

prime reef
#

no

fading lake
#

dont return false

#

thats bad

solid cargo
#

return true?

prime reef
#

you generally want to return true and handle any issues yourself

#

return false does weird shit.

solid cargo
#

hm ok

prime reef
#

and it echoes the command for some reason

#

i always return true

solid cargo
#

bro im so ashamed to ask basic questions

prime reef
#

don't be

#

that's how people learn

solid cargo
#

uh

prime reef
#

i started coding when i was 11 and i was a dumbass.

solid cargo
fading lake
#

I started on roblox lmfao

solid cargo
#

yeah but the wrong thing about me is that

#

i started on the wrong side

prime reef
#

?paste

undone axleBOT
prime reef
#

use that

solid cargo
#

im so sorry

prime reef
#

still no idea why this is happening

#

nothing has changed

#

but now it's just stopped updating lmao

prime reef
#

and press ctrl + alt + L if you're in IntelliJ

#

it fixes your indentation

solid cargo
#

which ones to tick?

prime reef
#

i don't understand what the fuck it is about new programmers and having 400 lines of whitespace

#

but almost every single one does this

#

hit. the backspace. key.

#

anyway. rant aside, let me read this

ivory sleet
#

yes thats quite the spaces

solid cargo
#

yeah sorry

grand perch
#

so i want to make the lifesteal smp remake but i dont know how to setPlayerHealth bcs its confusing

ivory sleet
#

literally Player::setHealth x)

grand perch
#

so basicly everytime i right click this item it gives me a heart

solid cargo
#

also dont you need to set more generic health?

ivory sleet
#

?

grand perch
ivory sleet
#

no

#

player.setHealth(player.getHealth()+1) then

grand perch
#

ok thx

solid cargo
#

isnt that like a /heal command

ivory sleet
#

might have to check if its below or equal to 19 tho

#

idk how spigot handles the overflow

solid cargo
#

pretty sure you have to set player's generic health

grand perch
#

also how does isOp() work ?

solid cargo
#

do that and that

ivory sleet
#

it returns true if the sender is op

#

else false

grand perch
#

ok does op mean like switch between gamemode ?

#

and do admin commands

ivory sleet
#

waht

solid cargo
#

setOp is set operator
isOp is a checker

ivory sleet
#

op is op

#

gamemode is gamemode

solid cargo
#

i think

ivory sleet
#

ye

grand perch
#

can ops do /gamemode and such

solid cargo
#

si

grand perch
#

ok

ivory sleet
#

depends

quaint mantle
ivory sleet
#

you can restrict permission even for ops

solid cargo
grand perch
#

'''

prime reef
#

it's just as bad don't worry

#

also

grand perch
#

'''
'''

ivory sleet
#

?

ivory sleet
#

why all the '''

#

```

grand perch
#

oh ok

prime reef
#

he's trying to format code but using the wrong characters

#

also

#

?paste

undone axleBOT
prime reef
#

use that please

#

if it's longer than like 3 lines

grand perch
#
    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if (!(sender instanceof Player)) {
            sender.sendMessage("Only players can use that command!");
            return true;
        }
        Player player = (Player) sender;
        if (cmd.getName().equalsIgnoreCase("deposit")) {
            if (sender.isOp()) {
                if (player.getName().equalsIgnoreCase("mexican_dream2")) {
                    player.sendMessage(ChatColor.BLUE + "[Lifesteal]: " + ChatColor.RED + "sorry an error occurred");

                } else {
                    player.getInventory().addItem(Items.Hearts);
                }
                return true;
            }
            return true;
        }
        player.getInventory().addItem(Items.Hearts);
        return true;
    }
 
#

is that correct ?

quaint mantle
proud basin
#

DrawUtils.drawRoundedRect(mc.displayWidth / 2 - (width / 2) - mc.displayWidth / 9, mc.displayHeight / 2 - (height / 2) - mc.displayHeight / 13, width, height, 2, 0x90000000); How can I make it so the right side and botton isn't so big. Also when I go full screen the drawing is gone

hybrid spoke
#

if its longer than 3 lines and just one method then your code is bad

grand perch
#

i want this spesific person to not able to do it

ivory sleet
solid cargo
#

like so?

prime reef
#

@solid cargo so...

        if (command.getName().equalsIgnoreCase("boop")) {


        }```

you're checking the command name here when there's absolutely no need to, and you're straight up locking yourself out of the rest of your code by enclosing absolutely nothing in the braces
ivory sleet
#

if its a try catch finally it probably should be longer than 3 lines but yeah 3 lines good

solid cargo
#

thats what i believe TechnoVision teached me

prime reef
#

well, no, you didn't use an else

hybrid spoke
#

books never lie

ivory sleet
#

wat

prime reef
#

so it's not locking you out of the code, but it's completely redundant

grand perch
ivory sleet
#

principles and books are good but that doesnt mean we should follow them blindly

solid cargo
#

that is true though

prime reef
#
        if (target.getName().equals(sender.getName()))
            sender.sendMessage(ChatColor.AQUA + "You can't boop yourself!");
        ( (Player) sender ).playSound(target.getLocation(), Sound.ENTITY_VILLAGER_NO, 99999f, 1f);
        return true;```

this isn't in curly braces
#

only the sender.sendMessage line will actually execute based on the conditional

#

the sound and return will execute regardless

#

what you've effectively written is a method that returns true and then a bunch of unreachable code right after it

solid cargo
#

hm ok

prime reef
#

and then for some reason after the return you have more code

#

also, you're checking if target is null after executing code that will throw an NPE if target is null

#

additionally you should really be using the ChatComponent API and a utility class that handles sending your plugin messages, but that's more about having clean, consistent code than it is an actual logical error

solid cargo
#

alright so

prime reef
#

however, you do need to consider that if you want to change your plugin prefix and chat colors at any point, you will have to MANUALLY go through and update every single occurrence

solid cargo
#

as long as the plugin isnt large, its a breeze to do

prime reef
#

it's still extremely bad practice

solid cargo
#

true true

prime reef
#

don't let yourself fall into bad habits

#

habits are hard to break

#

i'm 22 and still have this awful habit of picking at the skin on my lips when i'm stressed

quaint mantle
#

same

solid cargo
#

same

quaint mantle
#

its satisfying

solid cargo
prime reef
#

it's satisfying but also i tend to have blood on my mouth more often than not lmao

quaint mantle
#

lip blood hits different

prime reef
#

LMFAO

#

it does taste different from arm blood šŸ˜”

quaint mantle
#

arm blood is metal

prime reef
#

thank god the spigot discord blocks external emoji, i almost used a shitpost version of pensive that i made

ivory sleet
#

🄲

quaint mantle
prime reef
#

incidentally it's fine to use a "magic string" if it's a single occurrence, in which case it's not a magic string, it's just a constant

#

at least that's my personal philosophy because why would i go and define a string constant that gets used once

#

anyway @solid cargo you don't at all have to go this far but this is what my Messaging class looks like lmao

prime reef
#

pretty much anything can be changed through config later

hybrid spoke
#

those are books

#

words on paper

#

in a book

prime reef
#

and it's all in one location

#

you can ignore all the annotations, that's more advanced shit that you don't have to worry about rn

solid cargo
#

why da heck else without if

#

even if i have if

quaint mantle
#

you have a statement in the way

ivory sleet
candid galleon
vivid cave
#

yo guys, I need a strategy to monitor player's ping!
BasicallyI keep sending them packets in a very spammy way (animated stuff), but I need to ensure that by doing that i don't make their ping go higher; so plaese give me strategies, I thought about this one:
If their ping is equal to UWU ms, then I will send them the packets only every UWU ms. (and i update the UWU value everytime ofc)
But I kinda feel like this strategy will not suffice, will it? Please tell me your opinions.
And before you propose "just add more delay to your animation" well there is already enough delay imo, plus it runs asynchronously in a very smooth way, therefore i wanna make sure it adapts to players

candid galleon
#

he’s like 0% serious duh

candid galleon
vivid cave
#

yes

quaint mantle
#

yikes

vivid cave
#

do you think it's a good idea?

candid galleon
#

why are you sending packets at all

#

just read their ping every so often

vivid cave
#

what

hybrid spoke
vivid cave
#

i'm sending them packets because i'm animating stuff

crystal magnet
#

Player#getPing() I think

fading lake
#

returns an int

vivid cave
#

ty for this, but it's not really what i asked

#

i asked for strategies

#

mine is "I need to monitor someone’s ping, so I will send a packet at the rate of their ping"

prime reef
vivid cave
#

idk if u think its good

fading lake
#

its probably not a good idea no

prime reef
#

it's bad because you're just generating needless traffic

#

and a shit ton of it

#

ping naturally fluctuates

vivid cave
#

so what do you propose?

prime reef
#

sending an animation packet doesn't really cause a lot of lag

fading lake
prime reef
#

if you're doing something like animating an armor stand, that's still not going to cause nearly as much as lag as sending 50-100 packets per second

fading lake
#

packets dont usually cause lag to a client unless you're sending hundreds per second

prime reef
vivid cave
#

You are aware that i need to keep sending them packets right

prime reef
#

yes but like

#

if you're animating an armor stand with a runnable

#

the most packets per second you can send with spigot is 20, assuming you send one packet per runnable update and you're doing this every tick

#

you're not going to cause incredible amounts of lag

#

you'd have to have a sizable number of armor stands animating simultaneously in order to cause that sort of lag

crystal magnet
prime reef
#

honestly, yeah

vivid cave
#

First I'm running this async (no spigot scheduler bullcrap used here), second i'm sending litteraly 50 different every 20ms to a player

prime reef
#

that brings me to a quick aside - would it be plausible to send JSON strings containing custom model/animation data to a modified client?

prime reef
#

i don't really know your use case, but this sounds excessive

upbeat cobalt
#

Is crazy crates 1.17.1?

prime reef
#

no idea

#

this is for development

crystal magnet
prime reef
#

^

#

spigot api runs synchronously

vivid cave
#

yeah and that's shit

crystal magnet
#

No

prime reef
#

not really, it's a game server

#

i don't know what you're expecting lmao

#

there HAS to be some level of synchronicity going on there

#

it's...a game.

crystal magnet
#

The scheduler is a very helpful tool

lean gull
vivid cave
#

I couldn't do that sync, i'm litteraly sending 50 image packets (1 per map) every 20sm to every player in a specific zone

prime reef
#

async is extremely useful for maintaining data that's independent of the game loop. i use async to handle chat and saving player data

lean gull
#

(any help is appretiatited, and btw i'm buenny aka floofsy)

prime reef
prime reef
#

also yeah

candid galleon
#

You can send > 20 packets per second lol

prime reef
#

you can absolutely do that synchronously

vivid cave
vivid cave
prime reef
crystal magnet
#

Schedule repeating task every 20 ms

vivid cave
#

ms*

prime reef
#

it's not every 20 seconds

solid cargo
#

arent they equal tho?

prime reef
candid galleon
#

what’s the if right above?

prime reef
#

well

#

i don't know what problem you're running into

vivid cave
#

actually i said 50 every 20ms, but it could be even 50 every ms, depending how many map to animate there is in the zone

solid cargo
#

ah who me?

prime reef
#

anyway 50 * 50 = 2500 packets per second

candid galleon
#

Yes

prime reef
#

for one of these 50-map things

solid cargo
#

else without if

#

and uh

#

need all code msws?

prime reef
candid galleon
#

show us the code above that image

prime reef
#

^

solid cargo
#

WILL FIX WHITESPACES DW

candid galleon
#

so

#

you’re doing

#

if() else {}

#

right?

lean gull
#

ur missing a {

#

bottom else

reef wind
#

Also please don't screenshot your code

solid cargo
#

they asked to ss it

prime reef
#

you're basically smurfing your players

candid galleon
#

please do ss your code

prime reef
#

else has to come last

candid galleon
#

discord sucks on mobile

reef wind
#

okay fair enough

prime reef
#

?paste

undone axleBOT
prime reef
#

this works on mobile

#

it's just a pain in the ass

lean gull
#

i could use some help too!

prime reef
#

but code screenshots are okay imo

lean gull
#

pls

candid galleon
#

if (doorOpen) { closeDoor } else { openDoor} else { tf } ?

prime reef
reef wind
# solid cargo

why are you trying to earrape ppl with a volume that doesn't even exist?

candid galleon
#

you’re calling else after another else

prime reef
#

you're setting your volume to 99999

solid cargo
#

no?

vivid cave
#

šŸ˜‰

solid cargo
#

max volume is however far

#

volume is told by blocks

candid galleon
#

Max is 2

prime reef
#

it objectively does not go higher than 2.

solid cargo
#

what if the player suddenly teleport?

prime reef
#

i've been doing spigot dev for 6 years

reef wind
#

it is not unlimited

candid galleon
#

Then they probably wouldn’t hear it

prime reef
prime reef
solid cargo
#

ok that shouldnt fix the problem anyways

prime reef
#

i'm not entirely certain what to do about the gif thing honestly

#

your options are a shit ton of bandwidth

#

a clientside mod would actually do a lot more here but

vivid cave
#

The last thing I need is sth to make sure that people with low connection won't have worse ping because of it

#

Otherwise i'm pretty proud

#

I can invite you to my server so you test it šŸ™‚

#

you can add your own gif in the game, as big as you want ^^

prime reef
# lean gull can someone help? i'm getting some errors with this code: https://paste.md-5.net...

so getCurrentItem() on an inventory click event returns the clicked item, and you're trying to call getType() on something that's null. that's your first error. check if getCurrentItem is null instead, don't do Material.AIR

your second error is happening because of code that I can't see (it's in CraftingRecipes, not CraftingEvents), but from your stacktrace, you're checking if an ItemStack that doesn't exist is equal to something. in your slots array (line 64), you've got two problems related to this:

  1. You're setting slots[0] every time. Nothing except the first element of the array is being set, so the array you're passing in is going to contain the item at the 31st index of the clicked inventory and then 8 null ItemStacks.
  2. If at any point the code you're executing in recipesCrafting operates on a null ItemStack, you don't have a null check in place, so it's going to throw a NullPointerException without fail unless your crafting grid is completely full (and you fix the problem where you set slots[0] and no other elements of the array).
prime reef
#

also @solid cargo look into the ChatComponent API, it's simple as shit and works great

lean gull
#

:p

#

also if i do null then it says it's always gonna be false

prime reef
prime reef
lean gull
#

dis is problematic boi:

        if (e2.getCurrentItem().getType() == null) {
            System.out.println("hi");
            // error here VVV
            if (player.getItemOnCursor().getType().equals(Material.AIR)) {
                e2.setCancelled(true);
                System.out.println("hi2");
            }
        }```
vivid cave
lean gull
#

i changed top line to == null and now it's saying it's always gonna false

prime reef
prime reef
#

?paste

undone axleBOT
lean gull
#

i already did

prime reef
#

send a paste of what you're trying to do

#

i need context and specifics, I can't help you if you just say "I changed the top line to == null"

quaint mantle
lean gull
#

if i had the code of what im trying to do then i wouldn't have a problem

prime reef
#

oh nvm

#

i'm fucking blind sorry, I tabbed out

#

yeah uh

#

you need to be checking if the itemstack is null, not its type

quaint mantle
#

currentItem == null

prime reef
#

your error is coming from the fact that you're calling getType() on something that doesn't exist

#

not from the thing you're checking getType() against

prime reef
#

it's stopped updating and is now appending a number to the end of each line that corresponds to the score

#

i've been having issues with the scoreboard since updating to 1.17, but

vivid cave
#

Maybe I'm wrong, but could it be from an external plugin interfering with your scoreboard? Like trying to send their scoreboard too sometime

prime reef
#

I literally do not have any other plugins running.

lean gull
#

wait so what do i do

prime reef
#

I'm testing my own plugin on a local server

#

though

#

that's a lead

#

I might be registering the scoreboard twice

lean gull
#

ok i removed .getType and it fine now

prime reef
lean gull
#

this is it now, player.getItemOnCursor() == null says it's always gonna be false

        if (e2.getCurrentItem() == null) {
            System.out.println("hi");
            // error here VVV
            if (player.getItemOnCursor() == null) {
                e2.setCancelled(true);
                System.out.println("hi2");
            }
        }```
prime reef
#

in that case, yes, you want to check if it's Material.AIR

#

Basically if you're pulling an item from an inventoryslot, check if the itemstack is null

#

spigot is dumb and inconsistent with how it handles these things

lean gull
#

ok i undid the second check and now it's == null and then .equals

prime reef
#

minecraft is dumb

#

it's either "no item" or "an item, but it's air, so it's not really an item, but it's still technically an item"

lean gull
#

yup

prime reef
#

or maybe that's my C# brain acting up šŸ˜”

eternal night
#

you can šŸ‘

prime reef
#

okay good lmao

vivid cave
prime reef
#

i'm not entirely sure how Java perceives enums, since in c langs they're basically just numbers tied to some extra shit

prime reef
#

that's why i'm scratching my head over it

#

if there were an error at all, I'd be able to track down the problem immediately, but debugging behavior that's technically correct but undesired is much harder

vivid cave
#

is it in while true loop for updating or do you use schedulers

lean gull
prime reef
#

well it's certainly not because of trying to register a second scoreboard

proper notch
prime reef
prime reef
#

the two things I like about java are anonymous overrides and its enums lmao

prime reef
vivid cave
#

If I were you I would do the following:

  1. make sure that nothing else may interfere with your own per player scoreboard
    2), if not fixed: only for debugging time, add some System.out.println(...) a bit everywhere in the task, sending as much contextual data as possible
    you may also want to do slower updates for this kind of debugging
#

yeah who cares xD

#

debugging = removing/finding bugs/weird behaviours

#

not definitive code

vivid cave
#

but if u have better debugging tools sure

prime reef
#

what's bugging me, pun not intended, is that I didn't change anything

#

something seems to have changed in how scoreboards work

vivid cave
#

Are you using packets?

#

or NMS

prime reef
#

neither...

#

it's a scoreboard.

lean gull
#

i require help

#

pls

vivid cave
#

I know but I coded a scoreboard feature as well, i updated my server to 1.17.1 and nth broke

#

it keeps running smoothly

quaint mantle
vivid cave
#

and it dynamically updates every half second (if there's anything to update ofc)

prime reef
#

hang on

#

we have an electrician over

#

and they're about to randomly shut off all the power

#

and i do not have discord on my phone lmao

vivid cave
#

lol

#

gl

prime reef
#

anyway before I disappear

lean gull
proper notch
#

Shut of your pc before windows gives your system a big bonk and breaks Ur install

dense remnant
#

Hey is it possible to not open the players inventory when creating a gui?

So for example opening a chest without the hotbar etc.?

young knoll
#

No

eternal night
#

entity tracker is basically assigned to each entity and holds all players that should receive updates in regards to that entity

#

what

#

what kind of metadata

#

the "datawatcher" ?

gaunt saffron
#

can i have any example/ressource of how to detect player standing on a block/beeing in water?
it's pretty easy in command blocks but api idk
do i have to loop thru all players and check? ideas? ping me

eternal night
#

oh, hmmmm. I guess you could attempt to modify the entity in the entity tracker entry to be the creeper instead of the player

#

might have some very very interesting side effects tho xD

#

worth a try I guess xD

chrome beacon
lean gull
#

wdym

#

oh wait im dumb

chrome beacon
#

Also send the class where the error is from

lean gull
#

wdym

chrome beacon
#

Error is in the CraftingRecipes class

lean gull
#

no?

smoky vapor
#

By the way, how do I get a Map of the values in commands:?

commands:
  test:
    description: Tests a command
    usage: /test
chrome beacon
#

Your own plugin or all plugins

smoky vapor
chrome beacon
#

I assumed that was the plugin.yml

smoky vapor
#

It is

#

And here's the code in the main class and main method I have so far:

chrome beacon
#

So it's not just a yaml file from your plugin

proud basin
smoky vapor
#
Yaml yaml = new Yaml();
try {
    FileInputStream inputStream = new FileInputStream("src/plugin.yml");
    Map<String, Object> yamlData = yaml.load(inputStream)
    inputStream.close();

    if (yamlData.get("commands") instanceof List) {
        // May need to change this
        List<Map<String, Object>> commands = (List<Map<String, Object>>) yamlData.get("commands");
    }

    getCommand("test").setExecutor(new CommandTest());

    getLogger().log(Level.INFO, "Carter enabled");
} catch (IOException ex) {
    getLogger().log(Level.SEVERE, "YAML file does not exist for this plugin.");
    getPluginLoader().disablePlugin(this);
}
smoky vapor
quaint mantle
#

then getCommands

chrome beacon
#

^ this. Your code won't work very well

smoky vapor
quaint mantle
#

thats what it does

#
@NotNull
public Map<String,​ Map<String, ​Object>> getCommands()
smoky vapor
#

Ah

#

Thanks

shadow night
#

Where do i put plugin.yml?

quaint mantle
#

under resources

shadow night
#

oh god i'm so dumb

smoky vapor
quaint mantle
#

ye

smoky vapor
smoky vapor
shadow night
#

How do i fetch the server on player login event?

quaint mantle
#

Bukkit.getServer

eternal oxide
eternal oxide
#

During the log in event teh player data is not loaded. It will have a default Location, being the main server world.

#

Only in the Join event will their data be available and the world they will spawn in be available

quaint mantle
#

they said the server

eternal oxide
#

Oh, sorry I thought they said world

#

Just got up

restive mantle
#
org.gradle.internal.resolve.ArtifactNotFoundException: Could not find spigot-api-1.17.1-R0.1-SNAPSHOT.jar (org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT:20210827.092549-59).
Searched in the following locations:
    https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.17.1-R0.1-SNAPSHOT/spigot-api-1.17.1-R0.1-20210827.092549-59.jar
``` Am I doing something wrong? I'm not sure why its not resolving, I've cleaned out the maven repo and have the repository in the build.gradle. Heres the dependencies and repos: https://hastebin.com/pahematami.properties
smoky vapor
#

Not certain, but thinking.

restive mantle
quaint mantle
#

Gradle, yuck.

smoky vapor
eternal night
#

makefiles

smoky vapor
#

Not showing it for the Gradle thing for some reason on their page (https://www.spigotmc.org/wiki/spigot-gradle/#wikiPage):

repositories {
  maven {
    url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'

    // As of Gradle 5.1, you can limit this to only those
    // dependencies you expect from it
    content {
      includeGroup 'org.bukkit'
      includeGroup 'org.spigotmc'
    }
  }
  /*
   As Spigot-API depends on the Bungeecord ChatComponent-API,
  we need to add the Sonatype OSS repository, as Gradle,
  in comparison to maven, doesn't want to understand the ~/.m2
  directory unless added using mavenLocal(). Maven usually just gets
  it from there, as most people have run the BuildTools at least once.
  This is therefore not needed if you're using the full Spigot/CraftBukkit,
  or if you're using the Bukkit API.
  */
  maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
  maven { url = 'https://oss.sonatype.org/content/repositories/central' }
  // mavenLocal() // This is needed for CraftBukkit and Spigot.
}

dependencies {
  // Pick only one of these and read the comment in the repositories block.
  compileOnly 'org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT' // The Spigot API with no shadowing. Requires the OSS repo.
  compileOnly 'org.bukkit:bukkit:1.17-R0.1-SNAPSHOT' // The Bukkit API with no shadowing.
  compileOnly 'org.spigotmc:spigot:1.17-R0.1-SNAPSHOT' // The full Spigot server with no shadowing. Requires mavenLocal.
  compileOnly 'org.bukkit:craftbukkit:1.17-R0.1-SNAPSHOT' // The full CraftBukkit server with no shadowing. Requires mavenLocal.
}
restive mantle
#

its odd that its only my laptop though too my desktop doesn't have this issue šŸ¤”

fading lake
proud basin
tender shard
# smoky vapor What's better than Gradle?

nothing. both gradle and maven are perfectly fine. I personally don't like gradle, but it has no real reason. I just don't like it. I'm a maven guy^^ there's also other solutions like ant but tbh ant really is shit lol

quaint mantle
#

ant is superior

proud basin
#

Personal preference

tender shard
#

tbh I don't know much about ant, all I know is that both maven and gradle are more powerful

quaint mantle
#

ant is easier and all

#
<?xml version="1.0"?>
   <project name="Hello World Project" default="info">
   <target name="info">
      <echo>Hello World - Welcome to Apache Ant!</echo>
   </target>
</project>
tender shard
#

but yes, after all it's just personal preference. and maven and gradle are much more widely used

#

I grew up with maven, so that's what I use

#

I'm pretty sure that every proper build / dependency management system will be fine for 99% of the people. just choose whatever you're most comfortable with

ivory sleet
#

Indeed

tender shard
#

becauuuse? ^^

ivory sleet
#

Where do we start?

tender shard
#

very objective description lol

proud basin
#

Conclure you seem very good at openGL

tender shard
#

I, for example, don't like gradle because it invented its own syntax instead of using existing markup languages like XML, and because it has to download the wrapper everytime from a really slow server

#

yeah well

#

that's not 100% true

#

it has to download the wrapper once for each project

ivory sleet
tender shard
#

e.g. Essentials uses Gradle version X, another plugin uses Gradle version Y

ivory sleet
#

I know the minecraft abstractions of it quite good

#

but not the lib itself

proud basin
#

so you wouldn't know how to fix my issue then

tender shard
#

it's like a 100MB file everytime and it always takes a minute to download - I have a 1Gbit/s connection so it could be downloaded within a second, but gradle's servers are slow as hell

ivory sleet
#

ask

#

and maybe

tender shard
#

yeah but maybe you can explain WHY it's shit šŸ˜„

#

I can also say "gradle is shit" but it's not worth anything without explanation

quaint mantle
#

^

tender shard
#

the syntax is slow?

proud basin
# ivory sleet and maybe

well I did but I actually fixed it I was missing GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);

tender shard
#

nooooo, that's just one aspect. and tbh as I said, gradle servers always take at least a minute for me to download the wrapper although I have a 1Gbit connection

ivory sleet
#

Bomp maven is a lost cause, not worth arguing

tender shard
#

I already said: Gradle is NOT shit. It's perfectly fine

#

I just don't like it for different reasons

quaint mantle
#

takes me 3 seconds to build a 200kb maven project

hasty prawn
#

Why can't we just agree that they're both garbage PeepoHappy

quaint mantle
#

^^^^

tender shard
#

šŸ˜„

#

I already said: both gradle and maven are perfectly fine, each one has their problems and advantages. I myself grew up with maven so I stick with that, but that doesn't mean that I hate gradle. I just don't like it for reasons I cannot properly explain. It's like that boy from the neighbour house. You just don't like him, but you also don't really have a reason for it

hasty prawn
#

I use Gradle and usually it makes me wanna die, I hate both of them KEKW

quaint mantle
#

it doesnt matter what you use facepalm

hasty prawn
#

It really doesn't matter LOL

quaint mantle
#

😐

hasty prawn
#

Nah, it's called lack of caring the entire structure of how gradle works.

tender shard
#

TL;DR: Bomp is biased, everyone else says it doesn't matter what you use

quaint mantle
#

?kick @quaint mantle flamebaiting

undone axleBOT
#

Done. That felt good.

hasty prawn
quaint mantle
ivory sleet
#

...

hasty prawn
#

I liked the other giggle

ivory sleet
#

Alr

quaint mantle
quaint mantle
#

was he not flamebaiting? lmao

hasty prawn
#

A giggle on all the drugs maybe

quaint mantle
#

mhm

ivory sleet
#

Yeah but those emotes are kinda meh

quaint mantle
#

what

hasty prawn
#

PauseChamp send a better one then

quaint mantle
tender shard
#

maybe we should invent our own system, called Drain (the opposite of "spigot"). It's slow as hell, uses YAML and downloads a huge amount of hentai before it actually starts doing anything. Then we can all agree that this system is shit but we will use it anyway. I think that's a nice solution

hasty prawn
#

Brilliant

ivory sleet
#

Well I guess he did go over the limit

tender shard
#

and the command to compile a project will be drain decompile (just to confuse people)

quaint mantle
#

Incredible

ivory sleet
#

Anyways alex the reason why I like gradle is because it’s vey much more configurable which can be quite neat imo

tender shard
#

That's a reason I can understand

quaint mantle
#

i like gradle for that

ivory sleet
#

Then it’s also in kotlin which I personally like

hasty prawn
#

Yeah that's useful, you just have to put in the time to understand how to actually use it lol

tender shard
#

maven pom.xml files can indeed grow very much because of the xml syntax

quaint mantle
#

but i just dont like how many errors you come across while building a simple project

hasty prawn
#

^

quaint mantle
#

maven is bad for xml

ivory sleet
#

Sure it does have its complexity

quaint mantle
tender shard
#

I was annoyed so much by the huge pom files that I made a website to generate pom.xml files for my personal use, so yeah I can understand why people prefer gradle šŸ˜„

hasty prawn
#

the fact you can't build external libs into a gradle project without a plugin drives me up the wall

tender shard
ivory sleet
#

Ye, on the contrary maven is way more common in companies so having experience in it isn’t useless at all

#

In fact useful (:

hasty prawn
tender shard
#

again, TL;DR: use whatever you like. There will always be some people claiming "X is better than Y". Just use whatever you're more comfortable with

tender shard
hasty prawn
#

Oh, no I meant by repo.

tender shard
#

aaah oh ok

ivory sleet
#

System dependencies?

tender shard
quaint mantle
#

?ban @quaint mantle excessive complaining about moderation decision, DM profanity & insults

undone axleBOT
#

Done. That felt good.

tender shard
#

whut?

#

this ?ban thing is actually a thing here? šŸ˜„

ivory sleet
#

Yep

tender shard
#

I remember it from my Counter strike times like 10 years ago lol

#

but tbh

#

did anyone of you ever encounter a project that used ant (talking about MC plugins)

hasty prawn
#

Gradle actually supports the absolute dependencies better than repo dependencies when it comes to compiling them afaik

tender shard
#

gradle vs maven is like the Canon vs Nikon debate

hasty prawn
#

What's Nikon PauseChamp

tender shard
#

a japanese camera manufactorer

#

like canon^^

hasty prawn
#

Ah

#

nah Canon wins because they make printers 5Head

tender shard
#

Canon photographers always nikon users, and vice versa šŸ˜„

ivory sleet
tender shard
#

but their printers suck lmao

hasty prawn
ivory sleet
#

Ah yeah, both maven and gradle support that equally good imo

hasty prawn
#

Like C:/Users/user/Desktop/spigot.jar or whatever

tender shard
#

yeah but both mock you for using it šŸ˜„

ivory sleet
#

Yeye

tender shard
#

both actually want that you install it to your local repo instead

ivory sleet
#

Lol tru

hasty prawn
#

Gradle doesn't really seem to throw much of a fit, you just have to add stuff to get it to do it

#

But do I know what I'm doing? No

rigid drum
#

Maven hasn't really seen any changes in years tho... it's sigificantly slower than gradle.

tender shard
ivory sleet
#

Best seen with a multi project

rigid drum
#

Having used both in production environments for years... I've had some INCREDIBLY poor experiences with both... but primarily maven... since it's inflexible... once you start doing something more advanced than a simple fat jar it just tries to consume your soul.

tender shard
#

No mean to offense, it's just an honest question

rigid drum
#

Also, certainly for tiny projects it's not THAT big of a deal... but when you are dealing with a 30 minute android build

hasty prawn
#

30 minute hEH

tender shard
#

when I'm running maven, my largest project takes about 30 seconds in total. about 20 seconds is consumed by the actual java compiler

#

but of course I can understand things are different when you are handling really large projects

rigid drum
#

But the other aspect here is

tender shard
#

I'm only using maven for my spigot plugins, so I can understand that it's an entirely different story when you have to handle REALLY huge projects

#

instead of just a 2 MB Spigot plugin

rigid drum
#

readability... a nicely cleaned out kotlin gradle project is very compact and readable... it requires no external dependency to build.

tender shard
#

oh okay I'll probably start the next debate, but: I hate kotlin's syntax lmao

rigid drum
#

Meaning for example it can be built in a multistage dockerfile where the first stage is just any java container

#

And it can never suffer from versioning issues since doing something like changing your system maven version doesn't really exist.

#

I mean regardless of if yu hate kotlin or not... I think you would be hardpressed to say that

#

groovy syntax is better than kotlins

#

since ultimately they look almost identical when it comes to gradle...

#

and the kotlin dsl is way more typesafe

ivory sleet
#

The functions look like variable mutations but ye

rigid drum
#

What do you mean by that?

ivory sleet
#

Oh well in groovy u can do stuff like shadowJar.classifier "all"

#

It looks like you’re assigning a variable a value

#

Anyways kotlin dsl is the way to go so yeah

rigid drum
#

Oh yeah, postfix notation

#

I mean it effectively takes the place of assigning variables

tender shard
#

I'll probably start to love kotlin when I ever start to learn it

ivory sleet
#

Yeah exe

tender shard
#

but everyone has to agree that the syntax is strange šŸ˜„

#

and every method in kotlin is funny

rigid drum
#

like in scala where a "getter" and a "setter" may form a property by having a pair of methods:
def whatever(value: Value)
def whatever(): Value

then postfix notation would all you to do
thing.whatever newValue
println(thing.whatever)

tender shard
#

(fun whatever(...))

rigid drum
#

I'm not a huge fan of the missing = myself... so I feel that.

#

I'm a big kotlin fan

#

It's just more powerful

ivory sleet
#

Indeed

rigid drum
#

but I certainly disliked kotlin at one point too so I understand where you are coming from šŸ™‚

tender shard
#

I will probably be one too in a few years when I'm forced to learn it, but right now I'm still avoiding it for reasons that are stupid

ivory sleet
#

Jetbrains is a genius

rigid drum
#

IDK about that one šŸ˜›

ivory sleet
#

Sometimes 🤨

tender shard
#

let's agree on one thing

rigid drum
#

The worst part of kotlin is the fact that the jetbrains team is often times not a big fan of listening to the communities ideas

tender shard
#

people who use M$ products to code in java / kotlin are inbred lol

ivory sleet
#

Yeah got a point actually

rigid drum
#

Compared to something like rust or scala where the language evolves based on the needs sand desires of it's users.

tender shard
#

(jk but for real, it's strange lol)

ivory sleet
#

Yeye, I got to go but nice chat exe šŸ˜‰

rigid drum
eternal night
#

real men use makefiles

tender shard
rigid drum
#

I've not seen it since, it's certainly rare

#

but I have yet to see anyone use bazel either

tender shard
#

wtf is bazel lol

#

never heard of it

paper viper
tender shard
#

oh btw I got another question to all devs publishing their stuff to repos

#

are you using self hosted repos / github (jitpack etc) / etc? or what's your solution?

paper viper
#

I use Jitpack, but you can use CodeMC or maven central

rigid drum
#

It's googles build tool

paper viper
eternal night
#

Bazel xD

tender shard
#

I setup a simple ProFTPD server to deploy my stuff, that's also reachable through HTTP(S) but tbh I don't really like it. Thought about using Nexus buuuuuuuut Nexus sucks

paper viper
#

Oh

rigid drum
#

I use a fair bit of jitpack for personal projects... sometimes I use gitlab cicd... but someday I'll change over to using github actions and repos

#

since apparently those are free

paper viper
#

always has been

#

lmao

tender shard
#

yeah github has some awesome features

rigid drum
#

I spent a long time mostly using gitlab ĀÆ_(惄)_/ĀÆ

tender shard
#

but I'm afraid because I don't understand most of githubs new stuff lol

rigid drum
#

I still dislike the lack of subrepos on github

tender shard
#

subrepos? what exactly do they do?

rigid drum
#

you can have like:
Exerosis/Whatever/Next/Next

#

be a repo

tender shard
#

Seems like a branch to me^^

rigid drum
#

so you can create a project that has multiple components and split it up between multiple repos... the ultimate issue is that it doesn't really fix things.

paper viper
#

I dont think subrepos are fundamentally good

rigid drum
#

Also nah branches are just seperate versions of the same repo effectively

rigid drum
#

I'm unsure on subrepos... I've been back and forth on this problem

tender shard
#

sooo

#

just to understand

proud basin
tender shard
#

instead of MyOrganization/MyProject-Bukkit and MyOrganization/MyProject-Forge, I could have MyOrganization/MyProject/Bukkit and MyOrganization/MyProject/Forge, right?

paper viper
#

But there are Projects on Github

#

like Project

#

not repo

tender shard
paper viper
#

Yeah but you can add repos to it

#

and stuff

rigid drum
#

Yes that's correct @tender shard

tender shard
#

Oki thanks

rigid drum
#

but also this means that even if Myorg is taken

#

you can still have You/YourOrg/MyProject/Bukkit

tender shard
#

Ah okay

#

so it's basically just a change in "namespaces"

rigid drum
#

yes

tender shard
#

okidoki thanks

rigid drum
#

Yep np

tender shard
rigid drum
#

Those are called submodules

#

basically each of them is a "link" to another repo

#

when you clone the main one

cold field
#

Oh

rigid drum
#

it clones the submodules

tender shard
#

btw stop posting 1.8 stuff lmao

rigid drum
#

it works but has one fetal flaw...

#

which is that you cannot build a submodule without it's parent beacuse the build tool will be setup as a submodule not as a primary project.

cold field
#

I see...

#

Mhhh, interesting point. Can you make an example when you need a sub repo?

regal lake
#

Somebody used the worldguard api before ?
I try to check if a player is allowed to break a block, but the api always returns true..
I don't know why.. without api i can break blocks on that location...
My Function looks like this: https://paste.md-5.net/uyaciyedel.java

proud basin
tender shard
tender shard
#

because that's what you'd normally do when trying to support ALL protection plugins

regal lake
#

Never did that before, do you have a example for that ?

tender shard
#
BlockBreakEvent event = new BlockBreakEvent(...)
Bukkit.getPluginManager().callEvent(event);
if(event.isCancalled()) {
  // not allowed
}
#

sth like that

rigid drum
#

@cold field Ok well for me a not uncommon time is when I create a new component engine... I may create:

/Name/Architecture
  jvm-main
  js-main
  native-main
/Name/Components/Java
  jvm-main
/Name/Components/Redis
  jvm-main
  js-main
  native-main
/Name/Components/Bukkit
  jvm-main
/Name/Components/Bungee
  jvm-main
/Name/Components/React
  js-main
#

But you could also just have a single project...
/Name

with submodules that are not separate repos

#

both options have pros and cons

regal lake
tender shard
#

np! Dm me when you got questions, I think we already know each other^^

rigid drum
#

I would not do that

#

because the block isn't actually breaking

#

The api almost certainly has a solution for you I know it has in the past

toxic mesa
#

I'm probs (once again) stupid but what am I missing?
If i just have a private class private PacketInterface packetInterface;
And do this

        if (version.equals("v1_17_R1")) {
            packetInterface =  new Packets_1_17_R1();    
        }

(which gets triggered)
Y is this triggered later? (in a diff method but the same class)

        if (packetInterface == null) {
            Bukkit.broadcastMessage("wot?");
            return;
        }
rigid drum
#

IIRC you need to get the current region and then check the region flags or some such.

tender shard
#

all I can imagine is cancelling the event by oneself on HIGHEST

hexed hatch
#

I'm ruined

rigid drum
#

@tender shard why would it not have a solution?

tender shard
#

Because noone implemented it, probably

#

I don't see any "canBreakBlock" method somewhere in spigot^^

rigid drum
#

@toxic mesa can you send a bit more code?

#

@tender shard sure but this is a worldguard thing

tender shard
#

oooh you misunderstood @rigid drum

#

I was suggesting that, to support ALL protection plugins, the BlockBReakEvent should be called

eternal night
rigid drum
#

@regal lake take a look at what EmPee sent

#

that seems to be doing what you want šŸ˜›

tender shard
#

of course when it's only about worldguard, there's a method for that, that's true ofc

eternal night
#

tbf tho a rather new addition to the API

tender shard
#

but other plugins like CoreProtect, Essentials etc could still block the block breaking

rigid drum
#

oh thank god they added that

tender shard
#

that's why I suggested to use a generic event

rigid drum
#

It was such a pain before lol

regal lake
rigid drum
#

@tender shard sure but in that case it depends on what his goal is... if the goal is to actually break a block calling block break event is certainly the right call.

tender shard
toxic mesa
regal lake
tender shard
#

it depends what you are trying to do

regal lake
#

Oh okay

tender shard
#

when you want to break the block indeed, then you're fine by calling the event

#

when you just want to check it hypothetically without actually breaking the block, you might get false logs by logging plugins

#

I hope you know what I mean šŸ˜„

rigid drum
#

Ah ok @tender shard I recommend you don't allow it to be null

#

for example

regal lake
#

yes šŸ˜„

rigid drum
#
final Packets packets;
{ switch (version) {
    case "v1_17_R1": packets = new Packets_1_17_R1(); break;
    case default: error("No packet interface for version: $version")
} }
outer crane
#

How do I give an item with PDC data a specific texture?

#

(with a resource pack)

rigid drum
#

obv if ur interested in statics you can make both the initializer and the field static

toxic mesa
late thorn
#

how do i get the ParticleEffect dependency?

outer crane
#

what do you mean by that

rigid drum
#

I mean I sort of agree but it seems like maybe you have 2 instances of "the class where the shit is going on"

#

one you call startup and it's true

#

and the other you do not

#

but generally making things more immutable will reduce the potential for bugs

toxic mesa
#

das a good point

#

ty!

rigid drum
#

because then in order to even use the class it has to be initialized already.

outer crane
eternal night
outer crane
#

found it first :p

eternal night
#

wow xD

#

but yea, PDC cannot modify anything minecraft actually respects

outer crane
#

yeah i got mixed up with other things

#

because those are useful for some custom items so thats what i thought of

tender shard
#

are you talking about XSeries?

late thorn
hexed hatch
tender shard
#

that github repo doesnt any information about gradle / maven dependencies etc

#

seems like you have to add the .jar manually to your classpath etc

#

are you using maven / gradle / something similar?

eternal night
#

clone the repo and run mvn install to install it into your local maven repository

#

anywhere on your machine ?

late thorn
#

i've never really used maven anywhere and no good documentation or tutorials anywher

opal juniper
gusty briar
#

does anyone know how i can get the second skin layer of my npc to load? this isn't doing anything to the layer: no errors at all..

  //npc is an EntityPlayer
  npc.getProfile().getProperties().put("textures", new Property("textures", texture, signature));
  npc.getDataWatcher().register(new DataWatcherObject<>(17, DataWatcherRegistry.a), (byte)127);
  connection.sendPacket(new PacketPlayOutEntityMetadata(npc.getId(), npc.getDataWatcher(), true));
#

i'm using 1.17

chrome beacon
lean gull
#

its in the message

gusty briar
late thorn
gusty briar
#

yeah it is

#
player.getItemOnCursor().equals(Material.AIR
//and
e2.getCurrentItem().getType().equals(Material.AIR)
gusty briar
#

oh yeah i see

#

my bad

lean gull
#

its in the code i sent

chrome beacon
#

We cannot help you without the code

#

It's not

#

You sent the wrong class

lean gull
#

it is

#

wdym

chrome beacon
#

I told you this a few hours ago

lean gull
#

gimme a sec

#

you need CraftingRecipes, right?

chrome beacon
#

Yes

lean gull
chrome beacon
#

So list[0] is null

#

You should check that

quasi nymph
#

does anyone know how to fix this? I've been trying to download 1.8 spigot using buildtools, the only thing i modified was portable git to the latest portable git and maven

lean gull
unkempt peak
#

Why 1.8?

chrome beacon
lean gull
#

is not

quasi nymph
# unkempt peak Why 1.8?

no reason, I don't want to talk about how i had the addiction of getting types of minecraft servers.

#

anyways lets get to the point

#

why did it crash

unkempt peak
#

Ok well make sure build tools is up to date

lean gull
#

wait it's getInventory not getClickedInventory

quasi nymph
#

it should be, I re downloaded it yesterday

unkempt peak
#

Idk maybe you need an older version of buildtools to download a spigot version that old

quasi nymph
#

no it worked making a 1.8 jar before it did this

unkempt peak
#

The only thing I can think of is downgrading the stuff you upgraded

quasi nymph
#

Ok.

paper viper
#

you are using java 8 right

quasi nymph
#

I usually reinstall java 16 after

quasi nymph
atomic gyro
#

Anyone know how to get data from the actual minecraft.jar, or from datapacks?

hexed hatch
#

by data you mean?

rigid drum
#

I mean roughly speaking rename .jar to .zip

#

and then you can look through it

#

but to see the code itself in a readable way you need to decompile that

lean gull
#

i still need help btw, i'm trying to figure it out alone but it's not going very well

gusty briar
#

nms :(

#

so annoying lmao

errant snow
#

Anyone know of a way to generate an end island?

#

Like the default island that the dragon spawns on

eternal night
#

don't you have to set count to 0

#

no

#

it still spawns a single particle

#

but the particle should not go into any direction xD

late thorn
#

yeah

#

how would i even do that

eternal night
#

do what

late thorn
#

using player.getEyelocation()

eternal night
#

afaik the three 0's are responsible for that if you set count to 0

#

tho that only works on some particles

#

let me link you an indepth tutorial

lean gull
#

i need help again:
i'm making a crafting table custom gui thing and i have one problem: idk how to make sure the player gets the right recipe they're looking for since lets say you want to make a crafting table, but a crafting table's recipe also has 2 vertical oak planks which can also make 4 sticks, so how do i know wether they want to make sticks or a crafting table?

#

btw im checking for everything instead of making a method for it

#

ok scratch that im gonna use vanilla crafting to make the custom one... btw new question: how do i do that

onyx fjord
proud basin
#

@paper viper if I had sr.getScaledWidth() - (this.width / 2 - 35) that should to the right side correct

paper viper
#

god damn it you did it wrong again

proud basin
#

How

#

How am I suppose to put it all the way to the right

#

without a constant

#

makes no sense

paper viper
#

Then just do everything in terms of relativeness to the width?

#

This is not super hard...

#

like try stuff like

#

sr.getScaledWidth() - this.width/3

#

or something

proud basin
#

like this

#

sr.getScaledWidth() - (this.width / 6), sr.getScaledHeight() - (this.height * 14)

paper viper
#

Yes, that's fine

#

actually

#

no it isnt

proud basin
#

no?

#

I need to divide it?

paper viper
#

let me tell you why

#

what if the scaled height is smaller than this.height * 14

#

then you get a negative coordinate

proud basin
#

hm

#

so do you always need to divide?

paper viper
#

Not necessarily

#

also im just really tired and we had the 3 hour conversation yesterday so im really not in the mood rn to talk

#

sry

eternal night
#

kind of rude pulse 😭

#

how could you

paper viper
eternal night
#

is there really no discord more specific to this ?

#

like this is just forge mod development right ?

proud basin
#

no

eternal night
#

oh yes it is "forge gradle"

paper viper
#

hes just having an issue with relative stuff

#

like you know when building responsive sites

#

you have to make everything relative and use relative terms

#

he keeps using constants rn

eternal night
#

ah yes, the pain of every developer xD

paper viper
#

Mhm

onyx fjord
#

Position relative

#

Position absolute
left: 50%
transform: translateX(-50%)

#

xD

eternal night
#

šŸ™

#

the one and only way

onyx fjord
#

No flexbox better

eternal night
#

real heros just do that with incrementing z indexes

paper viper
onyx fjord
#

Margin 0 auto

proud basin
#

O; wait should I have a offset?

#

see this is what I did with what I was doing yesterday I added a offset sr.getScaledWidth() - (this.width / 2 + 80) - smallOffset

paper viper
#

no just no no

proud basin
#

it works though

paper viper
#

if you are setting smallOffset to a constant

#

it wont work

proud basin
#

well

paper viper
proud basin
#

it does

paper viper
#

it might work for yours

#

it doesnt work for everyone else

#

...

proud basin
#

I got 2 different size monitors

#

and it works fine

#

on both

paper viper
#

Now what about other devices?

proud basin
#

mobile?

paper viper
#

sigh

eternal night
#

where is rem on forge

paper viper
#

or JavaFx

#

i stg

onyx fjord
#

rem

proud basin
#

I made my window size smaller

#

and it's still fine

eternal night
#

idk btw there is a 30k member moddedmc discord

proud basin
#

until you hit like the smallest thing it becomes weird

eternal night
#

that has a channel where people talk about modding xD

#

maybe they have some cool frameworks or smth

onyx fjord
#

Modmenu

#

šŸ‘

paper viper
#

sadly in Java they dont have rem unit cause omega dumb

#

we have to calculate our own constant for the rem based on size but its not gonna be exact anyways

onyx fjord
#

Just use fixed position ez clap

eternal night
#

actually how hard would calculating a font based unit be

#

to multiply your offsets etc with

#

can't be too complex

lean gull
#

question: how do i wait a tick

#

before doing more code

paper viper
#

bukkitschedualer

#

?schedulaing

#

i cant spell

hexed hatch
#

Is it a bad idea to use universal Java multithreading methods with Spigot plugins?

paper viper
#

?scheduling

undone axleBOT
paper viper
#

I use Executors and a ton of multithreaded stuff

hexed hatch
#

Sick

ivory sleet
#

not at all gizmonster

#

in fact it might even be considered clever

hexed hatch
#

omg!

paper viper
#

I use parallel computation everywhere

#

lol

eternal night
#

also very very useful in completable futures

#

which uses javas common fork join pool under the hood

hexed hatch
#

I mean for my purposes it's extremely simple, but I was just going to create a thread instead of using bukkit scheduler for simplicity sake

paper viper
#

there is honestly no reason to use Bukkit's scheduler for async stuff if you arent working with ticks

#

lol

eternal night
#

creating a thread is pretty useless tho

#

just submit it to a thread pool

#

and live a happy life

ivory sleet
#

myes the craft scheduler using a cached thread pool

paper viper
#

parallel streams are one of the hottest things

ivory sleet
#

have seen it being abused occasionally by bad plugins :I

eternal night
#

parallel streams are spooky

#

yea

paper viper
#

why ;]

ivory sleet
#

r they truly parallel tho

paper viper
#

oh yeah they do throw exceptions but thats only if you use them incorrectly

#

lol

#

like ArrayIndexOutOfBoundsException

eternal night
#

I mean in most cases the overhead of parallel is murdering the point

paper viper
#

Yeah thats why I only use it for heavy tasks

eternal night
#

unless you actually use streams for heavy task-

#

oh

#

using streams for heavy tasks smh

#

why are streams so slow java 😦

ivory sleet
#

hmm ye good point

paper viper
#

lol

ivory sleet
#

its readable as hell tho

eternal night
#

imagine if javac would actually optimize them

ivory sleet
#

🄲

eternal night
#

like rust vec

#

the possibilities 😢

proud basin
#

wait

#

do you only use offsets if it's gonna be equal both sides?

lean gull
#

how do i remove 1 of an itemstack in an inventory

lean gull
#

oh nvm i see what i did wrong

proud basin
#

Where would this go on a graph sr.getScaledHeight() + (this.height / 2) ?

ancient plank
lean gull
#

i already did :p

torn oyster
#

how would i replace all words in a string that are in a certain list with *
for example, if the string was "Hey guys, how are you?" and "Hey" is in that certain list, it would become
"*** guys, how are you?"

ivory sleet
#

regex is one way

torn oyster
#

if u couldnt guess

#

im making an antiswear