#help-archived

1 messages · Page 23 of 1

subtle blade
#

Or VILLAGER_GOLEM

#

Registry.ENTITY_TYPE.get(new NamespacedKey(valueFromConfig))

#

Yes, that constructor is deprecated but you can ignore that one

radiant pollen
#

Everything is deprecated.

subtle blade
#

Actually, you should use NamespacedKey.minecraft()

silk bane
#

^

subtle blade
#

In this case there are no plugin-injected IDs so the minecraft method is fine

pearl pawn
#

i am italian i really do not understand this english i don't understand what i have to do

radiant pollen
#

Registry.ENTITY_TYPE.get(new NamespacedKey(valueFromConfig))

subtle blade
#

Registry.ENTITY_TYPE.get(NamespacedKey.minecraft(valueFromConfig))

#

That will return an EntityType for you

wanton delta
zenith siren
#

Math

wanton delta
#

It’s a sum of all the velocities every tick

pearl pawn
#

That will return an EntityType for you
@subtle blade i still don't understand where to place that piece of code

wanton delta
#

For a minute

#

Which would give you distance

subtle blade
#

Right now you have EntityType.fromName(tipo)

pearl pawn
#

yes

#

tipo is a string

radiant pollen
#
    public void onRun(PlayerMoveEvent event) {
        Player player = event.getPlayer();
        World world = player.getWorld();
        Location spawnLoc = player.getLocation().add(0,2,0);
        String tipo = plugin.getConfig().getString("mob");
        if(player.isSprinting()) {
            Entity mob = world.spawnEntity(spawnLoc, Registry.ENTITY_TYPE.get(NamespacedKey.minecraft(tipo
)));

        }
    }
subtle blade
#

No

#

Don't do that

#

get() is nullable

radiant pollen
#

Who cares about null checking... :)

subtle blade
#

You should PES_HyperReee

wanton delta
#

lmao

radiant pollen
#

Nah ;]

silk bane
#

also you realise this will spawn a mob every tick for every sprinting player?

subtle blade
#

Yea that is a very terrifying method lol

pearl pawn
#

also you realise this will spawn a mob every tick for every sprinting player?
@silk bane is what i want to do

silk bane
#

is it really?

pearl pawn
#

i made a cycle for before and it crashed my server

silk bane
#

hmm ok

subtle blade
#

I mean yea, this will likely crash it as well. lol

pearl pawn
#

i just want to troll my server

radiant pollen
#

That's 20 mobs every second while sprinting

#

Actually no

wanton delta
#

Best way to do that is spawn Integer.MAX_VALUE particles

radiant pollen
#

move event is faster than that lol

subtle blade
#

It's not. 20/second

pearl pawn
#

well its when is sprinting

wanton delta
#

I made a packet that would crash ppls games lmaoo

pearl pawn
#

i saw that it spawned 4 in 1 block

subtle blade
#

It can only be called at the rate Minecraft updates

wanton delta
#

And I could target who got it

pearl pawn
#
    public void onRun(PlayerMoveEvent event) {
        Player player = event.getPlayer();
        World world = player.getWorld();
        Location spawnLoc = player.getLocation().add(0,2,0);
        String tipo = plugin.getConfig().getString("mob");
        if(player.isSprinting()) {
            Entity mob = world.spawnEntity(spawnLoc, Registry.ENTITY_TYPE.get(NamespacedKey.minecraft(tipo
)));

        }
    }

@radiant pollen so i should do this right?

radiant pollen
#

get() is nullable. So make a new variable for it and check that it isn't null.

subtle blade
#
    @EventHandler
    public void onRun(PlayerMoveEvent event) {
        Player player = event.getPlayer();
        World world = player.getWorld();
        Location spawnLoc = player.getLocation().add(0,2,0);
        String tipo = plugin.getConfig().getString("mob");
        EntityType type = Registry.ENTITY_TYPE.get(NamespacedKey.minecraft(tipo));
        if(player.isSprinting() && type != null) {
            world.spawnEntity(spawnLoc, type);
        }
    }```
radiant pollen
#

^

subtle blade
#

But really, type should be created once

#

Fetching every single time that's called is a horrible idea

cursive bay
#

Hello,

radiant pollen
#

Hi

cursive bay
#

Forgot to shift+enter, lol

pearl pawn
#
    @EventHandler
    public void onRun(PlayerMoveEvent event) {
        Player player = event.getPlayer();
        World world = player.getWorld();
        Location spawnLoc = player.getLocation().add(0,2,0);
        String tipo = plugin.getConfig().getString("mob");
        EntityType type = Registry.ENTITY_TYPE.get(NamespacedKey.minecraft(tipo));
        if(player.isSprinting() && type != null) {
            world.spawnEntity(spawnLoc, type);
        }
    }```

@subtle blade thank you very much

cursive bay
#

So, I don't have 20 posts to post on hiring developers, but I'd like to commission a plugin for a server I play on. Anyone know a place I could go to?

wanton delta
#

?services

worldly heathBOT
wanton delta
#

Oh

#

Nvm

#

I read

cursive bay
#

Yeah :/

wanton delta
#

Make 20 posts :P

#

Or get someone else to make a thread and have them put your contact info in there

cursive bay
#

That's what I'll probably do

wanton delta
#

(((Not recommended)))

pearl pawn
#

@subtle blade thank you very much
@pearl pawn nvm got error in code

radiant pollen
#

@cursive bay Browse through "Offering - Developers" and find a way to contact people who are looking for commissions.

cursive bay
#

Good one

#

Thanks mate

radiant pollen
#

No problem.

frigid ember
#

@pearl pawn whats the error?

wanton delta
#

oh yea

#

That too

pearl pawn
#

@pearl pawn whats the error?
@frigid ember you see that red flagged ENTITY_TYPE?

wanton delta
#

Are you importing the right registry

radiant pollen
#

^

frigid ember
#

^^

wanton delta
#

Also don’t name your class Eventi 😭

#

It would be better to add a constructor with the config file rather than use the api method as well

subtle blade
#

I should have asked which version

wanton delta
#

If NamedspacedKey is working I’d assume he’s using the correct version?

subtle blade
#

Registry was only added in 1.14 I think it was

wanton delta
#

But I forget when it was introduced

#

Oh

#

That would also make sense

subtle blade
#

NK was in 1.11

wanton delta
#

yep

#

I didn’t know registry was that recent

pearl pawn
#

If NamedspacedKey is working I’d assume he’s using the correct version?
@wanton delta i am in 1.8.8 ;_;

frigid ember
#

Does anyone have any recommendations for reprogramming 1.12 made plugins for the new Spigot API, because right now my code is lighting up with Material enumeration issues because they changed all the item names... Is there an alternative method to going through and changing every material name and trying to find the right one? Also if anyone can answer the question WHY they did this, that would be great. (I understand it made it a little easier to retrieve specific items names, but is it because of Minecraft itself?)

pearl pawn
#

Also don’t name your class Eventi 😭
@wanton delta How should i call it?

#

It would be better to add a constructor with the config file rather than use the api method as well
@wanton delta you mean this?

frigid ember
#

@pearl pawn Like maybe PlayerMoveEvent or something of that nature (probably not exactly because you are calling a PlayerMoveEvent class), that way when you go to find the Event you don't have to sift through 30 events all named Eventi Eventii etc.

pearl pawn
#

@pearl pawn Like maybe PlayerMoveEvent or something of that nature (probably not exactly because you are calling a PlayerMoveEvent class), that way when you go to find the Event you don't have to sift through 30 events all named Eventi Eventii etc.
@frigid ember so i should call it just the name of the event?

#

like onRunEvent?

frigid ember
#

@pearl pawn I did in my programs a while back, but it can get confusing if you are calling a PlayerMoveEvent and you have class named PlayerMoveEvent. You can easily get those confused especially when calling it elsewhere. So I think the safest thing to do is just name it something where you can easily identify it but without naming exactly as the Event is defined.

pearl pawn
#

oh ok

frigid ember
#

Can someone tell me why I can't join Survival with spigot 1.9 I have via version and viarewind

uncut whale
#

Question, does anyone know of an actually up to date tax plugin? Where I would be capable of taxing a property owner with various categories like property size etc? Say on a weekly basis? Ive seen a bunch of plugins for this but they are all dead.

pearl pawn
#

Can someone tell me why I can't join Survival with spigot 1.9 I have via version and viarewind
@frigid ember which version are you using?

frigid ember
#

1.8.9

pearl pawn
#

viabackwards?

frigid ember
#

Isn't loading

#

The plugins it's crashing

#

Wasn't it that you could either use ViaVersion or ViaBackwards, not both? I don't remember anymore.

radiant pollen
#

No. ViaBackwards requires ViaVersion

frigid ember
#

Yes

#

But backwards isn't loading

radiant pollen
#

Error message?

frigid ember
#

@radiant pollen Ah gotcha.

#

Nope no error messages

#

Only no load and I can't connect to the server

radiant pollen
#

Wait. You said you have ViaRewind?

frigid ember
#

I have via version, viarewind and viabackward

#

But only viabackward not loading

uncut whale
#

When you guys are done discussing your issue if I could get some help with mine that would be greatly appreciated.

radiant pollen
#

@frigid ember Does it show up as red in a plugin list, like it didn't load correctly, or is it just not listed at all?

frigid ember
#

Not listed

#

No plugin folder

radiant pollen
#

Does it log anything in the console... Does it even TRY to load it?

frigid ember
#

Nope not loading when I watch the console only loads via version and via rewind

radiant pollen
#

I would re-download and put it on your server and just make sure you did everything correctly.

#

Also, check your java version.

frigid ember
#

It's up to date java

radiant pollen
#

@uncut whale The only updated plugin I've seen with taxes is Towny

frigid ember
#

Can u send me link of viabackward bcs I have viabackward v3.0.0

uncut whale
#

@radiant pollen Ok. See I'm looking ideally for something that charges tax once every real life week, including offline players, unless they have been offline for more than 7 days. I realize this might be complex, but do you think its doable with towny?

radiant pollen
frigid ember
#

Thanks

wanton delta
#

Ok. See I'm looking ideally for something that charges tax once every real life week, including offline players, unless they have been offline for more than 7 days. I realize this might be complex, but do you think its doable with towny?
If not doable with towny the best route you can take is on the services forum

pearl pawn
radiant pollen
#

@pearl pawn Just keep the deprecated version.

frigid ember
#

Thanks @radiant pollen and @pearl pawn

radiant pollen
#

@pearl pawn You're using 1.8 spigot, which likely won't be updated. So that deprecated code won't ever be removed. afaik anyway.

dusty topaz
#

(thats correct ^)

wanton delta
#

What is the issue???

radiant pollen
#

He was looking for a replacement for deprecated code. It doesn't matter though, because he's using 1.8.

tiny dagger
#

lol

wanton delta
#

NK wasn’t added until 1.11 so you definitely have the wrong version

old barn
#

How do I cancel the PlayerChangeWorld event?

radiant pollen
#

@old barn You can use the PlayerTeleportEvent. if to.world != from.world cancel

#

I'm pretty sure the TeleportEvent is used before the ChangeWorld event. So the ChangeWorld event won't get called if you cancel the teleport.

old barn
#
public void ChangeWorld(PlayerTeleportEvent e)
Player p = e.getplayer;
if(world.getname.equalsignorecase("War") {
e.setCancelled(True)
}

Something like? If you haven't defined the world, but how are you in this case? how do I check if the world that player is going to teleport is called "war"?

dusty topaz
#
Methods inherited from class org.bukkit.event.player.PlayerMoveEvent
getFrom, getTo,
radiant pollen
#

@old barn Yeah, basically. world = e.getTo().getWorld()

old barn
#

Okay, I'll test it, thanks

radiant pollen
#

No problem

turbid latch
#

i noiced some changes in 1.15.2 spigot with materials

any exemple how to do it ? in 1.15.2

subtle blade
#

Changes to Material constants were done in 1.13

turbid latch
#

i see

subtle blade
#

All constants should match in-game registry IDs now

#

i.e. 'minecraft:red_wool' is Material.RED_WOOL

faint basin
#

Can someone help me out with mysql (it breaks after some time and some plugins do not update info to mysql after few hours)

turbid latch
#

I'm so used to the old way and i barely know much about Materials now

frigid ember
#

Is it really worth making a mini games server any more?
can they still grow and are they worth the money you put into them

turbid latch
#

where can i find exemples for 1.13 material and item and other stuff

radiant pollen
#

@frigid ember Not if you use pre-made minigames that make your server like all the others. My server is basically one custom game and it does alright, so far. It's pretty new and I get new players and they enjoy it.

#

The problem with making a mini-games server or any pvp-based server is the fact that new players don't stay because there's no one to play against. Haha.

wanton delta
#

materials are quite a lot simpler

radiant pollen
#

That's probably the only major issue.

wanton delta
#

no damage values/data values

#

thats really the main change

frigid ember
#

@radiant pollen Do normal mini game server work like sg master builders etc

radiant pollen
#

@frigid ember I can't see how they would get players when you used public plugin mini-games that are just copies of mini-games on huge networks.

#

You have to be unique.

frigid ember
#

Do good builds not make it better

wanton delta
#

good building has nothing to do with pvp

#

what makes your players stay on the server? builds or the actual game?

#

builds are to make your server appealing so players will be more inclined to join

#

your games retain players

lean knot
#

any staff available?

subtle blade
#

No

lean knot
#

...

#

for real...

subtle blade
#

Whatever you need it's likely answerable either here or in #general

lean knot
#

i need my username changed on spigot

subtle blade
#

We grant access to name changes to those who've donated to the project

wanton delta
#

Do not use Discord™ as a way of contacting Spigot Staff. If you have an issue with something on the Forums please open a report. Staff will not action requests communicated to them elsewhere.

lean knot
#

... wtf that's bullshit... i recently came out as trans....

radiant pollen
#

huh

subtle blade
#

Does that make you somehow entitled to a name change?

#

Special privileges I'm unaware of?

lean knot
#

it kinda does? male name > female name?

wanton delta
#

what is your current spigot name?

subtle blade
#

Sync'd with the forums. Zoni

lean knot
#

zoni, and i want it to be vitani which is the name i've chosen as a female

wanton delta
#

ah

#

Zoni doesnt sound like a gender-biased name so i dont see it to be reasonable

lean knot
#

i mean i could just make another account but still... i'd lose my $10 plugin and i am kinda poor

radiant pollen
#

It's $10 to change your name.

lean knot
#

you know i have $0 a month?

radiant pollen
#

Then you can't change your name.

subtle blade
#

Sounds like you need a job PeepoThink

lean knot
#

been trying that but i haven't been able to get a job yet, and curently i can't

#

because the government is in charge

subtle blade
#

Understandable at the moment. Especially if you're unable to work from home

lean knot
#

no i mean the government paid for my education which guarantees a job, since they haven't been able to keep those promises now the government decides what steps to take next

wanton delta
#

I think one of the main points is spigot cant hand out special requests

#

then you will have people faking identities to get a name change

subtle blade
#

That being said, we aren't going to grant special privileges. Exceptions aren't going to be made. The best alternative at least for the time being is to change your gender in your preferences

radiant pollen
#

^

subtle blade
#

We then also have people saying "BUT THIS PERSON DID IT!"

lean knot
#

how much do you have to donate to change your username?

wanton delta
#

$10

radiant pollen
#

It's $10 to change your name.
@radiant pollen

lean knot
#

really... would be the same to just delete my account and recreate it with another username...

radiant pollen
#

@lean knot There is no way to delete your account.

pale plaza
#

Who Know Any Custom Fishing Plugins For Just 1 Area

wanton delta
#

once again we are not your google

trail zephyr
#

Hi does anybody here have experience with Hibernate ?

wanton delta
#

we dont have the knowledge of 1000s of plugins

pale plaza
#

@wanton delta Bryh on google They never work

wanton delta
#

then go to the forums

#

¯_(ツ)_/¯

radiant pollen
#

@pale plaza What do you mean by "Just 1 Area"

wanton delta
#

i think he means modify the loot tables for fishing in a defined region

old barn
#
    @EventHandler
    public void ChangeWorld(PlayerTeleportEvent e) {
        Player p = e.getPlayer();
        World w = e.getTo().getWorld();
        if(w.getName().equalsIgnoreCase("War")) {
            for(ItemStack item : p.getInventory().getContents())
            {
                if(item != null) {
                Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "givekit war " + p.getName());
                p.sendMessage("§eWelcome to the war world");
                e.setCancelled(false);
            }else {
                p.sendMessage("§cClean up your inventory");
                e.setCancelled(true);
            }
            }                               
        }

Someone help me? is not working and is sending the message 10 times

ashen stirrup
#

How do you set a Player's scoreboard to nothing? I tried player.setScoreboard(null);

radiant pollen
#

@ashen stirrup Create a new scoreboard with nothing in it and set their scoreboard to that.

#

Might be better to just have one instance of an empty scoreboard and set their scoreboard to that. That way you don't create a new empty scoreboard anytime you need to remove it.

#

Should save memory I guess.

dusty topaz
#

@old barn you send the message in the for loop

#

which is iterating over inventory contents

radiant pollen
#

@old barn You're sending the message inside the loop for the inventory. You're sending the message for each item.

#

You're also cancelling and uncancelled the event inside the loop so it won't work.

#

Make a loop that checks if their inventory is empty and create a new boolean for it. Then use that to determine if they get the kit and join or it gets cancelled.

fleet burrow
#
    @EventHandler
    public void ChangeWorld(PlayerTeleportEvent e) {
        Player p = e.getPlayer();
        World w = e.getTo().getWorld();
        if(w.getName().equalsIgnoreCase("War")) {
            for(ItemStack item : p.getInventory().getContents())
            {
                if(item != null) {
                Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "givekit war " + p.getName());
                p.sendMessage("§eWelcome to the war world");
                e.setCancelled(false);
            }else {
                p.sendMessage("§cClean up your inventory");
                e.setCancelled(true);
            }
            }                               
        }

Someone help me? is not working and is sending the message 10 times
@old barn This ain't C#

ashen stirrup
#

Because you have 10 items in your inventory

wanton delta
#

its sending the message for every single item

#

Bukkit.dispatchCommand :S

frigid ember
#

lol

wanton delta
#

before you do anything else think about what youre trying to do

#

test if the players inventory is empty

#

there is a better way to do that

pale plaza
#

@radiant pollen a Region basicly u can only fish and catch in the region what i sellect and i can customise the fish loot

radiant pollen
#

Easiest google search of my life dude.

#

:/

pale plaza
#

But It Wont Work i got That Rn it Says unknow command

#

@radiant pollen

radiant pollen
#

It has good ratings and was updated earlier this month. You're probably doing something wrong.

#

Check the console for errors when you restart your server.

pale plaza
#

No Cus i download zip then put in plugins then unzip

radiant pollen
#

That's wrong...

pale plaza
#

How Then

radiant pollen
#

Plugins are .jars not .zips.

#

You probably downloaded the source code or something.

pale plaza
#

IDK

#

Ok lemme try

#

How Do I Download Then cus it take me to GitHub

red bolt
#

this is a rather odd question but what faction plugin should i try to fork ?

pale plaza
#

Massive Factions

tiny dagger
#

whatever you like imo

radiant pollen
#

@pale plaza Click the download link for the .jar

red bolt
#

im basically asking which one is the best

pale plaza
#

Then To change cost of to buy a faction land go config change cost to 0 or set a price

#

@radiant pollen But There Is No Jar

#

Send me a screen of were

radiant pollen
#

That's the download link from the Spigot resource page.

#

There is, very clearly, a .jar.

pale plaza
#

Then What

#

Lemme Download then try

red bolt
#

is factionsuuid free ?

pale plaza
#

again

#

@radiant pollen Ok How Do i Set The Regions Custom

#

????????

radiant pollen
#

@pale plaza I don't know. I've never used the plugin before. I just did a Google search for you...

#

You're gonna have to read the resource page.

#

There's a wiki link there.

pale plaza
#

@radiant pollen Well still unkown command when i try the one they put on site

radiant pollen
#

Did you restart the server?

pale plaza
#

Yeh

#

It Show up in plugins in game but no commands

radiant pollen
#

Did it generate config files?

pale plaza
#

Yeh but tHERE nothing there

#

Now It Work but say nothing about setting up with regions

leaden needle
#

I'm having some issues loading plugins into my server recently. When I put the .jar file for the plugin into my plugins folder, it shows the size as being 0KB, and when opening with 7zip, the jar file is completely empty.

fleet burrow
#
List<AbstractUpgrade> upgrades = machine.getUpgrades();
        upgrades.forEach(upgrade -> {
            System.out.println(upgrade);
            upgrade.applyUpgradeModifier(MachineResourceGetProcess.this);
        });```

java.lang.ClassCastException: com.google.gson.internal.LinkedTreeMap cannot be cast to me.oriharel.machinery.upgrades.AbstractUpgrade
at java.util.ArrayList.forEach(ArrayList.java:1257) ~[?:1.8.0_221]
at me.oriharel.machinery.machine.MachineResourceGetProcess.startProcess(MachineResourceGetProcess.java:38) ~[?:?]
at me.oriharel.machinery.Machinery.lambda$loadMachineData$4(Machinery.java:113) ~[?:?]
at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftTask.run(CraftTask.java:81) ~[spigot-1.15.2.jar:git-Spigot```
Why the hell am I getting this error 😅
upgrades.forEach(upgrade -> { this is line 38

tiny dagger
#

well

#

it's a casting issue

fleet burrow
#

nvm I need to create a custom type adapter for AbstractUpgrade

#

for gson

median raft
#

hey boys

fleet burrow
#

probably*

median raft
#

is there a way to edit a vanilla server's mob cap?

#

I'm trying to run the latest snapshot and there's no spigot for that

tiny dagger
#

i don't think so

#

however you can always use their own mapping to check where its at :p

median raft
#

do they publish sourcempas for snapshots?

meager lantern
#

Hey, do any of you guys have any experience with issues regarding the Scoreboard? It seems to me you can't have any formatting, like strikethroughs, underlines etc.. On the very last line of the Scoreboard. Unless... A title message is shown, an actionbar message is shown or the title above an item in your actionbar is shown.

It seems to me that this is a bug with Minecraft itself, but I'm just hoping to see if any of you know of a workaround, that doesn't consist of adding an extra line below the one in question.

wanton delta
#

@meager lantern use setDisplayName

meager lantern
#

I'm using NMS code, I'm sending all of the packets myself and the packets that are being sent do contain formatting, so I'm certain that it's something happening on the client side, which is also why the formatting is stripped and shown whenever client side events happen

wanton delta
#

So what are you changing in the packet

meager lantern
#

I'm not changing anything, I'm just sending a packet telling the client to show a given name with a given score on the Scoreboard, which works just fine, with the exception of whatever name is located at the bottom of Scoreboard

wanton delta
#

Ah yes

meager lantern
#

It seems to me, that the bottom line of the scoreboard is bugged on the client side, but I just want to make sure, that I'm not missing something here

wanton delta
#

i think the work around is to add an empty line at the bottom

meager lantern
#

Yeah, that I knew, but it doesn't look too nice

wanton delta
#

¯_(ツ)_/¯

meager lantern
#

So is this a known issue?

wanton delta
#

thats what i'm currently doing

#

yes

radiant pollen
#

Could you send an empty ActionBarMessage?

meager lantern
#

Ah okay
Oh hey, Zax!

radiant pollen
#

Hey!

wanton delta
#

hmm

meager lantern
#

I don't think the actionbar messages is shown if it's empty, I've thought about it though

unkempt dock
#

Hey guys!

What is the Material for grown beetroot in 1.12.2?

meager lantern
#

This could cause issues with other plugins sending actionbar messages, that don't go through my plugin though

radiant pollen
#

@unkempt dock "BEETROOTS" is the block.

meager lantern
#

As there's no way to check if an actionbar message is currently being shown to a user, unless I decide to intercept packets

radiant pollen
#

Oh, true.

unkempt dock
#

Material.BEETROOT_BLOCK?

radiant pollen
#

Oh you said 1.12.2

wanton delta
#

@meager lantern this is how a plugin is oging it

radiant pollen
#

Yeah it should be BEETROOT_BLOCK

wanton delta
#
        if (!lines.isEmpty() && lines.get(lines.size() - 1).equals(""))
            lines.remove(lines.size() - 1);

        board.setSidebar(lines);
        Bukkit.getOnlinePlayers().forEach(o -> o.setScoreboard(board.getScoreboard()));```
unkempt dock
#

okay, I will give it a try

wanton delta
#

lines is an arraylist of the scoreboard lines

#

i think what it is doing is adding an extra line then removing it?

meager lantern
#

It seems to me it's removing the last line if it's empty, but that is all being done before it's being sent to the user

#

So the user still has a Scoreboard with a broken bottom line

wanton delta
#

ill just link you to the github

#

core/..../scoreboard/fakescoreboard

meager lantern
#

It looks like this would have the same issue as any other Scoreboard plugin

#

People that use TitleManager are able to add an empty line to the bottom of the scoreboard themselves, if they require formatting, though I just wanted to see if there was a workaround

radiant pollen
#

It definitely seems like a client-side bug.

wanton delta
#

it doesnt

#

tested it

meager lantern
#

Definitely

radiant pollen
#

I can't find anything that seems like this problem on the bug tracker though.

meager lantern
#

You sure? Do you know of anywhere I can test it out Mart?

wanton delta
#

its a plugin im working on updating rn

#

(i did not create the system, im just updating it)

meager lantern
#

Right, yeah I saw that LibraryAddict has had his hands on it

hot fable
#

To read a yaml how is it? It is that it returns null with this:

        File file = new File(plugin.getDataFolder(), "messages.yml");
        YamlConfiguration messages = YamlConfiguration.loadConfiguration(file);
final verge
#

You got answered earlier

#

Does the file exist

#

Likely no

dusty topaz
#

registerNewObjective​(@NotNull String name, @NotNull String criteria, @NotNull String displayName)

#

What is meant by criteria?

#

And does name have to be unique?

tribal forge
#

Guys, BuildTools has started throwing an error every time I run it:

#

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project spigot-parent: Failed to install metadata org.spigotmc:spigot-parent:dev-SNAPSHOT/maven-metadata.xml: Could not parse metadata C:\Users\RonaldMcDonald.m2\repository\org\spigotmc\spigot-parent\dev-SNAPSHOT\maven-metadata-local.xml: only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1) -> [Help 1]

#

I tried deleting maven-metadata-local.xml but it didn't fix it.

hot fable
#

If the file exists, it is in the plugin folder

final verge
#

But it doesn’t exist on the sever

#

Server

old barn
#

How do I check if the player has armor on?

frigid ember
#

player.getInventory().getArmorContents()

#

loop through all, if they are all null he has no armor on

radiant pollen
#

@dusty topaz criteria is the vanilla scoreboard criteria. There’s dummy, player kills, entity kills, etc

#

Dummy is probably what you want to use so you can increment the score or set it to the value you want

dusty topaz
#

should there not be an enum for that?

#

seems a little weird to use strings

south cedar
#

Hello! Can someone please have a quick look at this https://paste.md-5.net/futehekecu.md
I'm having problems starting at line 728 and can't seem to spot the issue.

I'm running 1.15.2 I'm using PlotSquaredV5. Whenever I go into the plot world I'm getting this timeout error. Unsure if it's spigot or plugin related.

signal yarrow
#

Hi, I'm trying to serialize an Object into json with Gson, this object contains a field that is an ItemStack array.
The problem is I'm getting an StackOverflow: null error. Even when using an ItemStackAdapter like this:

private static final class ItemStackAdapter implements JsonSerializer<ItemStack>, JsonDeserializer<ItemStack>{
        @Override
        public ItemStack deserialize(JsonElement element, Type type, JsonDeserializationContext context)
                throws JsonParseException {
            @SuppressWarnings("serial")
            Map<String, Object> map = context.deserialize(element, new TypeToken<Map<String, Object>>(){}.getType());
            return ItemStack.deserialize(map);
        }
        
        @Override
        public JsonElement serialize(ItemStack itemStack, Type type, JsonSerializationContext context) {
            return context.serialize(itemStack.serialize());
        }
    }
    
    public static final Gson JSON = new GsonBuilder().registerTypeAdapter(ItemStack.class, new ItemStackAdapter()).create();
#

Is it related to the fact that the field is an array, and this adapter is for a single object ?

quick finch
#

On Spigot 1.15.2, usercache.json is located in the --universe (startup parameter) directory. I just did some testing on 1.14.4 and 1.13.2, and usercache.json is located in the Spigot root directory. Can someone point me to a reference for the change, or at least confirm that my observations are correct?

#

I searched the Mojang and SpigotMC issues forums: no joy.

tribal forge
#

Guys, BuildTools has started throwing an error every time I run it:

#

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project spigot-parent: Failed to install metadata org.spigotmc:spigot-parent:dev-SNAPSHOT/maven-metadata.xml: Could not parse metadata C:\Users\RonaldMcDonald.m2\repository\org\spigotmc\spigot-parent\dev-SNAPSHOT\maven-metadata-local.xml: only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1) -> [Help 1]
I tried deleting maven-metadata-local.xml but it didn't fix it.

dusty topaz
#
    public Scoreboard getScoreboard() {
        Scoreboard board = Bukkit.getScoreboardManager().getNewScoreboard();
        Objective objective = board.registerNewObjective(boardName, "dummy", "&6&lSimon Says");
        objective.setDisplaySlot(DisplaySlot.SIDEBAR);
        Gamescore score = minigame.getGamescore();
        for (Playerscore playerscore : score.getAllScores()) {
            Score scoreboardEntry = objective.getScore(ChatColor.YELLOW + playerscore.getPlayer().getName());
            scoreboardEntry.setScore(playerscore.getScore());
        }

        return board;
    }
#
            @Override
            public void run() {
                Scoreboard board = gameboard.getScoreboard();
                players.forEach(player -> player.setScoreboard(board));
            }
        }.runTaskTimer(instance,20L,20L).getTaskId();
#

Anyone got any idea why that doesn't work?

#

I can't figure it out

gray trout
#

Is it possible to have a single hardcore world on a non-hardcore server?

frigid ember
#

using multiverse?

#

😄

turbid latch
#

onceAndEternal

Maybe a custom plugin for the world you want to be hardcore?

#

Check for player in the world and check if they have died once in the world then
if true then put them to spectator mode and changed player's gamemode depending on the world they're in

maybe there is an easier way😅

gray trout
#

Yeah I'm using multiverse. Custom plugin definitely sounds like the way I need to go

lone rapids
#

if(event.getAction().equals(Action.RIGHT_CLICK_AIR) || event.getAction().equals(Action.RIGHT_CLICK_BLOCK) && event.getItem().getType().equals(Material.GOLD_SWORD)) How come this statement evaluates to true if I'm right clicking any block, not just a gold_sword

vernal spruce
#

separate them

#

check if the item is goldsword inside the action checks

lone rapids
#

Two if statements?

vernal spruce
#

yes

lone rapids
#

nested?

vernal spruce
#

or suuround the actions in another ( )

frigid ember
#

&& takes precedence over ||

vernal spruce
#

^

lone rapids
#

So it should work then

#

?

vernal spruce
#

yes

frigid ember
#

You're effectively doing
right click air || (right click block && gold sword)

lone rapids
#

oh

#

Thank you Adam Morris

#

So group the action logic together

#

But leave && outside

vernal spruce
#

wouldnt if((actionA||actionB)&&goldSword) work?

lone rapids
#

Yes

#

That's what I was suggesting

#

Thank you for your help Stellrow and Adam Morris. Stay safe!

radiant pollen
#

It depends on what you want.

vernal spruce
#

tbh i would just separate them doesnt hurt anything..

lone rapids
#

Ye, makes it more readable, rather than being a long line lol

rapid yacht
#

U guys got any nice java tutorials? Maybe on yt?

frigid ember
#

Learning Java or the Spigot API?

vernal spruce
#

java? there are plenty you can choose from

#

spigot/bukkit? TheSourceCode did a great job going over pretty much everything

pale plaza
#

Is There Any Way to set tools To Ban

#

People

vernal spruce
#

tools?

pale plaza
#

Ye

vernal spruce
#

explain more i ddidnt get what ur asking

pale plaza
#

Is There a way to make a axe ban people

radiant pollen
#

@pale plaza Essentials power tools.

pale plaza
#

Thanks

#

@radiant pollen What prefix idk xd and do i have to install or is it in essentils already

radiant pollen
#

Essentials is a plugin.

#

You have to install it.

pale plaza
#

ik but is the power tool built in

frigid ember
#

@pale plaza Holding an axe, do /pt ban USERNAME

radiant pollen
#

Yes.

pale plaza
#

Thanks

#

Is There a way to make when i hit em it ban

frigid ember
#

/pt ban @p might work? idk.

silk bane
#

also idk if essentials /ban supports player selectors so you might need /pt minecraft:ban @p

solid ermine
#

I wanna know is there a 1.15.2 that can make your name colored in tab?

frigid ember
#

Essentials can do it

#

Look at config.yml

solid ermine
#

Essentials?

frigid ember
#

Yes

solid ermine
#

That's the plugin?

frigid ember
#

You don't have Essentials installed already?

solid ermine
#

No i created my server yesterday

#

But thx

frigid ember
solid ermine
#

I will do it later i am on my phone rn but thx for the help

frigid ember
#

np

solid ermine
#

Btw sorry if my english is bad

limber marlin
tiny dagger
#

Wrong class

#

There is no dustparticles on the version you've tried it on

limber marlin
#

my servers on 1.11.2 im pretty sure

pastel condor
#

A few players on my bungeecord server get disconnected with an existing connection was forcibly closed by remote host

#

and I have done a lot to try to fix this but I can't seem to be able to

#

it stated happening today

vagrant widget
#

Did you change anything before it started happening?

#

Or just did start doing it

pastel condor
#

It just stated doing it

vagrant widget
#

Hmmm

pastel condor
#

and players are only crashing in the lobby server

#

not in the bedwars

#

oh nevermind

#

they crash in bedwars too

#

so I think it's a bungeecord issue

#

omg

#

it was my ping limiter plugin

old barn
#
    @EventHandler
    public void Comandos(PlayerCommandPreprocessEvent e) {
        Player p = e.getPlayer();
        World w = p.getWorld();
        if(w.getName().equalsIgnoreCase("War2")) {
            if(p.hasPermission("blaze.staff")) {
                e.setCancelled(false);
            }else {
                e.setCancelled(true);
                p.sendMessage("Error.");
            }
        }
    }

Can unauthorized players type commands anyway? the "Error" message appears, but they can type commands

radiant pollen
#

If you don't give the command a permission, everyone can use the command.

#

AFAIK

old barn
#

Yes, but I wanted to block all commands in this world, for example /spawn

pastel condor
#

players on my server are now getting kicked with read time out null

#

I am not sure how to fix this

sour dock
#

internet issue?

pastel condor
#

nope

#

I have been running this server for over a year

#

and the issues started today

frigid ember
#

What did you change?

pastel condor
#

nothing

radiant pollen
#

@old barn You need to use a permissions plugin.

pastel condor
red bolt
#

any idea why this happens ?

fleet crane
#

Why are you using nms for this

red bolt
#

because i need to add an identifier to my item

#

i dont want to check lore and display name

silk bane
#

ba dum persistent data container

wanton delta
#

look up how to use reflection for constructors :/

red bolt
#

i only asked this because on 1.8.8 i could use this

wanton delta
#

what version is this

red bolt
#

1.15.2

silk bane
#

ba dum persistent data container

red bolt
#

what is that

silk bane
#

it does what you want

#

check javadocs

wanton delta
#

tbh i wasnt exactly sure why your IDE was throwing that error

fleet crane
#

It’s not public in 1.15.2

#

Gotta use the .a build method

red bolt
#

i think ill use a namespacedkey

#

aka what mr konsolas mentioned

wanton delta
#

oh my mistake

#

i had the wrong jar open

#

that was 1.12.2

#

@red bolt if you still insist using NBT, use NBTTagString.a

pastel condor
#

anyone know how I can fix the read time out null error? I followed the bungeecord guide.

wooden harbor
#

Can anyone help me i'm trying to use the Prism Plugin for minehute server ive installed the plugin and loaded the game and i get this : /prism ?

#

it wont let me paste an image to show.

wanton delta
#

verify your spigot account

#

Use !verify <forums username> to get a PM to verify your forums account with Discord.

wooden harbor
#

!verify

tawdry lilyBOT
#

Usage: !verify <forums username>

wooden harbor
#

!verify dubln

tawdry lilyBOT
pastel condor
#

I am getting Exception Connection:ReadTimeOutException : null

#

on my bungeecord server

#

please can someone help me

frigid ember
#

@red bolt its NBTTagString.a("String"); depending what version your using

#
    public static ItemStack setTag(ItemStack item, String key, String tag) {
    net.minecraft.server.v1_15_R1.ItemStack nmsApple = CraftItemStack.asNMSCopy(item);
    NBTTagCompound applecompound = (nmsApple.hasTag()) ? nmsApple.getTag() : new NBTTagCompound();
    applecompound.set(key, NBTTagString.a(tag));
    nmsApple.setTag(applecompound);

    return CraftItemStack.asBukkitCopy(nmsApple);
    }

This works in 1.15.2

#

@pastel condor you did something wrong.

red bolt
#

yee i got it

frigid ember
#

Ok

final verge
#

Are you using maven or gradle?

red bolt
#

me ?

pastel condor
#

but what did I do wrong? @frigid ember

final verge
#

ye

pastel condor
#

my server has been running smoothley for almost a year

#

then I start getting these issues

final verge
#

I use it for all my NBT stuff and saves so much time

red bolt
#

im not using anything

#

i just import jars in build path

wanton delta
#

ope

#

you should consider using maven

red bolt
#

idk how to use it on eclipse

wanton delta
#

do i really need to pull up lmgtfy

final verge
#

its kinda clunky when you learn it and youll wonder why tf anyone would use it

pastel condor
#

I need help fixing Exception Connection:ReadTimeOutException : null

wanton delta
final verge
#

but it is well worth the hassle

wanton delta
#

yes'

#

adding jars to classpath is 🤢

#

maven dependencies make the whole process easier

final verge
#

you can still use jars as deps with maven but you can also access repo's such as spigot which means every time spigot updates, you automatically are compiling against the newest version if you specify that.

wanton delta
#

usually jars with apis are already on maven as well

#

only time ive had to manually add a jar is when the repo was outdated/no longer managed

red bolt
#

that sounds cool

#

btw

#

do i put nbt tags before setting item meta data ?

#

like name,lore etc

#

or the opposite ?

minor spruce
#

wait can you access nms stuff if you use maven?

red bolt
#

yeah but you need to run build tools

#

to have it in the local maven repository

#

i think

boreal tiger
#

yeah nms is not in the "remote" maven repo

#

just run buildtools and add spigot instead of spigot-api as a dependency

crimson sandal
#

Hey, are there any spigot-api builds for 1.16 or the current snapshots?

#

I can't seem to find where it would be

silk bane
#

md_5 keeps them under wraps

#

probably

crimson sandal
#

Really? So there's no way to start updating plugins? 🙂

#

Guessing the api will be changing a lot with every snapshot if they've even started updating

wooden harbor
#

Can anyone help me i'm trying to use the Prism Plugin for minehute server ive installed the plugin and loaded the game and i get this : /prism ?

wanton delta
#

probably is telling you to do that command

naive stratus
#

Hi. Just started messing around with bukkit/spigot tonight. I'm wondering how I can identify a dropped stack of items. I want to store dropped stacks in my database, to keep track of who dropped it for next time someone picks it up. What would the best approach be? Cant really find anything in the bukkit documentation that I see as a unique identifier.

meager lantern
#

There really isn't anything other than the Entity ID, though the issue with using that is that it changes its ID when its unloaded and loaded back into the world. One way to go about this would be to create a persistent NBT tag with your own unique identifier and link it to the stack

#

The issue with NBT tags is that there are only third party libraries for this that break upon newer versions of Bukkit/Spigot, unless this has changed over time. (My knowledge could be outdated as I haven't been writing new plugins for a few years now)

wanton delta
#

i think someone mentioned something like PersistentContainer

dusky herald
#

Or maybe you could manipulate the ItemMeta

#

And set lore or something with an ID

naive stratus
#

That's what I'm thinking too now, after looking a bit more in the documentation. Thanks for all the input.

meager lantern
#

Yeah changed the lore would probably be the easiest thing approach, you'll just have to remove the identifier again when the player picks it up

dusky herald
#

I'm working on a custom item and inventory system as well though, but the way it's working is I store all the inventory of the player and the "custom item" as it's own thing and repopulate the player's inventory every time they connect/reconnect

dense escarp
#

guys when i downlod plugins in my vps server some plugins dosen't work i think from java [apt-get install openjdk-9-jdk]
what verison too downlod plugins 1.8.8 and up

#

vps

#

Ubuntu 18.04

dusky herald
#

And you could easily store the ID, but like he said theres the issue with dropping items and restarting the server when they dont get the same Entity ID

naive stratus
#

@dusky herald I'll create my own id for each stack instead. That should persist on restarts, right?

#

I assume that's what PersistentDataHolder means

dusky herald
#

You could try, or you could also store the dropped items in the database and their coordinates/stack counts etc and reload them back in later after restarts

#

I mean there could be a ton of methods to actually approach it and resolve the issue.

#

Some just take more work than others

vernal spruce
#

Hmm why would i get more skillpoints than i typed? public void addSkillPoints(Integer toAdd) {
this.skillPoints+=toAdd;
}

#

It's for a companion plugin with the usual level system,problem is

#

it adds the level amount to the skillpoints amount

boreal tiger
#

its probably being called more than once

vernal spruce
#

private void checkLevel() {
if(xp>=xpNeeded) {
addLvl(1);
decreaseXp(xpNeeded);
addSkillPoints(1);
}
}

#

this is the check

#

it shouldnt matter?

boreal tiger
#

when is checkLevel called?

vernal spruce
#

theres only 1 use

#

whenever i add a xp

boreal tiger
#

just because there's only 1 use doesnt mean its not called twice

vernal spruce
#

eclipse its showing only 2 in the hole class

boreal tiger
#

can you show the code where checkLevel is called?

vernal spruce
#

the method and the check on xp

boreal tiger
#

it doesnt matter if its only once, if its inside an event it may be called twice

vernal spruce
#

public void addXp(Integer xp) {
this.xp+=xp;
checkLevel();
}

boreal tiger
#

when is addXp called

vernal spruce
#

on a blockbreakevent,its not event calling twice

#

as its not 2 skillpoints

#

its specifically the lvl amount as skillpoints

boreal tiger
#

have you tried printing something in your event to check if its not being called twice

vernal spruce
#

well time to fire up the local server and go ham

#

idk if it would even matter

#

the problem seems to be somewhere in the logic

#

at experience system

boreal tiger
#

btw having an addXp and removeXp method seems a bit redudant. you could just have setXp(getExp() - something something)

vernal spruce
#

gonna solve it tomorrow,im getting too sleepy

wooden harbor
#

I'm still having trouble loading or making /prism work for minehut server 😦

vernal spruce
#

That looks like a message warning the command doesnt exist

#

Is the plugin green in /plugins?

dusky herald
#

Also shouldnt you add more checks? What if a player gets more XP required for more than 1 level?

#

Theyll just gain 1 level and lose out on that extra level

#

Til they gain more xp

vernal spruce
#

@dusky herald not rly.. the check is made whenever they receive xp

#

If i set it to 1000 everytime it gets checked from adding xp they lvl up

#

Also i made it this way as you cant get experience only through X..

dusky herald
#

I mean, I would just add the functionality anyways

#

Just for the sake of it.

vernal spruce
#

Yeah i guess i can slap the method again on the levelup one

dusky herald
#

Like if you require 3000 xp to level from 3-5

#

And you're level 2 and you get like 5K xp or whatever

#

They would only level up to 3, and not to 5

vernal spruce
#

In this case were talking about lvl*40 for lvlup..

dusky herald
#

Becayse you didnt factor in leveling up more times based on the differences

vernal spruce
#

Because you cant get xp that fast

#

Unless you edit it in that player config file it wont ever happen

dusky herald
#

I mean it's up to you either way, I just think it's a good idea to handle the differences and iterate on extra levels

vernal spruce
#

I can just call the check method inside herself...

#

So it loops itself till it finishes

dusky herald
#

Yes, that's what I mean

#

Just keep running loops til it runs false

#

You may never actually make use of it, but you can always plan ahead just incase

vernal spruce
#

True...

naive stratus
#

Anyone know what the "pluginInstance" is in NamespacedKey?

#

Not sure how to get that

fleet crane
#

Your main class

#

this

wooden harbor
#

That looks like a message warning the command doesnt exist
@vernal spruce Yes ill show you a picture one moment.

lofty elbow
#

Is it possible to convert 1.15 byte data into legacy data?

wooden harbor
wanton delta
#

hi this is a fairly silly quesiton but does the primitave char require == or .equals

fading owl
#

Because it's a primitive you can't use .equals

dusky herald
#

==

fading owl
#

== is the only option.

dusky herald
#

Primitives dont have methods.

wanton delta
#

yea i knew it was silly

#

i was second guessing because char is similar to String in the fact it has to do with text

dusky herald
#

A string is just an array of Chars

#

It's a wrapper class at best

#

So yeah, they are similar.

wanton delta
#

interesting

dusky herald
#

String = char[length of string]

wanton delta
#

so heres the context

#

and im not sure if im doing this corectly, there might be an easier way

#

im trying to make a chatcomponent with color assigned to it

#
        if (prefix.startsWith("§")) {
            for (EnumChatFormat value : EnumChatFormat.values()) {
                if (value.character == prefix.toLowerCase().charAt(1)) {
                    prefixComponent.setChatModifier(new ChatModifier().setColor(value));
                    break;
                }
            }
        }```
#

this doesnt seem to be producing good results

#

when i print it to console this is what i get

#

TextComponent{text='§9', siblings=[], style=Style{hasParent=false, color=§9, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}

#

but the text im getting is white :/

dusky herald
#

You cant just use ChatColor?

#

I forget I havent worked with those ChatModifiers in forever

wanton delta
#

nope

dusky herald
#

I thought it still uses ChatColor but you had to set the color in the modifier

tiny horizon
#

Hi, I have a issue where Im on Spigot 1.8.8 and I have an alt on 1.15.2 (I have via version) and when Im in adventure mode it takes the item away for a second and then gives it back. But its not really taking it away

#

Its very weird

lofty elbow
#

does anyone know how to convert this string into blockstate
minecraft:redstone_wall_torch[facing=north,lit=true]?

gloomy shuttle
#

Does anyone know how to put bots, to test the stamina of my server?

lusty vortex
#

😄

tiny horizon
#

why does this happen

unreal basin
#

the servers of this pages

#

is only for premiuns?

wise forge
#

Anyone know of a plugin that properly respawns the dragon without any issues or being clunky and unoptimized? Excluding DragonSlayer and DragonEggDrop.

fleet crane
#

@lofty elbow look at the methods in Server returning BlockData

lone rapids
#

The method getTargetBlock(java.util.HashSet<java.lang.Byte>, int) in the type LivingEntity is not applicable for the arguments (HashSet<java.lang.Byte>, int)

#

I've tried (Set<Material>) null too

#

Do I need to import java.util?

dusky herald
#

Why are you using a deprecated method

dusty topaz
#

probably using 1.8

lone rapids
#

I'm using 1.8

#

I want the block of where the player is looking

silk gate
#

ah yes

#

method overloading fun

#

try creating an empty hashset

dusty topaz
#

Doing (Set) null should work in theory though

#

Likely is wrong import

#

Pretty sure when I've worked with decompiled code it's worked like that

autumn crater
#

im having an issue where i upload a minecraft world and set its folder name to the level in server properties, changing it from default world. then everything i try to start the server it crashes

frigid ember
#

So I used Bukkit.getScheduler().runTaskAsynchronously to loop through and update some block states in 1.13 but in 1.14 something changed that you can't access certain items like chests and stuff with inventories asynchronously, what should I use to replace it without lagging the server out lol

fleet crane
#

Do you not think the crash log would be helpful

#

@frigid ember that was never safe to do

#

The documentation is VERY CLEAR that you can’t use most api methods async

frigid ember
#

I have like a basic understanding of async and sync not the most known on that I just know that theres like a main thread and an off thread and when I used the async it spaced it out, not really sure what to use now instead or what would be optimal

#

I've used runTask instead to try it out and it ends up crashing the server lol

#

so I'm not really sure how I can space it out

radiant pollen
#

@frigid ember You'd have to use a synchronous task. If looping through everything you need to crashes the server, maybe just do one at a time in the task and reduce the period rather than looping through all of them.

dusky herald
#

Just out of curiosity

#

Could I make an Async method and then put a sync method inside of it?

#

Like

#

A runnable that is sync inside of the async

radiant pollen
#

Yes.

#

AFAIK

fleet crane
#

Sure but that doesn’t really help unless you have heavy calculations to do

dusky herald
#

Like do the extra bs with my async then pass it off to sync

#

Yeah that's what I mean, just the bad overhead then when those calculations are done then just back to sync

#

To access whatever I need to change

radiant pollen
#

You'd definitely want to do some testing.

#

Might just slow it down in the long run, compared to just doing everything in a sync task.

dusky herald
#

Yeah like I said I'm just curious, it's not something I'm even working on rn

#

Well, I mean like running database queries

#

Then passing off the results, etc

#

Like X player logs in, load their inventories async

#

Then pass the completed objects then sync them

#

And use the Bukkit API to implement them to the server basically

mellow bobcat
#

u guys know how to use featherboard dd/MM/yyyy placeholder

#

like i want it to show how many "Days" has already passed since from the reset and if its like reset ago it would be Day 1 and should be displayed "1"

#

i've tried using - '&4&lFaction <epochconvert from-seconds="2m">d</epochconvert>' i'm kindda noob at this shit someone with High IQ teach me pls 😂

frigid ember
#

SimpleDateFormatter formatter = new SimpleDateFormatter(“dd/mm/yyyy”);

formatter.format(new Date());
i think, im not sure i did that on mobile
im probs weong someone correct me

#

might be wrong

bronze horizon
scenic torrent
#

.g post request java

#

oh

#

well you get the idea

bronze horizon
#

right

#

im retarted

#

thanks

frigid ember
#

anyone know how to use skript. like when i do /go it does /warp and 3 other /commands?

stable egret
#

hey anyone knows how can i fix disconnect.spam kick?

mellow bobcat
#

AlveeYT do you use Viaversion?

stable egret
#

yes

#

i do

mellow bobcat
#

whats your server version?

stable egret
#

1.8.8

#

oh shit its paper spigot

mellow bobcat
#

yeah its currently an issue with ViaVersion when you type command or any packet you do you get kicked

stable egret
#

so what do i do?

mellow bobcat
#

there's really no fix for it atm unless you make your own ViaVersion plug-in

stable egret
#

aw

mellow bobcat
#

or switch to the latest version 1.15.2 and install ProtocolSupport which will add support to older version

stable egret
#

ok thanks for the help

frigid ember
#

everything i try to slow down the blocks crashes the server lol

#

all im tryna do is get an arraylist of blockstates

bronze horizon
#

its in the channel description

#

yeah

last tapir
#

One more thing buddy

#

My worldedit isn't working ?

#

Well my fastAsyncWorldedit

hollow crystal
#

Do spigot supports plotsquared?

dusky herald
#

Yeah?

bronze horizon
#

@last tapir are there any errors in the console?

last tapir
#

Yes

#

Could not pass event PlayerJoinEvent to VoxelSniper v1.0.3-backward

bronze horizon
#

what version of spigot are you using

#

I'm sorry but its like 3am for me right now, so i'm going to bed, just ping me in the morning thanks

narrow crypt
#

How do I catch a command to count how many times it is executed but also let that command go to the plugin that does somethinh with it

dusky herald
#

Wat

#

I'm not really sure what you are asking.

sour perch
#

they just want to count the amount a command got executed

broken karma
#

Is it possible to have a vanilla server backing the bungee server?

#

ah nvm I see there's VanillaCord

buoyant path
#

Is it worth caching and changing it whenever players log on and off or should i just create a new list?

tiny dagger
#

you don't create a list but an object to store data like that

buoyant path
#

Huh

#

I already have it stored

#

@tiny dagger

bronze marten
#

Just look at ur timings

buoyant path
#

i just have to create the list to send to the player, or alternatively cache it with the Gang object

bronze marten
#

See how much impact it has

buoyant path
#

i havent really coded it yet lol

#

thats just my old plugin

bronze marten
#

Then you can still look at timings ..?

buoyant path
#

oh

#

true

#

Lol

bronze marten
#

But generally speaking i dont think this would cause much issues lmao

buoyant path
#

I want to make it as optimized as possible

bronze marten
#

Just check with timings afterwards and maybe you dont need the caching hell afterall

buoyant path
#

But also not die from all the caching lol

#

@bronze marten it doesnt even show on the timings lol

#

i dont think its gonna be a factor at all

bronze marten
#

But why would you want to show this on every command btw

solemn grove
#

what's is the best way to update a plugin configuration file's format? (without messing up the comments, self repair and auto upgrade)

frigid ember
#

So I have an important question! And when I go to your site, I get scam-pop-ups so there I would have won an Iphone or something and that scares me a bit. It is only on your side and every time I look at a plugin!

naive goblet
#

What site?

frigid ember
#

What do you mean

#

I get the PopUps on the spigot site

naive goblet
#

Probably from your pc

#

Spigot doesnt give stuff like that

frigid ember
#

How do I test if it is on my PC I already did a virsu scan

naive goblet
#

Depends what antivirus you got

frigid ember
#

Only Windowsdefender

naive goblet
#

It sucks

sour dock
#

try the antimalware tool for your browser @frigid ember

frigid ember
#

Okay thx

sour dock
#

though if you are at this point you might as well reinstall windows

#

that way you can be pretty sure you got everything

naive stratus
#

https://pastebin.com/cxKsskGg - Anyone has an idea of why I get You picked up null in the EntityPickupItemEvent, but I can output You dropped SOME_UUID in the PlayerDeathEvent?

#

I mean, I can get it from the PersistentDataContainer after setting it, in the first event, but when I then try to pick up the stack later on, it does not know the value.

frigid ember
#

Or now that windows is broken, just stop using it.

naive goblet
#

@naive stratus null check it?

naive stratus
#

@naive goblet Null checking wouldn't help me here. I expect there to be a value, since I just set it on the items meta data, in another event.

#

Sure, I can check for null, but then what? 😉

naive goblet
#

Use EntityPickupItemEvent this event seem to be deprecated and don’t use pastebin

#

Or maybe inventorypickupitem

naive stratus
pale plaza
#

hey who know any spawner plugins cus i have one but it wont work

naive stratus
#

I cannot for the life of me figure out why I cannot retrieve the data in the pickup event... Modified the code a bit, removed the deprecated parts, but still same result. I can get the value and output it in the onPlayerDeath event, but still not in onEntityPickupItem. It will always output "You picked up unknown items"

  • If someone could take a look at it, while I go for lunch, that would be great. Would really appreciate it!

Main: https://pastecode.xyz/view/b6b95042
Score: https://pastecode.xyz/view/479c736b

#

(Hope this paste provider is ok)

#

Idk if its more of a Java issue that I am missing. I'm not experienced with Java at all.

pale plaza
#

Hey im making a plugin so u can bind anytool to ban Who can help me like tell me what to so

frigid ember
#

why doesnt

           OutputStream out = new FileOutputStream(resourceFile)) {
         ByteStreams.copy(in, out);
       } ``` work on java 8? it wants me to change to java 7?
tiny dagger
#

uh

#

you're not using java 8 then

#

some older version

sick citrus
#

Wow.

#

I got a final ConcurrentHashMap that is null

#

I don't understand

#

and calling getField(uuid) returns an NPE

#

with UUID not being null

#

If I replace it with HashMap, there's no NPE anymore

lusty vortex
#

Would need the full code man 🤷‍♂️

#

Although I've had WEIRD shit happen before with Java code

tiny dagger
#

the null is the hashmap or the actual values in it

sick citrus
#

the hashmap is null

#

getting an NPE on line 41, and line 40 says null

#

replacing with HashMap -> no NPE

#

(that error is Caused by NPE on line 41)

#

Maybe IntelliJ cache problem

lusty vortex
#

Yeah rebuild the project

#

Hopefully it's not due to the eager initialization of that cache class

#

As in, it's a weird ass JVM bug

sick citrus
#

I mean I do understand getting an NPE from a get() with null argument

#

but why is there any difference between HashMap and concurernthashmap on initialization, this is what I really don't get.

#

Rebuilding

dusky herald
#

What

sour dock
#

@sick citrus HashMap tolerates null key/values, concurrenthashmap doesn't

sick citrus
#

I know RobinMC

dusky herald
#

That makes literally no sense to me

sick citrus
#

the hashmap itself is null

sour dock
#

so it could make sense that get(null) works for one and doesn't for another

sick citrus
#

but apparently rebuilding it fixed it

#

so I guess IntelliJ cache issue

sour dock
#

that can't be because you are statically inializing it

dusky herald
#

You're using entry to cycle throufh

sour dock
#

so it can never be null

obtuse rose
#

@sick citrus try changing public final to public volatile final ?

dusky herald
#

But you're not even referencing the entry?

#

You just keep referring to the HashMap

obtuse rose
#

wait.... that shouldn't be the case nvm me

lusty vortex
#

He claimed the map reference it's self was null

sick citrus
#

Wel lit's not anymore

dusky herald
#

If its null then how is he iterating through and reaching line 40?

sick citrus
#

after invalidating IntellJ's cache

lusty vortex
#

He's just posting an example

#

Not the full code

dusky herald
#

Ah okay

sick citrus
#

The first entry iterated properly

#

it's "reverseIp" that is causing issues

#

not "reverse"

#

and both of them were ConcurrentHashMap s

#

(until I changed it, which is what you saw on the screenshot)

dusky herald
#

And you did initialize your PlayerCache class right?

sick citrus
#

How else could I possibly call that method without having an instance ?

#

and whether it's a static function or method doesn't matter, the object is static final

lusty vortex
#

Yeah he initialized it with Eager initialization

sick citrus
#

and initialized

dusky herald
#

I cant see the full code but

lusty vortex
#

You're still getting the error @sick citrus ?

sick citrus
#

No, I'm not

dusky herald
#

You have everything contained within for() { } brackets right?

lusty vortex
#

Ow then why are we even talking about this lmao

dusky herald
#

The code you showed doesnt have the brackets

#

That's why I'm asking

obtuse rose
#

full stacktrace please

sick citrus
#

It's fixed anyway guys

lusty vortex
#

xD

sick citrus
#

and @dusky herald no need for brackets since it's only one line

lusty vortex
#

Chill guys

#

Leave the dude alone!

obtuse rose
#

gotta love when problem fix itselves xD

sick citrus
#

And it's not even reached.

dusky herald
#

Wait

#

I thought HashMap was keySet()

sick citrus
dusky herald
#

Not entrySet() or maybe I'm wronf

#

Wrong

#

¯\_(ツ)_/¯

lusty vortex
#

I've had Intellij fuck with me before too lol

sick citrus
#

@dusky herald It's keySet if you want the keys, values() for the values, and entryset for both

#

BUT it was a null object and THAT was the problem.

dusky herald
#

And you're putting the Ips in there?

#

I forgot how...Player.getAddress().getAddress().toString()?

sick citrus
#

It's for custom MOTD

#

so event.getAddress() matching player cache (player.getAddress().getAddress().getHostName())

dusky herald
#

Hmm

sick citrus
#

it's crap most of the time but when it works it's nice

dusky herald
#

😂

sick citrus
#

Massive shame that ServerListPingEvent doesn't provide an UUID...

#

Like seriously, it could.

dusky herald
#

I do find it odd that it's not working

sick citrus
#

and provide a null for unauthenticated

dusky herald
#

Does it really need to be final though?

sick citrus
#

It is working now. intelliJ cache issue.

dusky herald
#

Ah

sick citrus
#

Dude seriously ?

naive stratus
#

I don't want to spam or bump too much in here, but would someone be willing to help me out with my issue? It's a bit of a bottleneck for me now, so I'm getting a bit desperate now haha. Got everything else on my todo list done now, so I'm back to being stuck with this issue now 😛

dusky herald
#

What

sick citrus
#

@naive stratus sure

dusky herald
#

Seriously what? Lmao

naive stratus
#

I cannot for the life of me figure out why I cannot retrieve the data in the pickup event... Modified the code a bit, removed the deprecated parts, but still same result. I can get the value and output it in the onPlayerDeath event, but still not in onEntityPickupItem. It will always output "You picked up unknown items"

  • If someone could take a look at it, while I go for lunch, that would be great. Would really appreciate it!

Main: https://pastecode.xyz/view/b6b95042
Score: https://pastecode.xyz/view/479c736b
@naive stratus

@sick citrus

dusky herald
#

I find it odd you can even have issues with IntelliJ cache rofl

naive stratus
#

Bugs me to much to be stuck on this. It should be so simple. I do this for a living! lol (Not Java though, this is my first)

dusky herald
#

Does it have to be EntityPickupItem?

#

Or could you use PlayerPickupItem?

naive stratus
#

PlayerPickupItem is deprecated.

#

I guess EntityPickupItem is the recommended then

dusky herald
#

🤔

#

Lemme see

sick citrus
#

do you not have to update the persistent data container ?

#

after setting items in it ?

#

I have no experience with it but maybe it's just like itemStack where you need to .update() at the end ?

naive stratus
#

I was looking for something like "commit" or anything last night, but couldn't find anything that made sense

dusky herald
#

Okay so does it have to be any entity or just a player?

naive stratus
#

Just players will work for me

sick citrus
#

It's deprecated blackveiled. And it doesn't matter.

naive stratus
#

^ Yeah I guess as long as I get an ItemStack in the event, it doesnt matter which event it came from.

dusky herald
#

I'm referring to the EntityPickupEvent now

#

Not the Player one

#

Are you cancelling the event?

naive stratus
#

No

#

You can see everything I do in the two pastes. That's all of the plugin, except for the plugin.yml ofc.

sick citrus
#

can you not event.getItem().getPersistentDataContainer() ?

#

it might not be the same itemstack

obtuse rose
#

@dusky herald IDEA cache does bug from time to time 🤷‍♀️
Not really that often though, but if you spot something that shouldn't be possible, go ahead and invalidate cache 🤷‍♀️

#

I think I've had that bug less than 10 times (probably around 5)

#

I use IDEA for the past 6 years

sick citrus
#

I've never encountered any cache issue besides not recognizing dependencies from time to time

#

and used it since it came out in i-dont-know-what-year

#

@naive stratus

can you not event.getItem().getPersistentDataContainer() ?
@sick citrus

naive stratus
#

@sick citrus I'm trying that now

sick citrus
#

it makes sense that it's not the same itemstack

obtuse rose
#

@sick citrus wow, lucky you xD

#

how come you never had cache bug 🤔

sick citrus
#

you will have to store the data per-item as well, rather than per itemstack @naive stratus

#

@obtuse rose I don't know, maybe I restart the IDE often enough ?

obtuse rose
#

🤷‍♀️

naive stratus
#

@sick citrus How come I cannot just do it per stack? I am just interested in knowing who dropped a stack, for when it's being picked up again next time.

sick citrus
#

Well imagine your inventory is full

#

you pick up only part of it

dusky herald
#

Did you try event.getItem().getItemStack()?

naive stratus
#

That's still okay in my case. I will also take the stack amount into account, in what I am doing, so I can accept that.

sick citrus
#

One other way you can do it, but you lose persistence across reloads/reboots, is to store it in your own hashmap

naive stratus
#

Oh I only just realized now that it does not drop the entire thing as a stack

#

But as single items

sick citrus
#

Ah well there you go

#

therefore -> not the same itemstack

naive stratus
#

Yeah

#

Makes sense now 😛 Will modify my code and give it another go

sick citrus
#

so per-item 😛

dusky herald
#

I thought they were supposed to combine as they dropped

#

Eh w/e

#

Goin to bed tired as hell

sick citrus
#

They combine on the client, to not see 64 items on the ground

#

and you can actually disable that.

#

And it doesn't make an itemstack.

frigid ember
sick citrus
#

What kind of host are you using ?

frigid ember
#

Dedicated

sick citrus
#

Details please

frigid ember
#

there is no TPS lag

#

alright

#

i

#

64 gb ram ddr3 (or 4 i think)

#

480gbps ddoss prtection

sick citrus
#

Well there's no point in having your ram details if we don't have the rest :

  • server startup flags
  • what else is running on the server
  • what company host it
  • what OS are you on
  • what system tweaks you made

Using a dedicated is something that's not easy, and there are an incredible amount of factors that play a role.

#

From the explaination I get from your post, it seems to me like someone is using VoxelSniper a lot...

#

(also I'm curious to know what client mod you use for flying, if any)

frigid ember
#

wym

#

I'm using lunar

#

and I'll get that info out of the host

sick citrus
#

...so it's not a dedicated ?

frigid ember
#

it is

#

I'm limited to certain things

sick citrus
#

So it's not a dedicated :}

frigid ember
#

well

#

i bought a dedicated

#

they just set it up for me

#

I got it from Aquatis

#

what do u mean by what else is running

#

I disabled EVERY server except for factions to see what was causing htis

sick citrus
#

I don't see anything in Aquatis that allows you to have a dedicated machine. The most you may have is a VPS.

pale plaza
#

with a skript do i install like a normal plugin

velvet halo
#

Are you using a VPS for minecraft? >.<

frigid ember
#

no

#

they dont have dedicated on their web

#

I contacted through their discord

#

they setup a private server 4 me

#

not a vps

sick citrus
#

It's a vps.