#help-development

1 messages · Page 1502 of 1

opal sluice
#

WorldEdit

next stratus
#

So do I make the edit session with fawe and the rest with world edit?

opal sluice
#

Yup

#

Cause it's all related to the edit session

next stratus
#

I do have another question I don't know if ya could help at all

opal sluice
#

Sure

ivory sleet
#

why getPath

#

u most likely want toPath()

next stratus
#

So, I'm trying to load the schematic paste it and then loop all the blocks in the paste area to find certain block types. Any clue on the best way to do this?

opal sluice
#

A simple math loop

#

get the upper corner

#

and loop to the bottom corner

next stratus
#

Is there no optimized way apart from doing that?

opal sluice
#

Nope

#

You could make an algorithm that divide the actual selection in many parts

#

To have a O(log(n)) complexity on the best case but that's all you could really do

wanton rampart
next stratus
opal sluice
#

It doesn't do the same things.

jagged monolith
#

contains checks if something is in the list, equals checks if the list contains everything it's checked against.

opal sluice
#

Differences means that there are some things that are the same ^^'

wanton rampart
opal sluice
#

Next time, you could also check the actual java doc ^^' it's pretty much explained, or even google it ^^'

quaint mantle
#

@ivory sleet No luck, java.lang.IllegalArgumentException: The embedded resource 'plugins/nationsatwar/capturables/Nations-Config.yml' cannot be found in plugins\nationsatwar-0.0.1-SNAPSHOT-shaded.jar after changing it to toPath()

Again, I am not creating these resources in the code; I am creating these resources externally via the IDE & using maven compile package goals to include them in the jar

quaint mantle
#

im not sure what you mean by this

opal sluice
#

Cause here, it seems that it doesn't pack the actual file into the jar

quaint mantle
#

It might be doing that, but thats not a product of the pom

#

That would be based on my build goals

#

Which Idk if I am doing them right. Like I said, I am using compile package

#

Which I thought was what you need to do, but maybe not

wanton rampart
ivory sleet
#

Maklegend

quaint mantle
#

Yes

ivory sleet
#

do u have the files in the jar?

quaint mantle
#

I mean, I think so... I am using maven build goals

#

Could somone take a look at my code?

None of my recipes works now :C

#

package compile specifically

opal sluice
#

Could you check on your jar ?

quaint mantle
#

How do I check if resources are embedded in the jar?

opal sluice
#

Open the jar

#

with any unzipper

#

and you should be able to see them inside

dusty herald
#

winrar, decompiler u name it

ivory sleet
#

Maklegend what files do u have in your src/main/resources folder

quaint mantle
opal sluice
#

If they aren't there, you need to put a resource directory inside the pom so it will embed these files into the jar

quaint mantle
#

Could somone help me please? o.o

quaint mantle
quaint mantle
opal sluice
quaint mantle
#

I don't know if i have resources in my jar

opal sluice
#

Then, the path you put inside the code is wrong

quaint mantle
#

I mean, I want them in there

#

I think

opal sluice
#

...

ivory sleet
#

Maklegend u're kinda using the saveResource method erroneously

#

assuming its a resource

quaint mantle
#

I might be - I'm just doing what you originally suggested

#

The bottom line is my files are not being found for some reason, and I can't figure out why that is

ivory sleet
#

plugin.saveResource("Nations-Config.yml", false);

#

that should be enough

quaint mantle
#

its in a subdirectory

ivory sleet
#

why

quaint mantle
#

cuz

#

I just put it in there

ivory sleet
#

aight

quaint mantle
#

I mean yeah I could probably just get rid of it to make it easier

#

but this really shouldnt be this complicated

ivory sleet
#

I mean it isn't

quaint mantle
#

Can I screenshare?

ivory sleet
#

sure

quaint mantle
#

ok - should I join a channel or call

ivory sleet
#

verify urself

quaint mantle
#

uh

#

what

#

oh

#

Theres a verification channel

shadow gazelle
#

Will I have to redo my plugins for them to work on 1.17?

#

Or somewhat redo them

worldly ingot
#

that depends entirely on what your plugins are and how you wrote them

shadow gazelle
#

Well, the one I'm working on right now adds custom enchantments (1.16)

jagged monolith
shadow gazelle
#

Okay

worldly ingot
#

Generally speaking you need to update if:

  • You're using any NMS whatsoever
  • You're using reflection
shadow gazelle
#

I thought I saw some things were renamed

#

iirc I'm using reflection somewhere, I would need to look again, though

jagged monolith
#

Then you'll need to update

worldly ingot
#

Nothing is mapped at runtime, NMS classes are now properly packaged as opposed to being shoved in the same package, and any call to setAccessible() is illegal

shadow gazelle
#

Oh

slate viper
#

im trying to make it so when axolotl spawn they are always swimming (even out of water) but imma be honest i have no clue what im doing this is what i have right now but it doesnt set them to swimming

public class MobSpawnListener implements Listener
{
    @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
    public void onCreatureSpawn(EntityToggleSwimEvent event) {
        Entity entity = event.getEntity();
//        System.out.println(entity.getType());
        if (!entity.getType().equals("AXOLOTL")) return;
        if (!entity.isInWater()) {
            LivingEntity axolotl = (LivingEntity) entity;
            axolotl.setSwimming(true);
        }
    }
}
opal sluice
slate viper
#

kinda just ignore that they are out of water and move like they would in water

opal sluice
slate viper
#

fek

#

ok

opal sluice
#

Well, do the same thing you do with the actual commands, but with the : variants

hallow escarp
#

Hello everyone!
Is there any way to check if a user has placed an item from their inventory into the custom inventory and also get the slot index? I have tried using InventoryMoveItemEvent but am unable to get the slot id/index

compact haven
#

Is it possible to just say, copy MCA (region files) and change the names of the files, and effectively copy paste chunks?

compact haven
#

what's the yes and whats the no

opal sluice
#

Yes, you can copy/paste/change the name of a region file

#

no don't do that

#

Firstly, you'll not be able to do it while the server is running

#

Cause it locks the world

#

then, the world, will mostly likely be corrupted once you'll do any modification by hand

compact haven
#

well I need to say add a large island

#

here's the thing

opal sluice
compact haven
#

why not :(

#

lmao I cant add it when the servers running

#

theres no way to add a large island, it'll crash

opal sluice
#

There is a way ^^

#

Use FAWE and it's API

compact haven
#

mmm

#

this probably shouldnt be here

#

but help-server is mostly for plugins and stuff

#

this wouldnt have to be done automatically, like on command or at a specific time

#

perhaps someone has a wiki on the MCA file format?

opal sluice
#

The MCA format has changed a lot since 1.16

#

And it's a real mess

#

more than before

#

So, yeah, you can try to mess with it, but it's a risk for you to just corrupt your world and lose time tbh

compact haven
#

well then, seems I'll have to look at FAWE

somber patio
#

Does anyone know if there's been changes to the everyoneSleeping function due to the new Minecraft mechanic that (I think) lets servers skip night with only a fraction of the server sleeping?

covert bluff
#

what do i need to do so that kits.yml comes with the plugin? because when doing this, it isn't added when i implement hte .jar into the plugins folder

drowsy helm
covert bluff
#

how to i do that

proud basin
#

So I have this ```java
private void checkUpdate() {
if (this.getConfig().getBoolean("Check-Update.enable")) {
Logger logger = this.getLogger();
new UpdateChecker(this, 93152).getVersion(version -> {
if (this.getDescription().getVersion().equalsIgnoreCase(version)) {
logger.info("There is not a new update available.");
} else {
logger.info("There is a new update available.");
}
});
}
}

covert bluff
#

i invalidated/refreshed the cache last time cause every thing was broken when i reset intellij to its defaults

ivory sleet
proud basin
#

oh ok so all I gotta do is wait

quaint mantle
#

How to make, if the player does not have permission, hide the command (write as an unknown command)?

covert bluff
#

you can set its permission-message to unknown command string in plugin.yml

quaint mantle
proud basin
#

Is the /fly from essentials?

quaint mantle
#

no

#

my own plugin.

covert bluff
#

the command is automatically hidden if they don't have permission to use it

#

make a permission node for the command in plugin.yml

#

set default to false or op to true

#

and if they aren't a server operator the command should be hidden

#

you can also optionally set permission-message of command in plugin.yml to the unknown command string

long ocean
#

Did the code change for loading worlds? Or is spigot glitched after this update? My code for loading worlds in previous versions no longer works.
new WorldCreator("world_name").createWorld();

covert bluff
#

can someoen read my new commit thx

#

i want to know if thers something wrong with It

ivory sleet
#

Wrong as won’t work?

#

Or just bad code?

covert bluff
#

bad code

#

it works, just want verify if good or not

#

code criticicim

ivory sleet
#

I can write a code review tmrw

covert bluff
#

Ok

ivory sleet
#

Remember me to do that tmrw also thx (:

gloomy edge
#

Damn SpecialSource doesn't convert these fields

#

or maybe I'm dumb

ivory sleet
#

Believe it doesn’t support reflection yet

covert bluff
#

Animasi studio seperti Pixar atau Disney, menampilkan beberapa teka-teki yang berhubungan dengan film-film mereka. Bahkan ada juga loh guys, petunjuk mengenai film terbaru yang akan tayang dibeberapa tahun mendatang dan mungkin luput dari pandangan kita.

Bagi kalian yang penasaran seperti apa aja teka-teki atau petunjuk yang terlewat itu, kita...

▶ Play video
sacred vector
#

Can i change the MOTD via a command?

maiden thicket
#

letsgoo

maiden thicket
maiden thicket
#

serverlistplus

#

oh

#

ok

#

so

#

let me actually see if any methods exist to change via a cmd

sacred vector
#

i want to change the Server page MOTD

sacred vector
#

what i think i could do, is just with the command take the argument and place it where the config would be at. then reload the server

covert bluff
#

@sacred vector use serverlistpingevent

#

and its setMOTD method

sacred vector
#

Okay thank you

covert bluff
#

from online internet:

#
    @EventHandler
    public void countDown(final ServerListPingEvent event){
        if(gameHasEnded == true){ //if the game is in where it should countdown (lobby)
            this.getServer().getScheduler().scheduleAsyncRepeatingTask(this, new Runnable(){
                public void run(){
                    int countdown = 60; //count down for a minute (60 seconds)
                    if(countdown > 0){ //if the countdown isn't at 0
                        countdown--; //take one away from the countdown
                        event.setMotd("Next Game: " + countdown + " seconds"); //set the motd as the time until the countdown hits 0
                    }
                    if(countdown == 0){
                        gameHasEnded = false;
                        event.setMotd("A game is currently in session!");
                        //here you put your code to start the hunger games
                    }
                }
            }, 20, 20);
        }
#

not mine, i just searched "how to change server motd spigot" online

#

and 1 spigot thread was one of the results

proud basin
#

is there a method to teleport someone to the worldspawnpoint?

sullen marlin
#

player.teleport( world.getSpawnLocation() );

proud basin
#

I got another idea

somber hull
#

How do i build with gradle in intellij?

proud basin
#

gradle build

covert bluff
#

there are plent tutorels on online

somber hull
#

I have no idea how intellij works

#

I just downloaded it

#

nor do i know how gradle works

proud basin
#

Hyper join general 1 I will show you

somber hull
#

bet

gloomy edge
#

Is there anyway to currently fix this or do I need to compile craftbukkit and just not use mojang mappings

halcyon topaz
#

you don't need to reload the server for it

sacred vector
#
    @EventHandler
    public void onSpawn(CreatureSpawnEvent event) {
        if(getConfig().getBoolean("Zombie-Spawn-Netherite") == true){
        if (event.getEntity() instanceof Zombie) { //check if the creature that just spawned (event.getEntity()) is a Zombie
            EntityEquipment entityEquipment = event.getEntity().getEquipment(); //Obtain the entity equipment from that zombie
            entityEquipment.setChestplate(new ItemStack(Material.NETHERITE_CHESTPLATE)); //set chestplate to that entity equipment
            entityEquipment.setLeggings(new ItemStack(Material.NETHERITE_LEGGINGS)); // repeat with leggings
            entityEquipment.setBoots(new ItemStack(Material.NETHERITE_BOOTS)); // repeat with boots
            entityEquipment.setHelmet(new ItemStack(Material.NETHERITE_HELMET)); // repeat with helmet
            entityEquipment.setChestplateDropChance((float) 0);
            entityEquipment.setLeggingsDropChance((float) 0);
            entityEquipment.setHelmetDropChance((float) 0);
            entityEquipment.setBootsDropChance((float) 0);
            event.getEntity().setHealth(getConfig().getInt("Zombie-Spawn-Health"));
            event.getEntity().damage(getConfig().getInt("Zombie-Damage"));
            event.getEntity().getAttribute(Attribute.GENERIC_ATTACK_DAMAGE).setBaseValue(getConfig().getInt("Zombie-Damage"));

        }
    }}
``` Im confused
#

should the generic attack damage work??

long ocean
#

Is there a way when loading a saved world for it to get .generator() from the files without you having to hard code the generator?

#

I just want to supply the string "world name" and have it load.

proud basin
#

Wasn't there pinned messages in this channel?

jagged monolith
#

About what?

dusky hornet
#

Is there a github link to post a bug for End Islands for 1.17?

edit: Jira bug posted

sage swift
#

now if only you were on a current version

wispy fossil
#

the worst thing about working with devs in Europe is their spelling

gloomy edge
#

Can I share a piece of Mojang Mapped code on the SpigotMC forum or do I need to remap it?

#

It's just a class

cinder thistle
#

British English is the superior language

wispy fossil
cinder thistle
#

Now, the slang

#

Don’t get me started

#

Also, ‘T’ basically isn’t a letter in a British accent

#

*bri’ish

halcyon topaz
#

is it just me or

#

is changing player attack speed broken

#

every time I change it to any other value than default, it resets

lilac dagger
#

colour, honour, flavour etc

sage swift
#
Player targetPlayer = args.length > 0 ? Bukkit.getPlayer(args[0]) : sender instanceof Player ? (Player) sender : null;``` mmm
wispy fossil
sage swift
#

i thought you were BatshtBrazil

random ledge
#

How to get NBTTagList from NBTTAGcompound?

#
This is how i store NBTTagList to NBT Items
NBTTagCompound comp = it.getTag();
NBTTagList l = new NBTTagList();
NBTTagCompound v = new NBTTagCompound();
v.set("Skill1:", NBTTagString.a("0"));
v.set("Skill2:", NBTTagString.a("1"));
l.add(v);
        
comp.set("XSPetsSkill", l);
it.setTag(comp);

---------------------------------------------
I am trying to get NBTTagList but its send me []

NBTTagCompound tag = it_checker.getTag();
NBTTagList List = tag.getList("XSPetsSkill", 9);
p.sendMessage("XSPetsSkill: " + List);
sage swift
#

why are you using nbt directly

random ledge
#

I've been looking at various forums. They recommend using it like this.

sage swift
#

whoever various forums is, he's wrong

wispy fossil
sage swift
#

do you are want to is kiss?

wispy fossil
#

muwah

sage swift
wispy fossil
#

that's me

sage swift
#

i know

wispy fossil
#

how

sage swift
#

behind u

wispy fossil
#

WHAT

sage swift
#

heyy

wispy fossil
#

get out of my house

main tangle
#

how can i do crafting like crafting enchanted stuff hypixel skyblock

sour sand
#

i am tring to make a readme generate but it is giving me an error. the code i am using is saveResource(getDataFolder().toString() + "README.txt", true); anyone know how to fix it

sage swift
#

well you are trying to get the resource "pluginNameREADME.txt", not "pluginName/README.txt"

sour sand
#

o ok thanks

quiet ice
#

Also, why getDataFolder().toString()?

sour sand
#

because it takes in a string

quiet ice
#

This is a major red flag to me

sage swift
#

why not Integer.parseInt(getDataFolder())???

quiet ice
#

no, but if saved you will have a dir structure like
plugins
pluginName
pluginName
README.md

sour sand
#

i am trying to save it in the save place as the config folder

quiet ice
#

So just do saveResource("README.txt", true);

sour sand
#

o ok thanks

quiet ice
#

Also, it will overwrite the previous file if present

lone vector
#

Hello, i can't find NMS 1.17
import net.minecraft.server.v1_17_R1.Packet

gave me Cannot resolve symbol 'v1_17_R1

quiet ice
#

it does not exist

#

Spigot appears to now use Mojmap (please correct me if I am wrong, thx)

ornate quail
#

Nms isn’t versioned in the spigot 1.17 jar

#

From what I’ve been seeing/hearing

main tangle
#

how can we use packets then_

sullen marlin
#

use your ide to figure out the new import

#

any decent ide is going to suggest an import for you

ornate quail
#

Oh he is sourcing the jar, for some reason I thought he was doing it via reflection 🤦‍♂️

lone vector
#
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);

playerConnection not found, what should i use?

sage swift
#

not directly, no

turbid grove
#

@grave mason i guess not

sage swift
#

a packet sent in during play to steer a vehicle

untold kernel
#

i want to know how to get the location of an attack done by a player on an entity, Before the entity takes knockback

#

in protocol lib

sullen marlin
#

Use your ide to figure it out

#

The field names have changed

#

Look at the types of the fields available

tardy delta
#

why does this not work?

p.getInventory().addItem(new ItemStack(Material.APPLE, 16));
            p.getInventory().addItem(new ItemStack(Material.WOODEN_AXE));
sullen marlin
#

looks fine to me

tardy delta
#

it gives nothing to the player :/

jagged monolith
#

Does the player have room in their inventory?

tardy delta
#

yes

sullen marlin
#

where are you calling the code

tardy delta
#

@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {

sullen marlin
#

should work

jagged monolith
#

Did you register the event in the onEnable?

quaint mantle
#

How to use PacketPlayOutScoreboardTeam in 1.17?

It doesn't works:

Constructor<?> constructor =
                    Class.forName("net.minecraft.network.protocol.game.PacketPlayOutScoreboardTeam")
                    .getDeclaredConstructor(String.class, int.class, Optional.class, Collection.class);
            constructor.setAccessible(true);
            Object object = constructor.newInstance("test", 0, Optional.empty(), Lists.newArrayList(p.getName()));
            Packet<?> packet = (Packet<?>) object;
sullen marlin
#

why the f*ck do you need packets

chrome beacon
#

It's b

sullen marlin
#

did you even read the 1.17 release notes

tardy delta
#

yes everything whats there works except for that

sullen marlin
#

It pains us to say this every time, but NMS is not API. When you are trying to figure out how to do something, the first move should never be packets or NMS. Bafflingly almost daily we see people bypassing the API to do simple things such as Scoreboards, BossBars, or Particles. There is no reason to do this. Ever. Fully-featured APIs for these things have existed since Mojang added them.

quaint mantle
chrome beacon
#

Change playerConnection to b

sullen marlin
#

code works for me, idk why I even bothered testing

jagged monolith
sullen marlin
#

no you dont

#

I'm not helping you use packets for scoreboards and no one here is either

#

this has to stop

grave mason
quaint mantle
chrome beacon
sullen marlin
#

learn to use your ide bro, it will tell you these things. ctrl+space (or similar) to bring up autocomplete, look for the type you want

quaint mantle
#

without using packet reader?

sullen marlin
grave mason
#

sorry i found it yes

sullen marlin
#

search the javadocs for scoreboard and team

grave mason
jagged monolith
grave mason
#

thanks

quaint mantle
quiet ice
#

don't use commands to create scoreboards, this is the exact definition of what not to do

quaint mantle
#

i'll try scoreboard + team

grave mason
chrome beacon
#

Full error

#

But I'm going to guess

#

You're not using Java 16

grave mason
jagged monolith
grave mason
#

i think my pom.xml still use 8

chrome beacon
#

Then get that fixed

jagged monolith
somber patio
#

Hi, what's the intended behaviour of players which have setSleepingIgnored(true)? I'm not quite sure from the docs. Is it intended to be that if the developer wants a player to not be counted towards the sleeping counter (regardless of whether the player is active or not) they should set setSleepingIgnored(true)? If so, I think the 1.17 update is broken in that it doesn't let you go to sleep if the only player on the server has setSleepingIgnored(true).

halcyon topaz
#

ye 1.17 acting up

jagged monolith
sullen marlin
#

1.17 changed sleeping code, suggest you open a bug report

#

but also not sure how sleeping ignored with only 1 player world work

somber patio
#

/version says "You are running the latest version"

novel lodge
#

How can I reduce a tools durability?

sullen marlin
#

sleeping will only advance if > 1 player required to sleep is actually sleeping

halcyon topaz
jagged monolith
sullen marlin
#

I feel like that's kind of sensible behaviour, though no idea if its different from 1.16.5

somber patio
#

I think if all players have setSleepingIgnored(true) then they can't sleep, regardless of how many are actually in beds.

#

Is that how it's supposed to be?

#

(I haven't actually tested that, that's just from looking at the code)

novel lodge
sullen marlin
#

it doesnt look like that espect is different from 1.16.5

jagged monolith
sullen marlin
#

hmm or maybe it is I hate booleans

#

!(entityplayer.isSpectator() || (entityplayer.fauxSleeping && !entityplayer.isSleeping())) what does that simplify to

#

does anyone have a boolean simplifier lol

halcyon topaz
#
damager.getAttribute(Attribute.GENERIC_ATTACK_SPEED).setBaseValue(1024.0);
``` for some reason this doesn't work for me :/ atk spd always reset to 4.0 after the first hit
obtuse basin
#

Is there an event for interacting with Blocks?

halcyon topaz
#

PlayerInteractEvent

obtuse basin
#

thx

somber patio
#

I think you might also need to track if any players are sleeping, since if you just count active players and players that are "sleeping" (whether it be real sleep or faux sleep) then when you have all players faux sleeping you constantly trigger the "set it to daytime" code

sullen marlin
#

I'm too tired to be sure about this now, suggest you open a bug report and/or pull request

grave mason
halcyon topaz
#

Update spigot

grave mason
#

i have

halcyon topaz
#

and see if it happens again ig

#

Latest is 3133

grave mason
#

I got that one

#

but its when i drive an vehicle

#

then thats happens

halcyon topaz
#

It says you're on 3132

#

lemme see if i get the same issue tho

grave mason
#

do you want i send my plugin to you?

halcyon topaz
#

sure

grave mason
#

fr

untold kernel
#

how do i get the location of the entity being hit in protocol lib?

north osprey
#

How to use special-source maven plugin? It cannot find an artifact for some reason

quaint mantle
#

/scoreboard and /team commands are broken after creating scoreboard + team by spigot

#

what the f*ck, md_5?

halcyon topaz
#

it sounds like you

#

need a snickers bar

#

because you're not you when you're hungry

covert bluff
#

hey

halcyon topaz
#

hi

untold kernel
#

yes you are md_5 when you are hungry it seems

covert bluff
#

@quaint mantlei like classroom of the elite too

halcyon topaz
#

I watched the first 2 ep

#

worth continuing?

covert bluff
#

yup

#

don't get too attached to it though, i'll warn you, there's a huge plot twist at the end

#

and depending on what type of person you are, it might be disappointing

#

and potentially make you dislike the entire anime

halcyon topaz
#

ah I see, that's got me interested then

novel lodge
#

How am I able to add a custom smithing recipe?

sullen marlin
#

Bukkit.addRecipe(new SmithingRecipe

covert bluff
#

is vim can be used the spigot plugin for it?

wide aspen
#
BukkitScheduler scheduler = getServer().getScheduler();
        scheduler.scheduleSyncRepeatingTask(this, new Runnable() {
            @Override
            public void run() {
                //get Player locations
            }
        }, 0L, 1L);

Oh yeah It's just copied but what do you mean by never accessing the Bukkit API? does it mean that I can't get player locations and stuff?

#

because I am making something that needs to check if someone entered a specific location

wraith rapids
#

that is synchronous

#

you can access the bukkit api in there just fine

covert bluff
#
new BukkitRunnable() {
  @Override
  public void run() {
    
  }
}.runTaskTimer(long plugin, long delay, long period)

whats the difference of this

#

from that

wraith rapids
#

nothing

covert bluff
#

so it's just

#

doing the same thing

#

but in different ways

wraith rapids
#

it's the asynchronous tasks where you don't want to access certain parts of the api

covert bluff
#

so it doesn't matter which one i choose from those two?

chrome cape
#

how the plugin can be used from 1.8 - 1.17

wraith rapids
#

the biggest difference is that getScheduler() accepts a lambda, while new BukkitRunnable always requires an anonymous class

#

so the former is preferred unless you need a BukkitRunnable

#

which are only generally needed if the task needs to cancel itself at some point

covert bluff
#

have you ever used vim before to program

wraith rapids
#

no, i'm not gay

covert bluff
#

what do you mean by that

past maple
#

personally, I hate vim

covert bluff
#

i'm looking for like an astro-like theme for intellij

#

can't seem to find any

#

like one of those command line-type things

#

like a terminal

unreal sandal
#

Hello, how can I have the file config.yml of another plugin ?

novel lodge
#

How can I change an ItemStack to a RecipeChoice?

wraith rapids
#

you don't

#

an itemstack is an itemstack

#

a recipechoice is a recipechoice

#

you can't change one into the other

#

however, you can create a new recipechoice based on an itemstack

#

see the constructors in the javadocs

unreal sandal
#

Sorry but can I get the config.yml of another plugin ?

novel lodge
#

So does RecipeChioce#test(itemStack) base the recipeChoice on the itemStack?

wraith rapids
#

no.

#

RecipeChoice::test uses an existing recipechoice to test an itemstack

#

you want a new recipechoice

#

recipechoice itself is abstract and cannot be instantiated

#

but the api provides two concrete subclasses that extend it

#

take the one you need and call the appropriate constructor

covert bluff
#

wait you can use :: in java like in C?

wraith rapids
#

sort of

#

:: stands for a method reference

covert bluff
#

ye

wraith rapids
#

it can be used in place of a lambda when the method contract fits the context exactly

#

f.e if you have a void method, you could either do

class MyRunnable implements Runnable { @Override public void run() { myVoidMethod(); }}
runTaskLater(plugin, new MyRunnable());
runTaskLater(plugin, new Runnable(){ @Override public void run() { myVoidMethod(); }})
runTaskLater(plugin, () -> { myVoidMethod(); })
runTaskLater(plugin, () -> myVoidMethod())
runTaskLater(plugin, this::myVoidMethod)
opal juniper
#

{"character_count":3329,"character_limit":500000}

i have this reponse from an api.

    gsonInstance.fromJson(content, CharInfo.class);

    class CharInfo {
        int usedChars;
        int totalAllowed;
    }

im trying to do this ^^ But it doesn't work. what should i be doing instead?

#

I assume it is a different data type or something?

sullen marlin
#

You need to name your variables same as the json

opal juniper
#

ohhhhh yeah ><

sullen marlin
#

Or else theres some annotation somewhere you can use

wraith rapids
#

you can also register class specific serializers with gson

opal juniper
#

ok - so a while back i accidentally posted an api key in a github project. don't ask how. is there a way to actually remove it?

#

cause you could just go thru the commit history and get it

wraith rapids
#

invalidate the api key

opal juniper
#

oh yeah - lemme try

wraith rapids
#

even if you manage to delete it by for example deleting the whole repository, someone could have saved it already

opal juniper
#

true

#

thanks

#

i just completely overlooked that ><#

wraith rapids
#

same thing as if you lose your keys

#

even if you do have a spare key, you still need to change the locks

#

because now there's a key going around and you don't know who might still have it

opal juniper
#

its a private repo but i was considering just making it public instead of deleting + re creating

opal juniper
#

lmao

daring maple
#

Was also like 60 commits deep with a group project

opal juniper
#

thats the same for me

daring maple
#

But we had to make our repo public because the teachers wanted the github insights

opal juniper
#

wtf - that seems so random

#

why do they care?

daring maple
#

Yeah, it was for a school project. And they wanted to see who did the most work I guess

opal juniper
#

ohhh i see - commit history

#

yeah that makes sense i guess

daring maple
#

Although github insights is not really a fair way to compare work done, but sure

opal juniper
#

anyone know an intellij plugin that makes editing code like google docs

#

so you can collab with people

daring maple
#

Dont they just have this liveshare function?

opal juniper
opal juniper
eternal oxide
#

CodeTogether on Eclipse. No idea if its on InteliJ though

lusty cipher
daring maple
#

So even tho they still put in the same hours, the github insights will tell that I did triple the work

opal juniper
#

Yep

#

i mean - not bad for u ig

daring maple
#

That's true, but its still a team effort. And I wouldn't want to bring my team average down, just because they commited les code than me

opal juniper
#

Intellij has code with me but it relies more on one person being on at the same time

#

looks ok tho

daring maple
opal juniper
#

Yeah - what i kinda wanted is that there was a service that hosted ur code or something. then ur ide would just hook into the server and send ur code up as u type and then down to all other 'consumers'

#

If anyone here knows how to do it. please make it

wraith rapids
#

just hit the commit button every 50 milliseconds

daring maple
#

lmao

tardy delta
#

is there some way to get an uuid out of an GameProfile?

opal juniper
#

most likely

ivory sleet
#

There is

#

I think

tardy delta
#

something with gameprofile.getProperties()

#

i think its just gameprofile.getId()

ivory garnet
#

hi, how can i give an perimission (exemple.use) in one lign of code

maiden thicket
#

if it's luckperms highkey use their api

#

if u wanna do it manually with only spigot api you'd be using permissionattachments i believe

ivory garnet
maiden thicket
#

you can use Player#addAttachment to get a PermissionAttachment object

#

and from there you can use PermissionAttachment#setPermission(String name, boolean value)

eternal oxide
#

player.addAttachment(plugin, "example.use", true);

maiden thicket
#

to set a permission

#

did not know that works

#

lmao

quaint mantle
#

Does somone know, if it is possible to mak e a nightvision helmet?

ivory garnet
#

@maiden thicket @eternal oxide thanks you

maiden thicket
#

i don't know if it's possible to create a helmet with nightvision but you can give and remove nightvision from the player when the equip and unequip the helmet

quaint mantle
#

If I got a list of 7 things for example, how can I make it randomly select only 3 of them?

quaint mantle
maiden thicket
#

it'd be like

ivory garnet
wraith rapids
#

that may return the same element several times

quaint mantle
#

And does somone know the id of green leather chestplate?

eternal oxide
maiden thicket
#

u'd have to do a while loop to make sure it doesn't or you can create a copy of the array and remove the items @wraith rapids i think ?

#

i think that's how u do it

#

i usually do a while loop cus im weird lol

wraith rapids
#

there is an efficient way of doing it but I don't remember it off the top of my head

#

i think you would start at index 0, pick a random element between 0 and arr.length, and swap

#

then repeat for index 1 and 1-arr.length

#

and so on

quaint mantle
#

@maiden thicket o.o Do you know the item id of green leather chestplate?

ANd how to make this with a nightvision helmet? xd

maiden thicket
#
List<Integer> ints = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9);
List<Integer> ints2 = ints;
for (int i = 0; i < 3; i++)
{
  int index = ThreadLocalRandom.current().nextInt(ints2.size());
  int item = ints2.remove(index);
}```
#

i think

#

that's how u'd do it

#

lol

wraith rapids
#

that is inefficient

maiden thicket
wraith rapids
#

as you have to shift the entire array for each remove operation

maiden thicket
#

oh

#

then

#

what if you did it backwards

#

oops

#

nope

#

that's not

#

lol im not thinking uh

eternal oxide
#

are you just trying to randomize the list?

past maple
ivory garnet
maiden thicket
#

and then just check if the i think... new armor piece?

#

equals ur helmet

eternal oxide
maiden thicket
#

new armor = equipping
Old armor = unequipping

#

just check if new is helmet and if so apply night vision

#

if old is helmet then remove night vision

maiden thicket
quaint mantle
#

I will try it!! Thank u!!

I have problems with change the color of my leather chestplate xd

ivory garnet
quaint mantle
past maple
#

cast to LeatherArmorMeta

maiden thicket
maiden thicket
ivory garnet
ivory garnet
eternal oxide
#

no

#

Do you understand what an instance in Java is?

ivory garnet
#

no X)

eternal oxide
#

ok

maiden thicket
#

sadge

maiden thicket
ivory garnet
maiden thicket
#

this gonna be muy dificil if u dont know java xd

ivory garnet
#

yes x)

eternal oxide
#

Everything is Java is designed around objects. Every object is an instance. When your plugin is loaded by Spigot it creates an instance of your main class. If you are in your main class code you can refer to that instance using the keyword this

onyx fjord
#

any idea how to stop this regex
(&l.*)(?=\\\")
after " or &?

#

not just "

eternal oxide
#

If you are in another class you have to pass an instance of yoru main plugin class to it, which is called Dependency Injection

maiden thicket
#

i hate regexes but that website makes it easier

onyx fjord
#

i tried

maiden thicket
#

f

onyx fjord
#

too dumb for it sorry

maiden thicket
#

felt that

ivory garnet
maiden thicket
#

sadge

#

whats the name of ur main class

#

there is a static method in JavaPlugin where u can just do

#

ClassName.getPlugin(ClassName.class);

#

i dont usually do that

#

like ever

#

xd

eternal oxide
onyx fjord
#

so you can see minecraft colors in the editor itself 🙂

eternal oxide
#

By default your Listener will not have a constructor.

maiden thicket
#

there is a regex i believe you can use to find colors

#

it's in the ChatColor class

#
    private static final Pattern STRIP_COLOR_PATTERN = Pattern.compile("(?i)" + String.valueOf('§') + "[0-9A-FK-ORX]");```
#

this thing

eternal oxide
#

to pass an instance to your Listener instead of using new YourListener() you use new YourListener(this), and add a constructor to your listener class.

onyx fjord
#

basically what it does is it changes &6 for example to gold

quaint mantle
#

Does somone know how to add something to library?

gusty bough
#

Can we put a tabcompleter on other things than commands?

#

I want a tabCompleter of all my connected players when someone write a "@"

ivory sleet
#

Not possible server side

gusty bough
#

😢

#

But minecraft is using a tabCompleter for players without a slash required

#

Can't we reproduce it?

maiden thicket
#

packets probably

#

that's mc

#

client

#

i believe

jagged monolith
#

Yeah, they would be using Packets to do it most likely.

gusty bough
#

ok I will look at it, thanks.

maiden thicket
#

i do not see any tab complete packets in 1.17 must be blind

#

or my cache is f'd

quaint mantle
#

Does somone know how to set an item lore? xd

maiden thicket
#

item meta

jagged monolith
#

ItemMeta

quaint mantle
#

When i do this like that:

    meta1.setLore("Unbreakable"); it is red o.o
jagged monolith
#

Code?

next stratus
#

i swear fawe is one of the best things client side but worse things coding wise. I just can't work out how on earth you're supposed to just load and paste a schematic then scan the pasted region

past maple
quaint mantle
jagged monolith
next stratus
quaint mantle
#

I don`t understand that :C

eternal oxide
#

meta1.setLore(Arrays.asList("line1", "line2"));

jagged monolith
quaint mantle
#

Tysm!!

manic furnace
#

Hey Guys! I need help. I want to copy the world folder. In the Mc 1.16 it worked with FileUtils but i updated to Java 16 and MC 1.17 and don't work anymore.

lusty cipher
#

java File API might have changed from Java 8 to Java 16 slightly

ivory sleet
#

Just use Path and Files?

ivory garnet
eternal oxide
ivory garnet
#

ok so what i do ?

eternal oxide
#

what line do you create your Listener instance?

ivory garnet
#

what are "line" ?

#

the package ?

visual tide
#

how do i create a 1.8 plugin in intellij? the thing only goes down to 1.12

eternal oxide
#

what is the line of code you use to create your listener instance?

ivory garnet
#

line 16

eternal oxide
#

show the line here

past maple
#

show your code

ivory garnet
#

getServer().getPluginManager().registerEvents(new realitemlisteners(), this);

manic furnace
eternal oxide
#

change that to getServer().getPluginManager().registerEvents(new realitemlisteners(this), this);

#

it will then underline in red

#

hover over it and one of the options in there will be to add a constructor to your listener

ivory garnet
#

i have create the constructor and what i do ?

eternal oxide
#

now you create a Field in your listener class, above your constructor

#

show the constructor it added.

ivory garnet
#

public class realitemlisteners implements Listener {

public realitemlisteners(mainrealitem mainrealitem) {
    // TODO Auto-generated constructor stub
}
eternal oxide
#

above that constructor add mainrealitem plugin;

ivory garnet
#

why ?

eternal oxide
#

then replace the TODO with this.plugin = mainrealitem;

#

You are creating a reference to your plugin instance so it can be used in yoru listener

ivory garnet
#

the second "plugin" are in red

#

i create a "field" ?

eternal oxide
#

second plugin?

#

yes you create a field. I already told you to do that

ivory garnet
eternal oxide
#

now if you have done all as I say your permission code should be working

ivory garnet
#

it works ! very very thank you 👍

eternal oxide
#

np

ivory garnet
#

what will say "np" ?

#

i am bad in english

eternal oxide
#

no problem

ivory garnet
#

ok

bright briar
#

Hello!

anyone facing that the server crashes whenever using a command from plugin in 1.17 spigot?

daring maple
#

Is it like any command, or a specific command?

eternal oxide
#

?paste the console error

undone axleBOT
bright briar
#

1sec

eternal oxide
#

if its an index out of bounds error, run BuildTools again. You have a broken build of Spigot

bright briar
eternal oxide
#

java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0

bright briar
#

run buildtools

#

okay thanks bosss!!

ivory garnet
#

how can i execute an command as an player if the player are not op

jagged monolith
#

Give them permission to the command.

ivory garnet
#

no, i wouldn't give the command to an player (its a /function)

next stratus
chrome beacon
chrome beacon
ivory garnet
#

no ! i have an idea but thank you

next stratus
#

@chrome beacon I can't even get it to work in the code, it doesn't know how to work together.

next stratus
#

Like, I can't work out how to do the clipboard things and the session builders at all.

#

There's a lack of documentation and such on how to do these things using FAWE so it makes it harder for everyone.

chrome beacon
#

You use the normal WE docs

ivory garnet
#

how can i execute a command with a concole (in one line of code)

chrome beacon
#

And they have their discord for help

next stratus
#

I mean, FAWE needs certain world things right?

chrome beacon
#

?

chrome beacon
next stratus
#

they say about doing the Clipboard things, but they give like 3 lines on it that's all.

ivory garnet
chrome beacon
#

Read the Javadocs ;/

#

?jd

chrome beacon
next stratus
chrome beacon
next stratus
#

They make no mention of it in the docs nor where to get that from. They need to rework the docs I think.

opal sluice
#

Here is my own utils for pasting schematics

#

It's WorldEdit bound though, change the editsession to a fawe one

chrome beacon
next stratus
#

How did you find how to do that? There's so little docs.

#

It's not just me being dumb, it is hard to find these things right?

opal sluice
#

I looked at the WorldEdit doc ^^'

chrome beacon
chrome beacon
daring maple
opal sluice
#

They also have a discord

next stratus
opal sluice
#

That's for WE6

#

You just need to update it to WE7

#

That's why I sent the doc

chrome beacon
wispy plume
#

Wait how did you add an integer to an integer list in bukkit yaml api? xDD

ivory garnet
#

how can i do a reference of the console in a command sender

jagged monolith
#

ConsoleCommandSender

ivory garnet
#

@jagged monolith i must create a field ?

jagged monolith
#

Are you wanting to check if the commandsender is console?

wispy plume
#

if (sender instanceof ConsoleCommandSender) { to check if sender is console

Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "cmd"); to run command as console

ivory garnet
wispy plume
#

Then

Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "say Hello world!");
wispy plume
#

Do I get the integer list, add the new integer and set it?

next stratus
tardy delta
#

what does player.updateInventory does?

obtuse basin
#

Is there a way debugging Plugin events also anything what a plugin does?

willow dew
#

So, inside the BlockBreakEvent, Im just doing some checks to see whether the mined block is COAL_ORE or IRON_ORE, and everything works perfectly fine, until I mine a "Deepslate" ore. Then my entire server will freeze and crash. "OutOfMemoryError"

chrome beacon
#

Yeah your server ran out of RAM

#

Give it some more

obtuse basin
undone axleBOT
willow dew
willow dew
obtuse basin
sour rampart
#

Does spigot still support Java 8-15?

obtuse basin
chrome beacon
#

^^

sour rampart
#

oof

#

I can't get eclipse to update to Java 16

obtuse basin
#

The Change is bad tho bc u got to rewrite the plugins u use

eternal oxide
#

you have to update, then install a patch @sour rampart

tardy delta
chrome beacon
willow dew
#

There's more in this class, it's just the same repeating for diff ores

quaint mantle
#

Does anyone know how to support multiple minecraft releases? You can just create a zip file with your plugin built for different versions, but how can I make my plugin choose which versions to use?

eternal oxide
sour rampart
#

Can someone help me update my eclipse to Java 16?

chrome beacon
willow dew
#

if you get what I mean

strong tiger
eternal oxide
#

list.poll doesn;t remove

foggy igloo
#

Is that only happens in me?

eternal oxide
#

oh it does

#

I was thinking peek

quaint mantle
chrome beacon
eternal oxide
#

However, it will never end as you are gettign relative and you get teh original block to readd

strong tiger
willow dew
#

Is there a way I can "make it end", and still have it work ElgarL?

eternal oxide
#

yes, you need to check if its in the Set before you add it to the todo

#

if its already in the Set you don;t add it to the todo

foggy igloo
#

I am using events which extends BlockEvent

chrome beacon
#

Is it a custom event

willow dew
# eternal oxide if its already in the Set you don;t add it to the todo

So like this?

private void getConBlocks(final Block block, final Set<Block> results, final List<Block> todo) {
        for (final BlockFace f : blockFaces) {
            final Block b = block.getRelative(f);
            if (b.getType() == block.getType()) {
                if (!results.contains(b)) { // added this
                    if (results.add(b)) {
                        todo.add(b);
                    }
                }
            }
        }
    }```
foggy igloo
#

no

chrome beacon
#

?paste code

undone axleBOT
foggy igloo
willow dew
chrome beacon
foggy igloo
#

ok

eternal oxide
willow dew
#

It just crashed my entire server still 😬 , do you think it could be a spigot bug?

eternal oxide
#

no

#

show me your current getConBlocks again

half breach
#

Is anyone getting an error similar to ```
Couldn't load chunk [-32, 23]
java.lang.ArrayIndexOutOfBoundsException: Index 16 out of bounds for length 16

#

Trying to narrow down a stacktrace I've been getting

willow dew
#
  private void getConBlocks(final Block block, final Set<Block> results, final List<Block> todo) {
        for (final BlockFace f : blockFaces) {
            final Block b = block.getRelative(f);
            if (b.getType() == block.getType()) {
                if (!results.contains(b)) {
                    if (results.add(b)) {
                        todo.add(b);
                    }
                }
            }
        }
    }

    private Set<Block> getConnectedBlocks(Block block) {
        final Set<Block> set = new HashSet<>();
        final LinkedList<Block> list = new LinkedList<>();

        list.add(block);

        while ((block = list.poll()) != null) {
            getConBlocks(block, set, list);
        }
        return set;
    }```
ivory sleet
#

Show code (:

chrome beacon
undone axleBOT
half breach
chrome beacon
#

Already wdym

half breach
#

As in is there a second one? I just built this 1.17 jar this friday

chrome beacon
#

Run /version and find out

eternal oxide
half breach
#

ah yeah it is

#

K i'll build the new one and see if this error is gone

willow dew
eternal oxide
#

so the error now is in yoru notifications then?

willow dew
#

Well, if you are toggled "off" (not inside the list), you won't get any errors/crashes if you mine deepslate. But if it's on, and your UUID is inside the list, it crashes

eternal oxide
#

your talking about your veinMap?

willow dew
#

No, so. I've got a HashSet<UUID> notifications;

Ifyou do /notifications, your UUID will be put inside that map. If someone breaks a block and is INSIDE the HashSet, they will be sent a message saying "Hey, player X broke a coal ore"

#

if you get what I mean

eternal oxide
#

then your error is in that code, not the breaking/counting

willow dew
#

But how would that affect anything? Because it's only checking for a UUID, and the only difference with toggling on/off is basically getting sent a message or not

eternal oxide
#

you are crashing because you ran out of memory, that means somewhere you are looping infinitely.

willow dew
#

Mhmmm

#

alright one sec

#

This is how I send messages

if (block.getType().equals(materials.get(0))) { //coal
         
 if (veinMap.get(minerUUID) != block.getType()) {
      veinMap.put(minerUUID, block.getType());
      plugin.getNotificationToggle()
      .stream()
      .filter(uuid -> Bukkit.getPlayer(uuid) != null)
                            .forEach(uuid -> Objects.requireNonNull(Bukkit.getPlayer(uuid)).sendMessage(ColorUtil.colorize(player.sendMessage("mined a total of " getConnectedBlocks(block); 
                
            }```
foggy igloo
eternal oxide
#

Why are you doing all that stream/filter?

willow dew
#

Making sure there's no nulls

eternal oxide
#

you are calling Bukkit.getPlayer twice for every entry

chrome beacon
willow dew
chrome beacon
#

And that you're running the latest version of your code

foggy igloo
chrome beacon
#

That's not a yes

#

You have a lot of listeners

eternal oxide
chrome beacon
foggy igloo
#

InGameListener

foggy igloo
ivory sleet
#

Yarin you do know stream has a Map function

eternal oxide
#

I'm going to assume you keep showing me pseudo code and not the code you are actually using as it keeps changing a LOT

ivory sleet
#

plugin.getNotificationToggle().stream().map(Bukkit::getPlayer).filter(Objects::nonNull).forEach(player -> {...});

eternal oxide
#

In the code you are showing me your code only ever runs for COAL_ORE

foggy igloo
stone sinew
ornate heart
#

How would I simulate block breaking? Meaning, the block is cracking and taking damage without me actually mining it.

ornate heart
#

Gotchu. Thank you

willow dew
eternal oxide
#

at this point (from what I've seen) your code is now fine. If its still crashing its due to something in XMaterial in relation to that block. I'd guess its matching on everything

#

You could put a debug in your block fetching code to simply print the total in yoru set everytime a block is added

#

You will then see if its going forever

willow dew
#

Alright ill try tjat, thanks

dire marsh
#

what's the best way to go about teleporting entities with passengers?

last sleet
#

I'm trying to set a PDC but when i do a check just after it returns false in console. I did it for other items, but this one doesnt seem to work. Any tips?

eternal oxide
last sleet
#

I did

grave mason
last sleet
#

This is the whole code if you're interested

undone axleBOT
grave mason
eternal oxide
last sleet
eternal oxide
last sleet
#

wdym be that?

#

Setting an ItemMeta = item.getitemmeta?

onyx fjord
#

any idea how to stop this regex
(&l.*)(?=\\\")
after " or &?
not just "

eternal oxide
#

You are currently getting two different copies of your meta and overwriting your PDC

last sleet
#

So I put the ItemMeta playerbow_meta = playerbow.getItemMeta(); before the PDC

eternal oxide
#

yes, and get the PDC from the playerbow_meta

grave mason
#

that can not be the problem

last sleet
#

Ok thanks

eternal oxide
chrome beacon
#

Also make sure you're up to date

eternal oxide
#

The first time you generated your world on 1.17 you had an error in your console, which you ignored.

grave mason
#

i downloaded it from here

eternal night
#

👀

#

oh no

#

?bt

undone axleBOT
eternal night
#

please do not download spigot

quiet ice
#

nononono

outer crane
#

downloading is illegal :weewoo:

quiet ice
#

Not these sites

grave mason
#

whut wdym?

outer crane
#

spigot jars contain mojang code

eternal night
#

pages that provide spigot downloads are breaking the law and might, especially rn, be outdated

dusk flicker
#

for more info on it you can read this wiki

#

?dmca

undone axleBOT
eternal oxide
quiet ice
#

Plus spigot is in the gray area of laws either way by continuing software that got DMCA'd

grave mason
#

okay

#

this one good?

eternal oxide
#

?bt

undone axleBOT
eternal oxide
#

put in 1.17

gaunt hatch
#

World Edit is not dead right?

teal flower
#

How to find out with whether the player is eligible (From the BungeeCord server)? Plugin for LuckPerms perms (The server and BungeeCord are connected to the database)

quaint mantle
grave mason
#

the crash

#

on the lasted version

eternal oxide
#

Did you delete your world?

grave mason
#

YeS

#

Reinstalled the hole server

#

i never had this problem on 1.16 or lower

eternal oxide
#

?paste your full startup log (latest.log)

undone axleBOT
grave mason
#

i ride in my car for like 30 seconds

#

and then crash

#

there you go

eternal oxide
#

remove MTVehicles, its clearly broken

grave mason
#

its my own plugin lol

eternal oxide
#

does it use nms?

grave mason
#

for items

eternal oxide
#

have you built it against 1.17?

grave mason
#

?

#

on 1.16 i dont get that problem

eternal oxide
#

1.17 is different

grave mason
#

Yes

#

i think its bug of 1.17

#

and not the plugin

eternal oxide
#

Quite possibly

#

There was a near identical error yesterday on worldgen, which is why we went over a new jar and new world.

willow dew
# eternal oxide 1.17 is different

So, if (results.add(b)) { is the "issue" here. if I mine a 4vein of emerald it works, and sends 4 "false" messages, but as soon as I mine deepslate ores it spams the console with "FALSE"

visual tide
#

maven is giving me this warning when building, does anyone know how i can fix this?
this wasnt happening before and i didnt change any important code, just turned my random souts into logger.infos

present in two or more JARs. When this happens, only one
single version of the class is copied to the uber jar.
 Usually this is not harmful and you can skip these warnings,
Usually this is not harmful and you can skip these warnings,
otherwise try to manually exclude artifacts based on
mvn dependency:tree -Ddetail=true and the above output.
See http://maven.apache.org/plugins/maven-shade-plugin/```
eternal oxide
willow dew
#

Mhm, alright

eternal oxide
grave mason
#

its problem in 1.17 jar thats it

eternal oxide
eternal oxide
grave mason
#

I can't believe it's the plugin

#

because it just works at 1.16

#

only other imports

#

and if there was an error there it would say that it is in the plugin

eternal oxide
visual tide
eternal oxide
visual tide
#

k

eternal oxide
#

awc

#

sec

gaunt hatch
#

anyone know where the entityList for a world moved to?

eternal oxide
gaunt hatch
#

used to be

WorldServer handle = ((CraftWorld) this.world).getHandle();

handle.entityList.clear();
visual tide
#

hmm

quiet ice
#

You need to enable the snapshot repo, let me get an example for ya

visual tide
gaunt hatch
#

oh this.world has it, i will try that

quiet ice
#
    <pluginRepositories>
        <pluginRepository>
            <id>apache-snapshots</id>
            <url>https://repository.apache.org/content/repositories/snapshots/</url>
        </pluginRepository>
    </pluginRepositories>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.3.0-SNAPSHOT</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <relocations>
                        <relocation>
                            <pattern>org.bstats</pattern>
                            <shadedPattern>org.example.bstats</shadedPattern>
                        </relocation>
                    </relocations>
                </configuration>
            </plugin>
lean gull
#

can someone help?

    public static ifConfigValueIsSet<boolean>(String ConfigValue) {
        if (this.getConfig().getString(ConfigValue)) {

        }
    }```
https://i.imgur.com/99rIuZd.png
quiet ice
#

Generics do not support primitive values

#

So you'd need ifConfigValueIsSet<Boolean>

#

However even then it is wrong, but I cannot make out what you meant by it

#

perhaps you meant the return type?

lean gull
#

i want to make a function that you input the label you want and then it returns if it's set

quaint mantle
#

I get this error when trying to do this: https://paste.md-5.net/orawuxowar.bash

                List<String> getArena = arenaConfig.getConfig().getStringList("Arena");
                int index = new Random().nextInt(getArena.size());```
dusk flicker
#

Do you just have 1 arena?

#

In the config section

quaint mantle
#

I got 5

willow dew
bold quartz
#

Have anyone an idea how i can change this in the BungeeCord source?

willow dew
#

ElgarL (not gonna ping), fixed the issue thx for all the help ❤️

visual tide
#

where 2

hardy swan
#

in the version

hardy swan
#

nextInt()'s argument is exclusive

dire marsh
#

why does barrel not implement Directional

last sleet
#

Im trying to make it give back the items the player put in a GUI when he closes it, but for some reason doesnt work when item 1 is null and item 2 is something. Only works when item 1 is something and item 2 is null or both are something.

#

I tried putting try/catch, everything but it doesnt seem to work

hardy swan
#

try checking for Material.AIR instead of null

#

and if it is null

#

then you cant call equals on it

#

it should be item != null

sharp bough
glossy scroll
#

does anyone know where the source jar is for when I use buildtools --generate-sources option?

last sleet
#

It really only works for item 1 and keeps throwing NullPointerException

#

or when item1 and item2 are full

unreal quartz
hardy swan
#

yes because you should check for null pointer too

hardy swan
#

I'm also curious why would getItem return AIR lol

#

as if AIR is stackable or can have meta or sth

last sleet
glossy scroll
#

that will not throw an NPE

#

100%

last sleet
#

In my error it says this line is causing the problem

#

It changed