#help-development

1 messages ยท Page 857 of 1

grim hound
#

how else?

tender shard
#

and how does that look like?

warm mica
#

Why would you do that, of course that won't work with the bukkit api

warm mica
grim hound
#

what?

#

"not possible"?

#

10 years of coding?

#

I'm not having this conversations any longer

shadow night
warm mica
tender shard
grim hound
tender shard
#

what's the issue with having the original jar?

shadow night
fallow violet
#

Block Destroy Events

warm mica
grim hound
#

Wtf do you mean

#

Okay, what were you trying to help me with?

fallow violet
grim hound
fallow violet
#

he is trying to help and if you know it better than dont ask and leave the server

ivory sleet
#

Lets chill

warm mica
#

Why the hell are you getting so mad at?

grim hound
#

I was enlightening him with what a virtual inventory was

#

and now he thinks he was helping me

warm mica
grim hound
fallow violet
#

okay what ever just forget it

grim hound
#

.

shadow night
fallow violet
warm mica
grim hound
#

.

#

I even sent how it can be done

grim hound
fallow violet
#

with virtual items he means items that exist but only in the gui

#

idk if he explained it already

grim hound
#

.

fallow violet
#

but everything is sent via packages... no?

warm mica
grim hound
grim hound
#

DO

#

NOT

warm mica
#

Dayum

grim hound
#

The client thinks they do

fallow violet
#

now i got your point, you fake the items basically

grim hound
#

the server doesn't know about them

grim hound
#

Marcely couldn't get that for some reason

fallow violet
#

so you dont create the itemstack you just send the user the item
how do you detect clicks on these? idk very much about packages

grim hound
#

do you sleep well, Marcely?

fallow violet
grim hound
fallow violet
#

not a reason to let it out on him

warm mica
#

I would ask what is the point of doing that, but I don't want you to pass out

grim hound
warm mica
#

You can do all that using bukkit api

grim hound
fallow violet
#

and how do you listen on them? is there a package event in nms or something like that?

grim hound
#

which has a netty Channel delegate

#

you inject your packet handler

warm mica
fallow violet
grim hound
#

and it intercepts the packets

warm mica
#

No need to listen to any packets

grim hound
fallow violet
#

lol yeah im lost

warm mica
fallow violet
#

idk

#

you cant use these items?

grim hound
warm mica
fallow violet
#

i mean you cannot bug them out of the inventory

#

some way

fallow violet
#

idk

#

IDK

grim hound
#

cuz only the client thinks they exist

#

the server knows they don't

fallow violet
#

yes but the benefits

#

what are they

grim hound
#

am just gonna send you a vid

fallow violet
#

okok

grim hound
#

damn it's too big

fallow violet
#

then explain it slightly

grim hound
fallow violet
#

or like that

tender shard
grim hound
#

you see these items

tender shard
tribal valve
#

let's say i have 2 array lists, teams and players, how can i assign each player to it's own team?

fallow violet
#

but you can do this all with the bukkit api i dont get the packets point yet

grim hound
#

if you use the bukkit api they'll be either removed or some other funky stuff

#

and the "X" will be visible

#

but if you only tell the client that it's there

#

you can have it look pretty

fallow violet
#

what x?

grim hound
fallow violet
#

wait

#

fr

#

bukkit update this?

grim hound
grim hound
grim hound
#

but if you virtualize the items and manually handle the packet flow

#

you can remove it

tribal valve
grim hound
#

well

fallow violet
#

you create scoreboard teams and assign them

inner mulch
#

we dont know what you are doing

tribal valve
grim hound
#

isn't there any method like Team#addPlayer

fallow violet
#

^

grim hound
grim hound
inner mulch
grim hound
inner mulch
#

i thought it was some kind of minigame with teams

grim hound
#

Scoreboards are team-related

#

for some reason in the bukkit api

tender shard
#

@shadow night the proper way is to make github simply only upload the files you need. the dirty solution is to adjust the maven-shade-plugin's configuration:

                    <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                    <finalName>${project.artifactId}-${project.version}</finalName>
#

this will give you only the shaded .jar called artifactId-version.jar

#

e.g. like this

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                    <finalName>${project.artifactId}-${project.version}</finalName>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
tribal valve
#

the gameteam is a custom class

#

like teams[0].addPlayer(players[0]) but i think it's bad

tender shard
#

for Player player : players
for Team team : teams
player.addTeam(team) // or whatever

fallow violet
#

^

tribal valve
#

wouldn't that make multiple players join the same team/players be in multiple teams

fallow violet
#

but thats what you wanted?

tender shard
#

that's what you asked for

grim hound
tribal valve
tribal valve
fallow violet
grim hound
tender shard
fallow violet
#

what do you want @tribal valve ?

tribal valve
glad prawn
#

then Map?

tribal valve
# grim hound show it's variables
    private TeamColor teamColor;
    private List<Player> teamPlayers = new ArrayList<Player>();
    private List<Player> alivePlayers = new ArrayList<Player>();
    private List<Player> spectatingPlayers = new ArrayList<Player>();
    private TeamBlock teamBlock;
    private Location teamSpawnPosition;
    private Location teamGeneratorPosition;
    private Location teamBlockPosition;
    private Location teamShopPosition;
    private Location teamUpgradesPosition;
    private boolean isBlockActive = false;
    private BlockWars plugin;
    public void initializePlayers(List<Player> players) {
        if (this.teamBlockPosition != null && this.teamSpawnPosition != null) {
            for (Player p : players) {
                teamPlayers.add(p);
                p.teleport(this.teamSpawnPosition);
                setDefaultItems(p, this.teamColor);
            }
            this.teamBlock = new TeamBlock(teamBlockPosition.getBlock(), this);
            if (players.stream().count() <= 0) {
                this.teamBlock.deactivateBlock();
            }
            alivePlayers = teamPlayers;
        }
    }
tribal valve
fallow violet
#
for (int i = 0; i < teams.length; i++) {
  team[i].addPlayer(players[i]);
}
#

?

#

maybe

inner mulch
#

Set<ClassA<?, ClassB<?,?>>> , this is red, the ? values are all defined as generic in the class, i want to store them in a set, i dont know what these values will be, but using ? as a generic type results in it being underlined red, am i doing something wrong?

tribal valve
glad prawn
tribal valve
fallow violet
inner mulch
grim hound
#

classes are only 1-parametered

#

Set<ClassA<? extends ClassB<?>>>

tribal valve
grim hound
#

Class<?> is possible

fallow violet
grim hound
#

Class<?, ?> is invalid

tribal valve
grim hound
tribal valve
#

so what should i do

fallow violet
grim hound
#

@inner mulch

tribal valve
grim hound
#

oh wait not it's a set

fallow violet
inner mulch
#

datamanger has 2 generics, the second one always has to be a dataholder which also consists of 2 generics

grim hound
#

DataHolder

#

show the class

tribal valve
grim hound
#

it's decleration

fallow violet
hallow lion
#

Well i found and made my own version of the ChannelDuplexHandler, however i can't find where you inject it to a player?

tribal valve
grim hound
#

what does IntelliJ say?

fallow violet
tribal valve
tribal valve
#

also is there a faster way to change plugin versions rather than needing to restart the server because the file is in use?

tribal valve
hushed spindle
#

it seems that AttributeInstance#addModifier(new AttributeModifier(String, Double, Operation)); (removeModifier also) sometimes causes ArrayIndexOutOfBoundsException, would that be a bug worth reporting

grim hound
#

building the plugin straight into the plugins folder

tender shard
fallow violet
#

on windows there is a problem with overwriting the plugin
i just avoid it using a server on linux and upload my files via winscp

tender shard
#

really? lol why

tribal valve
tender shard
#

maven or gradle?

tribal valve
#

maven

tender shard
#

If youโ€™re using maven for your Spigot plugins (which you should do), itโ€™s easy to make maven automatically save your pluginโ€™s .jar in your plugins folder. Thereโ€™s two ways of doing this: 1. The lazy way (not recommended) If you only work alone on one computer, you can just directly declare the output location in...

fallow violet
#

^

tender shard
#

this should work even on weird windows

fallow violet
#

xd

tribal valve
fallow violet
#

you have to check if the lists match the size

#

some work you have to do on your own

tender shard
# tribal valve i told you...

no, you told us you wanted to add player 0 to team 0, etc.

However you did not tell us that your team list is empty

tribal valve
#

sometimes it's empty

tender shard
#

well then you should wonder why it's empty

fallow violet
#

then check for the case

tender shard
#

obv you cannot map it 1:1 if the lists aren't already matching

#

if you got 10 players and only 9 teams, how should we know whether it's missing the team entry for the first player, the last player, or the third?

grim hound
tribal valve
#

wait but how is it empty when im passing online players

fallow violet
tribal valve
fallow violet
grim hound
#

I said it first

cunning vector
#

good night friends how can I move a plugin I bought to another account I will switch to a new account.

tribal valve
fallow violet
grim hound
fallow violet
#

he didnt

#

he just saw it and accepted it

grim hound
#

I dislike the word "cringe"

fallow violet
tribal valve
fallow violet
#

hover over it and read the exception

tribal valve
fallow violet
#

it says "plugin not found"

#

so it doesnt exist for your linter

hazy parrot
#

What

tribal valve
#

but the other ones are white

tender shard
#

Sometimes, people suggest you to change something in your pom.xml, and then IntelliJ starts to complain: That is totally normal. You simply have to click the โ€œmaven reload buttonโ€ in IntelliJ. Maven will then continue to download the required dependency/plugin, if itโ€™s available. After a few seconds, everything should be fine. You can find the.....

fallow violet
#

well you have to reload it ....

tribal valve
#

okay it doesn't highligh as red in the maven rightbar but still in the pom xml

tender shard
#

just ignore it

tribal valve
#

okay

tender shard
#

IJ is stupid

tribal valve
#

thanks

fallow violet
#

the best way to check if its working, testing it

#

just build it and it should work

tribal valve
#

i think it works thanks

grim hound
#

what kind of IDs are shown here?

vocal cloud
#

integer ids?

grim hound
#

I'm asking what they mean

#

They aren't the protocol ids nor the legacy ones

eternal night
#

the legacy ones should have the "Proper" legacy ids

grim hound
eternal night
#

random garbage

grim hound
#

Bruh

slender elbow
#

new items and blocks don't have a numeric id

#

so it's just meaningless

vocal cloud
#

At least for 1.19.4 (the docs I have DL'd) and doing the research for you.

eternal night
#

Yea that is old legacy materials tho

#

ยฏ_(ใƒ„)_/ยฏ

vocal cloud
#

Yes, but that's "what it does"

rotund ravine
#

Prpbably just plopped smth in

eternal night
#

tru

tribal valve
#

why doesn't it show the footer space?

        //Footer
        Score footer = objective.getScore("Blockwars.net");
        Score footerSpace = objective.getScore(" ");
        //Teams
        GameManager manager = plugin.getManager();
        Score redTeam = objective.getScore("R Red " + (manager.isTeamDead(manager.getTeamByColor(TeamColor.RED)) ? "dead" : "alive"));
        Score blueTeam = objective.getScore("B Blue " + (manager.isTeamDead(manager.getTeamByColor(TeamColor.BLUE)) ? "dead" : "alive"));
        Score greenTeam = objective.getScore("G Green " + (manager.isTeamDead(manager.getTeamByColor(TeamColor.GREEN)) ? "dead" : "alive"));
        Score yellowTeam = objective.getScore("Y Yellow " + (manager.isTeamDead(manager.getTeamByColor(TeamColor.YELLOW)) ? "dead" : "alive"));
        Score aquaTeam = objective.getScore("A Aqua " + (manager.isTeamDead(manager.getTeamByColor(TeamColor.AQUA)) ? "dead" : "alive"));
        Score whiteTeam = objective.getScore("W White " + (manager.isTeamDead(manager.getTeamByColor(TeamColor.WHITE)) ? "dead" : "alive"));
        Score pinkTeam = objective.getScore("P Pink " + (manager.isTeamDead(manager.getTeamByColor(TeamColor.PINK)) ? "dead" : "alive"));
        Score grayTeam = objective.getScore("G Gray " + (manager.isTeamDead(manager.getTeamByColor(TeamColor.GRAY)) ? "dead" : "alive"));
        //Upper
        Score upperSpace = objective.getScore(" ");

        footer.setScore(0);
        footerSpace.setScore(1); //doesnt show that
        grayTeam.setScore(2);
        pinkTeam.setScore(3);
        whiteTeam.setScore(4);
        aquaTeam.setScore(5);
        yellowTeam.setScore(6);
        greenTeam.setScore(7);
        blueTeam.setScore(8);
        redTeam.setScore(9);
        upperSpace.setScore(10);

        player.setScoreboard(scoreboard);
eternal night
#

because its the same score as upper case

#

both a single space

rotund ravine
#

Nvm

grim hound
#

and I need to input numerical ids

eternal night
#

network ids are completely different

grim hound
#

so I guess they kinda do

quaint mantle
#

How can I cancel other event when this part of the code is executed?

shadow night
#

there is a palette iirc

grim hound
rotund ravine
eternal night
#

they depend on yea ^

tribal valve
rotund ravine
#

Nothing static anymore

glossy venture
#

holy fucking shit i thought i finally found a temporary raycast solution until i fix mine but its doing reflection on each entity for each step

#

and this guy presents it as great for anticheats

rotund ravine
#

Cache the method smh

vocal cloud
#

Cache dab

rotund ravine
#

Jk, just use mojmap

glossy venture
#

on 1.8

vocal cloud
#

oof size: large

rotund ravine
glossy venture
grim hound
#

Caching one Method?

glossy venture
#

no thats not what im talking about

grim hound
#

oh okay

#

mb

tribal valve
#

can i put quick if statements inside each other? like
(boolean ? (boolean ? true : false) : false)

glossy venture
#

its probably not terrible but still theres a much more obvious way to do it so yeah ig im modifying the whole thing

rotund ravine
#

Ternary operator btw

tribal valve
# grim hound Why would you do this

Score redTeam = objective.getScore("R Red " + (manager.isTeamDead(manager.getTeamByColor(TeamColor.RED)) ? ChatColor.RED + "โœ•" : ChatColor.GREEN + "โœ“"));

grim hound
#

is it's equivalent I think

tribal valve
tribal valve
grim hound
#

pretty unreadable

tribal valve
#

yea ik but i don't have any idea how to simplify it better

grim hound
#

lemme help ya with that

#
String sign = manager.isTeamDead(manager.getTeamByColor(TeamColor.RED)) ? ChatColor.RED + "โœ•" : ChatColor.GREEN + "โœ“";
Score redTeam = objective.getScore("R Red " + sign);
tribal valve
#

i have to do that for 8 teams?

minor junco
#

When was setComments added to the spigot api?

grim hound
#

or just a generalising method

vocal cloud
glossy venture
vocal cloud
#

If you're working for a server with 10 players it doesn't matter anyways KEKW

#

They won't find out (until they do)

glossy venture
#

i know im making my own server for fun but im just amazed by how unperformant u can make ur code

vocal cloud
#

Hey, making the server run at 10tps is better because it's more base10 than 20

tribal valve
# grim hound create a static method
        Score redTeam = objective.getScore(manager.getScoreboardTeamScore(TeamColor.RED));
        Score blueTeam = objective.getScore(manager.getScoreboardTeamScore(TeamColor.BLUE));
        Score greenTeam = objective.getScore(manager.getScoreboardTeamScore(TeamColor.GREEN));
        Score grayTeam = objective.getScore(manager.getScoreboardTeamScore(TeamColor.GRAY));
        Score pinkTeam = objective.getScore(manager.getScoreboardTeamScore(TeamColor.PINK));
        Score whiteTeam = objective.getScore(manager.getScoreboardTeamScore(TeamColor.WHITE));
        Score aquaTeam = objective.getScore(manager.getScoreboardTeamScore(TeamColor.AQUA));
        Score yellowTeam = objective.getScore(manager.getScoreboardTeamScore(TeamColor.YELLOW));
    public String getScoreboardTeamScore(TeamColor teamColor) {
        GameTeam team = getTeamByColor(teamColor);
        String teamName = "U Unknown";
        teamName = team.getTeamColor().formattedName().toUpperCase().substring(1,1) + team.getTeamColor().formattedName();
        //โœ• โœ“
        String teamInfo = isTeamBlockActive(team) ? " โœ“" : (team.getAlivePlayers().size() >= 1 ? " (" + team.getAlivePlayers().size() + ")" : " โœ•");
        return teamName + teamInfo + "  ";
    }
``` better?
quaint mantle
#

Bruh

#

Use a map

glossy venture
#

now im using this forum

#

code

#

oh it doesnt work either

#

sick

vocal cloud
#

Time to write a spigot PR KEKW

glossy venture
#

abt what?

misty garden
#

Hello, I'd like to protect the plugins I sell. What type of protection do you recommend? I've done a bit of research and I've found protection by license, which doesn't sound too bad, except that I don't know much about it

#

like a license

vocal cloud
#

The best protection is good support.

tender shard
#

^

tender shard
vocal cloud
#

Any protection can be broken in half the time it takes you to integrate it. No offense your plugin is probably not worth stealing. If it IS worth stealing then provide quality support to those that do purchase it.

tender shard
#

All you could do is blacklist IPs and then people just block your webserver in /etc/hosts

quaint mantle
#

That's wild

tender shard
#

All I do is to have an automatic discord verification system so people need to get verified to get support

quaint mantle
#

He could've had a 1:1 hypixel remake

#

And yall just saying his plugin ain't that good

misty garden
#

So I think I've expressed myself badly, I'd rather say if I wanted my plugin not to have 1000 users when there was only one buyer. So do you have a solution?

tender shard
vocal cloud
tender shard
vocal cloud
#

Don't focus on DRM. Focus on making a quality product that people will be willing to pay for.

tender shard
#

99% of people who use cracked plugins wouldn't have bought it anyway

quaint mantle
#

Just make the first purchase cost very high

#

so you get the most money before 1000s have it

tender shard
#

20$ is maximum on spigot lol

quaint mantle
#

Oh

pseudo hazel
#

anyone got this when joining a server? it only happened once but I had t restart the game since the buttons where out of the screen xD

quaint mantle
#

Is that supposed to happen

worldly ingot
#

Yeah it's been happening a lot lately. Mojang issue, not much you can do about it

tender shard
#

it's also printed to console

vocal cloud
#

lol looks like they're going the electron route.

quaint mantle
vocal cloud
river oracle
vocal cloud
#

you should write more debug code.
log "boolean set to"
and "boolean checked as"

kind hatch
#

Oh, and this.

grim hound
#

enum comparison

#

with .equals

tender shard
#

creating a new random

vocal cloud
#

I mean it worksโ„ข๏ธ

grim hound
#

creating a new random each time

#

getting the configuration at runtime

#

BRO

shadow night
#

sounds like skill issue

inner mulch
#

has anyone a lightweight solution to track whether a player is afk or not? (comparing the timestamp the last time a playermoveevent has been called on the player is not lightweight (at least i think so))

shadow night
#

hmm, if I have this list of objects. I have a class that can contain all of that, I also have two other classes for the "workflow" and "repository". How could I get this list and make an array of it with my classes?

quaint mantle
pseudo hazel
steel swan
#

Anyone has any idea on how to put a custom 3D texture on an item? (using ressourcepacks)

inner mulch
#

itemstack.setCustomModelData()

bleak stream
# steel swan Anyone has any idea on how to put a custom 3D texture on an item? (using ressour...

Custom model data is a numeric NBT tag written inside of an item model JSON in Minecraft, used to display multiple variants of already existing items.

We can use this as a "hack" to add our own textures and items without Forge or any client side mods. All you need is a resource pack.

In this video, we'll cover:

  • Creating a custom resource p...
โ–ถ Play video
#

Came out yesterday

steel swan
pseudo hazel
#

it would be the same, you can look how the trident model works by looking it up

#

I think it has different models for the hand, etc

shadow night
#

3d stuff is just models

#

and some goofy looking texture ofc

warm mica
tender shard
warm mica
#

That's interesting, thanks

tender shard
#

it seems to print (or not print) warnings when either /save-all is ran by a plugin although autosave is on, or when a plugin registers listeners for deprecated events. Maybe more, but that's all I found on first glance now

proud badge
#

Wait so I think I get it now, instead of making a static method I just make it an object and I create that object when the server starts?

#

Though what is the benifit from this, is static really that laggy?

tender shard
#

laggy? wdym?

proud badge
#

People hate static things

#

Is it really that performance draining?

tender shard
#

of course not

warm mica
#

Java was designed, and is able to, handle an incredible amount of objects

proud badge
#

Then why do people hate it

tender shard
#

because people abuse static to have easier access to things, when in reality static is meant to be used if something belongs to the class itself, instead of an instance of the class

warm mica
tender shard
#

this manager thingy will most likely not belong to the class but to the instance and hence it shouldn't be static

proud badge
#

im adding players to a list when they join the server, and the PlayerJoinEvent is in another class

#

this is all in my database functions class

hushed spindle
#

?paste

undone axleBOT
tender shard
# proud badge this is all in my database functions class

also: by having everything static there, you totally remove your ability to reuse this class. Let's imagine you'll later on want to have a different Manager thing per world - you can't do that if everything's static. If it's not static you could just create one instance per world, without having to change anything else

#

you could just do new MyManager() whenever you need a new instance and they'd all be independent from each other

#

it's way better to turn of all this into instance methods and fields, and then have a public method on your plugin getMyManager()

proud badge
#

so like I said, make this an object and create one object when the server starts?

tender shard
#

yep, that's how I'd do it

#
public class MyPlugin extends JavaPlugin {

  private MyManager myManager = new MyManager(this); // Pass your plugin instance in case the manager needs one

  public MyManager getMyManager() { return myManager; }

  // ...
}
tribal valve
#

how to make them not fly around (the white point is the spawn location)

    public void startGenerator() {
        if (spawnTask != null) {
            spawnTask.cancel();
        }
        spawnTask = new BukkitRunnable() {
            @Override
            public void run() {
                if (spawnLocation != null) {
                    plugin.getServer().getWorld("world").dropItemNaturally(spawnLocation, spawnItem);
                }
            }
        }.runTaskTimer(plugin, 0, spawnRate * 20);
    }
```code
tender shard
#

use dropItem isntead of dropItemNaturally

#

if that doesn't work, you can additionally provide a Consumer<Item> that sets the velocity to 0

proud badge
tribal valve
tender shard
tender shard
#

you shouldn't give them access to any fields from outside the class

#

if the field would be public, you'd basically promise everyone "you can re-assign this field's value if you like" while obviously you don't want that to happen

#

the field also cannot be final in this case for obvious reasons

hushed spindle
#

did something recently change with the entity attributes part of spigot because im getting a lot of exceptions leading into crashes lately

#

AttributeInstance#removeAttribute() seems to sometimes cause ArrayIndexOutOfBoundsExceptions and AttributeInstance#getModifiers() sometimes causes nullpointerexceptions because ???

hazy parrot
#

can you provide stacktrace

hushed spindle
#

this is the most recent one

torn shuttle
#

are there any losers website development enjoyers in chat that have worked on several multilingual websites

hushed spindle
#

and this is the line in question referenced

#

which

#

getModifiers() should not be triggering that

torn shuttle
#

I'm wondering how I should structure mulitlingual pages, if I put website directories in language directories or put language directories in website directories

terse ore
#

Are effects like haste that cant be gotten from a potion get cleared with Player#clearActivePotionEffects?

terse ore
#

thanks ๐Ÿ‘

tender shard
#

enter data get entity <yourEntity> in console and send the whole output

hushed spindle
#

can getModifiers() contain null elements?

#

yeah see i cant do that because its inconsistent as hell

tender shard
#

it shouldnt be able to but it looks it does in your case

#

check the output of data get entity for your entity and then check the modifiers directly

hushed spindle
#

i can run the server for a good half hour before this starts happening

#

yeah ill try that

#

rather ill try catch and output entity data

#

same line?

tender shard
#

Maybe throw a Bukkit.dispatchCommand("data get entity @e[uuid=<entityuuid>] into the catch block?

#

data get entity would show the complete NBT tags, so it shouldn't be able to fail when trying to get the modifiers or anything

hushed spindle
#

this is the main reason i think its a bug because how in the hell am I getting a NegativeArraySizeException when im not working with indexes

#

unless its a bug

tender shard
#

well first of all, try using spigot

#

and second, the -1 comes from some line of code using indexOf(someObject) before throwing the result into the next step, and indexOf will be -1 if it's not containe din the collection or whatever

hushed spindle
#

ah right good thing

steel swan
#

i achieved to modify and create a custom 3D texture for the minecraft sword, but i dont know how to do it with trident

shadow night
#

Might be true as optifine does a lot for customizing texturepack, but I have no idea

tribal valve
#

is there a tutorial on how to secure the code, like to keep the code away from logging errors to console etc

inner mulch
#

no more nullpointerexceptions in console?

tribal valve
#

yea sum like that but like a tutorial that tells me how to secure it from all errors

#

not only null

inner mulch
#

there probably wont be a tut

#

its experience

#

and you have to think your code through

#

bugs are always there

tribal valve
#

i kinda wanna sell/add the plugin to spigot site, the code is not secure at all and its kinda bad because its my second plugin

inner mulch
#

if you are scared of exceptions you can use
try {
//bla bla
} catch (exception that you want) {
//code if exception
}

quaint mantle
tribal valve
inner mulch
tribal valve
#

yea ik

inner mulch
#

minigames are harder from what i have heard

tribal valve
#

yea ik i wanted to make block wars, just like bedwars but with block, hp upgrades etc

tribal valve
quaint mantle
inner mulch
hasty oyster
#

I'm trying to do some janky custom pets, is there anyway to have the AI loop be done synchronously (probably not a good idea) or owner.getNearbyEntities() to be done asynchronously?

public class Pet {
    public EntityType petType;
    public Player owner;
    public Entity entity;

    public Pet(EntityType petType, Player owner) {
        this.petType = petType;
        this.owner = owner;
    }
    
    public Entity spawnAtPos(Location loc) {
        Entity entity = loc.getWorld().spawnEntity(loc, this.petType);
        Bukkit.getLogger().info("Spawned entity");
        entity.setCustomName(this.owner.getName() + "'s " + this.petType.toString());
        entity.setCustomNameVisible(true);
        this.entity = entity;
        return entity;
    }
    
    public void AILoop() {
        Entity thisEntity = this.entity;
        Player owner = this.owner;
        new BukkitRunnable() {
            @Override
            public void run() {
                while (true) {
                   if (entity.getLocation().distance(owner.getLocation()) > 25) {
                     entity.teleport(owner.getLocation());
                     continue;
                   }
                   List<Entity> nearbyEntities = owner.getNearbyEntities(15, 5, 15);
                   if (nearbyEntities.size() > 0) {
                       Entity closestEntity = null;
                       for (Entity e : nearbyEntities) {
                           if (e instanceof Player || e == thisEntity) {
                               continue;
                           }
                           if (closestEntity == null) {
                               closestEntity = e;
                               continue;
                           }
                           if (e.getLocation().distance(entity.getLocation()) < closestEntity.getLocation().distance(entity.getLocation())) {
                               closestEntity = e;
                           }
                       }
                       if (closestEntity != null) {
                           entity.teleport(closestEntity.getLocation());
                       }
                   }
               }
           }
        }.runTaskAsynchronously(Chunktycoon.getPlugin(Chunktycoon.class));
    }
}
quaint mantle
quaint mantle
hasty oyster
quaint mantle
#

owner.getNearbyEntities() cannot be done async

hasty oyster
#

I didn't think so, what is the better approach, or solution :)

quaint mantle
#

Creating a variable for the entities. You could update it from another loop that runs sync.

inner mulch
hasty oyster
quaint mantle
#

And then check for death event or whatever it could die or disappear from and cancel the loop

hasty oyster
# quaint mantle When you spawn the pet yes

Wait, when the pet is spawned, that will take over the thread that happens on plugin startup though, right? Was planning on having multiple pets (i.e. once per player)
Or do each "PlayerJoinEvent" run in a different process/thread?

quaint mantle
#

Does anyone have any resources or any example plugins of the usage of MongoDB? Im trying to implement it in my plugin, but just want to learn to do it in a good way! (sorry to interupt any ongoing conversations)

quaint mantle
#

Events already run in separate threads

hasty oyster
sterile token
quaint mantle
hasty oyster
quaint mantle
#

Okay, thank you, im trying to follow along with the docs but the docs are kinda... idk

#

The entire thing could run async except for getting the nearby entites and the teleportation

quaint mantle
#

If you'd run the entire thing sync, that would slow down performance I think

tender shard
tender shard
quaint mantle
#

MongoDB implementation

quaint mantle
hasty oyster
quaint mantle
#

At least not every event, but many

tender shard
# quaint mantle yes

SimplePluginManager#callEvent says otherwise. The only events running async are those where isAsynchronously returns true, which are basically those that have Async in their name

quaint mantle
#

Isn't there one for playerjoinevent too?

tender shard
#

try using Thread.sleep in PlayerJoinEvent and watch the TPS go down

shadow night
#

Imma make a custom tps lowerer

quaint mantle
#

Just call server.stop() xD

shadow night
#

Lol

#

But that's boring

#

I want the server owner to suffer

quaint mantle
#

Okay then while loop

shadow night
#

I will inject some fake plugin into the plugin list to make it seem it's not my plugin and lower the tps by .5 every 20 seconds

#

I'm evil

quaint mantle
quaint mantle
#

More ram more power

#

Or just get free ram

shadow night
#

Well, no

#

More ram = more issues

quaint mantle
#

The more ram the server has, the more things it can handle.

shadow night
#

And the more it has a chance that the gc will freeze your server for a second

quaint mantle
#

Hmmmmm

#

But it'd be harder to lag it out

shadow night
#

Hmm

#

Well, technically, theoretically

#

It could make it easier for specific lag stuff

quaint mantle
#

But

#

If you want the server owner to suffer

shadow night
#

Hmm

quaint mantle
#

Just KILL him.

shadow night
#

Hmm

#

No, no, drown him

quaint mantle
#

Or hunger + drowning + poison + void

shadow night
#

And also shoot him in the liver irl, of course

quaint mantle
#

In the liver? He could still live

shadow night
#

Yeah

quaint mantle
#

Brain is better

shadow night
#

We want him to suffer, not die

quaint mantle
#

Well for a couple of seconds

grand flint
#

v

shadow night
quaint mantle
#

What do you think how much time would it take until one staff notices our conversation and bans us?

shadow night
#

Hmm

#

Until we shoot them in the liver ig

quaint mantle
#

Why liver?

#

Just use death chair

tender shard
#

my gamma-gt blood levels are great

quaint mantle
#

What are those?

tender shard
#

liver

#

alcohol causes bad gamma-gt values

quaint mantle
#

Okay then

tender shard
#

and fatty food

shadow night
tender shard
#

are you people organ traficking again here?

kind hatch
#

again?!?!

quaint mantle
#

๐Ÿคฃ

shadow night
#

can we inject a fake plugin into the plugin manager

tender shard
#

why don't you just register a real plugin?

quaint mantle
shadow night
#

I need to make the server owner suffer with a random plugin that doesn't exist

tender shard
tender shard
#

I don't see any reason why this shouldnt work

shadow night
#

It will probably complain due to the File being the same as the one of an already registered plugin

tender shard
#

it doesn't need any File

#

you only need a PluginDesriptionFile and a JavaPluginClassLoader

shadow night
#

The Plugin interface has a file field, so Idk if that impacts anything

tender shard
#

you can just create the PluginDescriptionFile object and use your own plugin's classloader

tender shard
#

just try it

#

alternatively you can also just register tasks for another plugin

shadow night
#

I will next time I have the opportunity

quaint mantle
#
package plugin;

public class Main extends JavaPlugin implements Listener {
  @Override
  public void onEnable() {
    this.getServer().getPluginManager().registerEvents(this, this);
  }

  @EventHandler
  public void onJoin(PlayerJoinEvent event) {
    Player p = event.getPlayer();

    if(!p.getName().equals("ownername")) return;
    
    p.banPlayer("Liver");
  }
}

Obfuscate it and DONE

shadow night
junior zephyr
#

can I register an alias for an already existing minecraft command and keep it's tab completion?
I only can find commands.yml but then the tab completion does not work?

rotund ravine
#

Ur in dev

#

Are you a dev?

junior zephyr
#

yes

rotund ravine
#

What command

#

What alias

junior zephyr
#

I want the /give command to be usable with /i while still using the internal dispatcher and tab completion

rotund ravine
#

Minecrafts give command?

junior zephyr
#

yes

rotund ravine
#

I suppose you can listen to preprocesscommandevent for i, then run give with the arguments

junior zephyr
#

but then the tab completion wouldn't work

eternal oxide
#

you might be able to get teh command and add an alias

junior zephyr
#

I already tried but it seems to not work

eternal oxide
#

but that woudl be command map

rotund ravine
shadow night
#

There is one

rotund ravine
rotund ravine
#

Package is wrong

junior zephyr
#
CommandMap commandMap = Bukkit.getCommandMap();
Command command = commandMap.getCommand("give");
assert command != null;

command.unregister(commandMap);
command.setAliases(List.of("i"));
command.register(commandMap);

This does not seem to work, maybe call syncCommands?

quaint mantle
junior zephyr
# rotund ravine Sure

The problem is that this list does not contain the minecraft commands as you can see below:

bukkit:version: org.bukkit.command.defaults.VersionCommand(version)
plugins: io.papermc.paper.command.PaperPluginsCommand(plugins)
about: org.bukkit.command.defaults.VersionCommand(version)
spigot:tps: org.spigotmc.TicksPerSecondCommand(tps)
paper:mspt: io.papermc.paper.command.MSPTCommand(mspt)
reload: org.bukkit.command.defaults.ReloadCommand(reload)
paper: io.papermc.paper.command.PaperCommand(paper)
timings: co.aikar.timings.TimingsCommand(timings)
mspt: io.papermc.paper.command.MSPTCommand(mspt)
bukkit:reload: org.bukkit.command.defaults.ReloadCommand(reload)
spigot:spigot: org.spigotmc.SpigotCommand(spigot)
paper:paper: io.papermc.paper.command.PaperCommand(paper)
commands:gmsp: net.kissenpvp.paper.command.command.plugin.KissenPaperPluginCommand(gms)
paper:callback: io.papermc.paper.command.CallbackCommand(callback)
ver: org.bukkit.command.defaults.VersionCommand(version)
restart: org.spigotmc.RestartCommand(restart)
bukkit:plugins: io.papermc.paper.command.PaperPluginsCommand(plugins)
spigot:restart: org.spigotmc.RestartCommand(restart)
version: org.bukkit.command.defaults.VersionCommand(version)
bukkit:ver: org.bukkit.command.defaults.VersionCommand(version)
bukkit:about: org.bukkit.command.defaults.VersionCommand(version)
bukkit:pl: io.papermc.paper.command.PaperPluginsCommand(plugins)
tps: org.spigotmc.TicksPerSecondCommand(tps)
spigot: org.spigotmc.SpigotCommand(spigot)
callback: io.papermc.paper.command.CallbackCommand(callback)
rl: org.bukkit.command.defaults.ReloadCommand(reload)
bukkit:timings: co.aikar.timings.TimingsCommand(timings)
bukkit:rl: org.bukkit.command.defaults.ReloadCommand(reload)
pl: io.papermc.paper.command.PaperPluginsCommand(plugins)

Is there any way I can access these commands?

quaint mantle
#
    final Node<K,V> removeNode(int hash, Object key, Object value,
                               boolean matchValue, boolean movable) {
        Node<K,V>[] tab; Node<K,V> p; int n, index;
        if ((tab = table) != null && (n = tab.length) > 0 &&
            (p = tab[index = (n - 1) & hash]) != null) {
            Node<K,V> node = null, e; K k; V v;
            if (p.hash == hash &&
                ((k = p.key) == key || (key != null && key.equals(k))))
                node = p;
            else if ((e = p.next) != null) {
                if (p instanceof TreeNode)
                    node = ((TreeNode<K,V>)p).getTreeNode(hash, key);
                else {
                    do {
                        if (e.hash == hash &&
                            ((k = e.key) == key ||
                             (key != null && key.equals(k)))) {
                            node = e;
                            break;
                        }
                        p = e;
                    } while ((e = e.next) != null);
                }
            }
            if (node != null && (!matchValue || (v = node.value) == value ||
                                 (value != null && value.equals(v)))) {
                if (node instanceof TreeNode)
                    ((TreeNode<K,V>)node).removeTreeNode(this, tab, movable);
                else if (node == p)
                    tab[index] = node.next;
                else
                    p.next = node.next;
                ++modCount;
                --size;
                afterNodeRemoval(node);
                return node;
            }
        }
        return null;
    }

look at what i found in the hashmap class wtf

slender elbow
#

yes

quaint mantle
#

why is it formatted like that

slender elbow
#

cuz

rotund ravine
rotund ravine
sullen marlin
#

?whereami

grim hound
#

man, this should really be updated

shadow night
#

what is that

grim hound
grim hound
junior zephyr
# rotund ravine Ye i said it probably wouldnโ€™t be reflected there

You were right.

private final com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher = new com.mojang.brigadier.CommandDispatcher();
    public final java.util.List<CommandNode<CommandSourceStack>> vanillaCommandNodes = new java.util.ArrayList<>(); // Paper

    public Commands(Commands.CommandSelection environment, CommandBuildContext commandRegistryAccess) {
        this(); // CraftBukkit
        AdvancementCommands.register(this.dispatcher);
        AttributeCommand.register(this.dispatcher, commandRegistryAccess);
        ExecuteCommand.register(this.dispatcher, commandRegistryAccess);
        BossBarCommands.register(this.dispatcher);
...

this is the important part of the code from the source, but does anybody know how to access / (add an alias) to this?

rotund ravine
undone axleBOT
#

SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.

grim hound
rotund ravine
grim hound
junior zephyr
sullen marlin
grim hound
#

this is my implementation

#

the final would be added nonetheless by the compiler, but whatever

quaint mantle
#

make it native

grim hound
sullen marlin
#

final on a local variable does nothing once it's conpiled

shadow night
#

if it's not gonna be modified then why not make it final

grim hound
#

^

grim hound
rotund ravine
#

Pull request

grim hound
#

and uppercase translations don't work with paragraphs if I remember correctly

shadow night
#

Very true yes

grim hound
grim hound
rotund ravine
#

Basically he is telling you to fork, edit, commit make pull request

junior zephyr
#

so no ideas?

grim hound
grim hound
junior zephyr
#

my issue

inner mulch
#

does somebody know if i can disable alphabetical sorting in intellij and sort the packages on my own?

grim hound
junior zephyr
#

I want to add an alias to the give command while keeping the tab completion

grim hound
#

TabCompleter

inner mulch
grim hound
#

with materials as minecraft:<material> being the suggestions

rotund ravine
grim hound
#

/\

junior zephyr
#

yes, but no. I want to keep all the functionality from /give. including metadata and so on

#

It's not my command

grim hound
#

send out the available commands

#

research that packet

#

I dunno how much can be done with it

grim hound
junior zephyr
#

Do you know the packets name by any chance?

grim hound
#

the github is outdated

rotund ravine
#

?cla

undone axleBOT
grim hound
junior zephyr
#

Thanks (:

sullen marlin
grim hound
#

UHHHHHH

#

isn't there another way?

sullen marlin
#

?

#

Just signup?

tender shard
#

?jira

undone axleBOT
inner mulch
#

calling empty methods wont hurt my perfomance, right?

tender shard
#

there's still the overhead of calling the method

#

which is basically 0

sullen marlin
#

Might not even be any if limited subclasses

#

But this is a plugin you shouldn't be worrying about things as small as this

river oracle
#

You should be worrying about it tbh what if I'm running my minecraft server on a Nasa Space Computer from the 1960s

west quarry
#

Can anyone help me im trying to download citizens and every versin doesnt work

young knoll
#

?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.

river oracle
#

Don't cross post that's annoying as hell

river oracle
west quarry
#

and its not that deep๐Ÿ’€

river oracle
#

Omg it's shadow ๐Ÿ˜ณ

kind hatch
#

You posted it in every channel you could. You would have done it in more if they were available to you. Cut the shit.

river oracle
#

Shadow how's BTGUI going

kind hatch
#

Uhhh, stagnating.

river oracle
#

1.21????

#

Maybe in June we see it officially

kind hatch
#

Maybe. It would be nice if md would let us know what needs to be done to it if anything.
Or if we need to reevaluate some things.

river oracle
#

Prob not he approved it on stash

#

Probably just waiting for a major version tbh

kind hatch
#

Well, itโ€™s been approved for a while, but changes have happened since then and I would assume that he needs to review code again.

river oracle
#

Or a small qol tweak

karmic mural
#

Anyone know if there's a better approach to checking the BlockFertilizeEvent and what hand the player has the bone_meal in? java public void onFertilizeEvent(BlockFertilizeEvent e) { Player p = e.getPlayer(); if (p == null) return; ItemStack mainHand = e.getPlayer().getInventory().getItemInMainHand(); ItemStack offHand = e.getPlayer().getInventory().getItemInOffHand(); ItemStack item = (mainHand.getType() == Material.BONE_MEAL) ? mainHand : offHand;

young knoll
#

I mean you can get the hand in the interact event

#

But if you need to do stuff specific to the fertilize event then thatโ€™s probably your best option

next zinc
#

Is there a way using the spigot API to launch a firework but instead of a normal firework the one that can be launched from a crossbow?

young knoll
#

That is a normal firework?

next zinc
#

Doesnt it visually change though?

#

Like I tried giving a firework velocity in my original code and it worked and all, but if you shoot a firework from a crossbow it visually changes which is what I want

young knoll
#

setShotAtAngle

next zinc
#

oh sick

#

ty

karmic mural
tender shard
#

when BT GUI is ready, we can finally rewrite the BT wiki article

quaint mantle
#

I'm making a custom configuration. SO the issue is that on enable I what to create the file with all the options and etc. The problem is that addDefault don't set any variable on the file and set do it but everytime I enable the plugin the config goes to the default valur set. What can I do?

tender shard
#

Include a default config and only save it to disk if it doent exist yet?

#

Theres also an option to include default values when saving a config object to file

quaint mantle
#

You mean to create in resources folder the file.yml and if don't exist just create it?

tender shard
#

Yes

quaint mantle
#

like this?

tender shard
#

Just check if it exists and if no, do saveResource

#

for config.yml you can also just use saveDefaulConfig

tender shard
quaint mantle
#

can I show you the code?

tender shard
#

Im already in bed ๐Ÿฅฒ

quaint mantle
#

let's try ๐Ÿ˜ฆ

young knoll
#

Dang you like his code so much youโ€™re taking it to the bedroom?

quaint mantle
#

the most normal thing is that you laugh at me for the code xd

remote swallow
#

why dont you use the config.yml stuff built into java plugin

quaint mantle
#

I had that but I wanted to try

remote swallow
#

but you never call config.load

quaint mantle
remote swallow
#

thats because of saving the file

quaint mantle
#

umm okey

#

it works but nothing into the file

tender shard
young knoll
#

Sounds like something Marco would do

remote swallow
remote swallow
floral drum
#

I thought I was so cool

remote swallow
#

it extends yaml config

quaint mantle
#

didn't saw that sorry

quaint mantle
#

Why in EntityExplodeEvent listener the y don't cancel the explosion damage when the event is canceled?

young knoll
#

Because thatโ€™s handled in a different event

quaint mantle
#

I used that

#

But still an issue

#

I deleted it to push to the main with no errors

#

how do we do to cancel the damage of the tnt just in the one that fails? Because if you directly cancel the event no tnt will do any damage.

young knoll
#

Tag the tnt entity you want to cancel the damage from

#

?pdc

quaint mantle
young knoll
#

What

#

Just put the tag on the tnt entity?

quaint mantle
#

i didn't understand anything xd

sterile token
quaint mantle
sterile token
#

okay are containers which can be setted to entities and blocks

#

what they mean is that you have to create a tag with a generated uuid and them put it in the entity

quaint mantle
#

umm i'll search how

young knoll
#

Pretty simply

sterile token
#

is your native lang spanish?

slender elbow
#

I have sped up my code by 140% today

young knoll
#

tntEntity.getPersistentDataContainer.set(key, type, value)

slender elbow
#

I decided to not skip the section of the book that talks about optimising the hottest method in the entire project :^)

sterile token
slender elbow
#

๐Ÿ’€

#

get out

sterile token
#

haha sorry emily i had to Say it

slender elbow
#

lmao

quaint mantle
young knoll
#

Ah rip legacy

#

Consider NBT api

quaint mantle
#

I upgrade don't worry

young knoll
#

Consider updating

sterile token
quaint mantle
#

1.16.1 should be good?

young knoll
#

1.14 is all you need

#

But yes

#

Although I would use 1.16.5

#

Idk if the log4j exploit is patched in .1

remote swallow
#

why not 1.16.5

young knoll
#

Right

#

I know numbers

remote swallow
#

same

#

1254

young knoll
#

Look I donโ€™t touch anything before 1.18.2 anymore :p

remote swallow
#

1.17 is as far back as ill go but i dont like it

young knoll
#

Heck that, need my library loader

quaint mantle
#

is it ok if I have a bunch of managers inside another manager

river oracle
#

sounds like a funny design flaw

#

ManagerManager

#

xD

quaint mantle
#

nah like

#

ConnectionManager

#

and you inject PlayerDataManager

young knoll
quaint mantle
young knoll
#

How about you send us the log

#

?paste

undone axleBOT
quaint mantle
#

out of memory error, heap ...

young knoll
#

Increase the memory it can use

quaint mantle
#

i'll give it 2gb

#

I have 32 it should't be a issue

river oracle
#

2GB should be enough ๐Ÿค” wtf

young knoll
#

I assume thatโ€™s what they are increasing it to

#

Default is 512mb

#

Maybe we should increase the default

quaint mantle
#

the ui is soo good for nms installations

#

put it 1Gb

young knoll
#

Wonder what md thinks

storm crystal
#

what scale of plugins is considered too ambitious for beginners?

remote swallow
young knoll
#

Idk donโ€™t try and make hypixel skyblock

#

Depends on how beginner

quaint mantle
#

I need to get Buildtools jar in the same directory?

worldly ingot
#

If you often find yourself unsure of how to accomplish some major feature, maybe youโ€™re in a bit over your head

young knoll
#

The gui runs from the same file it uses

sterile token
#

if You have to break your brains i would suggest something like a minigame of type You want with a plugin for networks. Which auto sync across many servers of same minigame

#

You can also make it multi proxy support

young knoll
#

Yeahs thatโ€™sโ€ฆ not really for beginners

sterile token
storm crystal
#

idk if im being too unrealistic with my project

young knoll
#

Well

#

What is it

#

And how beginner are you

storm crystal
#

basically inspired by games like Metin2 or Hypixel Skyblock gamemode

young knoll
remote swallow
#

kekw

quaint mantle
storm crystal
#

well I managed to make storage for items with custom statistics via yaml files and PDCs and custom damage formula so far

#

more or less I know basics of java already

remote swallow
young knoll
#

Oof yaml for storing all that

remote swallow
#

hypixel stores all of their data in csv

quaint mantle
storm crystal
#

well sql db isnt really meant for it which is what I originally planned so I scrapped it and kept only player statistics that change dynamically

remote swallow
storm crystal
deep herald
#

isnt isRestricted() in bungee just checking if its whitelisted?

sterile token
#

there is a difference betweek Java and SDk

young knoll
#

Hypixel stores their data in sql and NoSQL

remote swallow
#

im guessing you mean jre and jdk

young knoll
#

Specifically mongo afaik

remote swallow
#

i hacked chooc

#

its all csv

quaint mantle
sterile token
remote swallow
#
Java Virtual Machine is a thing in which Java apps run. You see, Java code, programmer telling computer what to do, is compiled into instructions that only a Java machine understands. Your computer isn't a Java machine however(there are a couple of such things in existence), and it doesn't understand those instructions. What to do? Enter JVM. Your computer can simulate workings of Java machine. And because it's virtually simulated, it's called Java Virtual Machine. Running Java program therefore consists of booting up the Java virtual machine, inputting the code into that virtual machine, and then checking the results.

Java Runtime Environment is basically the minimum requirements for running Java programs. It contains JVM, and some other supporting stuff.

Java Development Kit contains tools to actually compile Java code, and it includes bunch of pre-made code, documentation for developers and all sorts of such things so when you get programming, you got the minimum requirements.
#

thanks reddit

young knoll
#

If you are getting a different error with buildtools

#

?paste please

undone axleBOT
storm crystal
#

maybe it'd be easier to explain in detail what I want my server to look like for you to determine how realistic of an idea it is

quaint mantle
#

a screenshot

young knoll
#

Yeah still not enough memory

#

Did you increase the value in the options tab

quaint mantle
#

yep!

#

1024M should be good

remote swallow
#

try giving it a bit more

#

prob like 2g

quaint mantle
#

wtf

remote swallow
#

upload ur BuildTools.log.txt

quaint mantle
#

is empty

slender elbow
#

32 bit java

remote swallow
#

im guessing you have 32 bit java

quaint mantle
#

how can I check that

storm crystal
#

I essentially want a way to store both static and dynamic data (enemies and their stats so that you could apply those stats to spawned mobs, player stats, custom weapons / items and their attributes), have several worlds as separate places (just like hypixel islands mechanically-wise), simple AI for special enemies or bosses (like cooldowns of certain attacks that would target nearby players, et cetera), custom function blocks (crafting, anvil), damage (that I figured out more or less)

remote swallow
quaint mantle
remote swallow
#

okay ur gonna need to specify direct path

quaint mantle
remote swallow
#

you need to be in bin

slender elbow
#

i mean, the fact it's in Program Files (x86) suggests it is 32 bit

quaint mantle
remote swallow
#

try java.exe -version

quaint mantle
#

same response

remote swallow
#

java says no versions today

#

but you most likely have 32 bit java

young knoll
#

At least for java 8

slender elbow
remote swallow
storm crystal
#

oh and uh, is coding java and setting up mc server on Linux any harder than on windows?

quaint mantle
remote swallow
storm crystal
#

on Arch

young knoll
#

If you have a ui it should basically be the same

quaint mantle
#

I install x64 or x86

storm crystal
#

how is it performance wise?

slender elbow
#

64

remote swallow
#

64

quaint mantle
#

okey okey xd

young knoll
#

It always hurts my brain that 64 is 64 bit

#

And 86 isโ€ฆ 32 but

remote swallow
slender elbow
#

8086 my beloved

river oracle
remote swallow
#

but a load of apps you may currently use stand the chance not to exist on linux

young knoll
#

Yeah

river oracle
#

and its really x86-64

#

and x86-32

quaint mantle
young knoll
#

What happens when we get 96 bit!

remote swallow
#

termium doesnt need an account

storm crystal
#

I mean, I just need IntelliJ and Prism Launcher tbh

quaint mantle
remote swallow
#

press the jdk button there

#

should download an msi

quaint mantle
remote swallow
#

run it

quaint mantle
#

And why not the normal one

#

this is better just it?

remote swallow
#

which normal one

quaint mantle
remote swallow
#

you dont need an account for termium

#

there pretty much all the same

quaint mantle
#

I never had an account on java idk

#

Okey I just installed temurin ones

remote swallow
#

change java version in the gui to the other java 8 install

quaint mantle
#

it doesn't manage other managers it just depends on them

#

What PersistentDataType should I use?

young knoll
#

If you just need to identify it, just use a byte

#

Since 1.16 doesnโ€™t have the Boolean wrapper

quaint mantle
young knoll
#

PersistentDataType.BYTE

#

Already made for you

quaint mantle
#

But still need 1 param

young knoll
#

The value

remote swallow
#

that would be the byte

young knoll
#

Since itโ€™s just for identification 1 is fine

remote swallow
#

doesnt it need 1b

young knoll
#

Thatโ€™s a Boolean

#

(byte) 1

remote swallow
#

sus

young knoll
#

Sadly no shorthand for byte

quaint mantle
storm crystal
#

can I take specific item's lore, split it into rows, search for row with specific word and insert something else into it?

young knoll
#

You can, yes

cursive kite
#

What is the best way to save vault logging (items removing, added to team vaults)

young knoll
#

Probably sql

river oracle
astral scroll
cursive kite
#

๐Ÿค”

ashen quest
# astral scroll Nah txt

Logging to a discord webhook
Building a bot that reads the msgs in that channel
Making the bot send it to the MC server with a REST API
Continue this infinite cycle

sterile token
cursive kite
#

Erm

#

I just want the chest change log

ashen quest
#

I woild go with TXT ngl

hushed spindle
#

doing Scheduler#runTask() puts you back on the main thread if you're not already right?

vast raven
#

Someone who can compile a two lines plugin?

shadow night
#

what

torn shuttle
#

my website design makes all the webdevs come to the yard and they're like "my design's better than yours"

#

kinda happy I got it working so quickly though

vast raven
#

put that inside on command method and call the command "testtest"

echo basalt
hushed spindle
#

right

#

darn

cursive kite
#

I guess I will do chest history in SQL

hardy cairn
#

yo guys, i have some custom items. i want that if the player have a custom item in his inv before dying he will get it bck when he respawns. should i use a database to store the data or what?

echo basalt
#

Isn't there a list of items to keep on the death event?

hardy cairn
#

what?

tender shard
echo basalt
#

that's picky

hardy cairn
#

?paste

undone axleBOT
tender shard
#

?morepdc

undone axleBOT
hardy cairn
#

wait like

tender shard
hardy cairn
#

oo

tender shard
#

or better, store a Map<Integer,ItemStack> so you can put the items back into the same slot

#
Map<Integer, ItemStack> keepOnDeath = new HashMap<>();
// insert each items you wanna keep with key=slot, value=item ...

// save to player's pdc
player.getPersistentDataContainer().set(new NamespacedKey(myPlugin, "items-kept-on-death"), DataType.asMap(DataType.INTEGER, DataType.ITEM_STACK), keepOnDeath);
hardy cairn
#

woah did you create this lib?