#help-archived

1 messages ยท Page 68 of 1

formal nimbus
#

I looked up documentation

#

but it doesn't seem to work

hoary parcel
#

well, you either use a proper inner class and override the run method

#

or you use a lambda

#

you do some weird in-between shit

formal nimbus
#

right.....

#

got it I think

upper hearth
#

Does anyone have any idea if it's possible to completely fill a map when it's created? So I don't have to fly around to fill it, it's just already there

turbid musk
#

@naive goblet this is what I have so far

    public EntityArmorStandCustom(World world, Player p, Pet pet) {
        super(world);
        player = p.getUniqueId();

        setPosition(p.getLocation().getX(), p.getLocation().getY(), p.getLocation().getZ());
    }
#

The error is Cannot resolve method 'super(net.minecraft.server.v1_14_R1.World)'

#

but it has no issue when tis 1.12

vernal spruce
#

you are calling a method

#

wich doesnt exist for that class

#

you are not extending entityarmorstand

#

to call super

turbid musk
#

1 sec

karmic socket
#

Hello. Does anyone know how can i set up two prefix with LuckPerm?

vernal spruce
#

google..

karmic socket
#

Oh, really. I thinked it's mean to set 2 prefix for one group. Thanks

turbid musk
#
public class EntityArmorStandCustom extends EntityArmorStand {

    // Using an UUID to store the player. Storing a player instance is not
    // recommended
    public UUID player;

    public EntityArmorStandCustom(World world, Player p, Pet pet) {
        super(world);
        player = p.getUniqueId();

        setPosition(p.getLocation().getX(), p.getLocation().getY(), p.getLocation().getZ());
    }

    // This is the update method of the entity
    @Override
    public void Update() {
        EntityPlayer p = ((CraftPlayer) Bukkit.getPlayer(player)).getHandle();

        tpToPlayer(Bukkit.getPlayer(player), this);
        forceFace(p, this);

        // super.m_();
    }```
@vernal spruce
formal nimbus
#

hey everyone, I'm strugging to get a delay inbetween repeats of 2 for loops

#

I'm trying to get a 0.5 delay between each iteration of...

#

the second for loop

frigid ember
#

How much do I have to donate to change my name?

formal nimbus
#

How much do I have to donate to change my name?
@frigid ember $10?

frigid ember
#

what why so much ๐Ÿ˜ฆ

vernal spruce
#

why you need to change the name though?

boreal tiger
#

20 ticks is 1 second @formal nimbus

formal nimbus
#

yep

#

10L = 0.5s

boreal tiger
#

yes

formal nimbus
#

which is gucci

boreal tiger
#

you dont need to add the itemindex as a parameter

formal nimbus
#

I got an error otherwise?

frigid ember
#

I used to have a gaming name, now I'm using my real one.

formal nimbus
#

apparently

#

variabled used in enclosed loop must be final

vernal spruce
#

yeah.. dont post irl shit on the internet tbh

boreal tiger
#

ah right, just post the full code pls

formal nimbus
turbid musk
#
public class EntityArmorStandCustom extends EntityArmorStand {

    // Using an UUID to store the player. Storing a player instance is not
    // recommended
    public UUID player;

    public EntityArmorStandCustom(World world, Player p, Pet pet) {
        super(world);
        player = p.getUniqueId();

        setPosition(p.getLocation().getX(), p.getLocation().getY(), p.getLocation().getZ());
    }

    // This is the update method of the entity
    @Override
    public void Update() {
        EntityPlayer p = ((CraftPlayer) Bukkit.getPlayer(player)).getHandle();

        tpToPlayer(Bukkit.getPlayer(player), this);
        forceFace(p, this);

        // super.m_();
    }```
#

I am completely mindblanking on what it needs to be

boreal tiger
#

btw you can use a lambda @formal nimbus

vernal spruce
#

posting a code doesnt tell us much

#

whats the problem

formal nimbus
#

a lambda?

boreal tiger
#

yeah its a java 8 feature

#

what version are you using

formal nimbus
#

jav 8

#

how to lambdaaa

#

why is it so difficult to just get a wait ๐Ÿ˜ญ

#

alas, a simple delay is all that I desire

vernal spruce
#

why you need one?

formal nimbus
#

a delay of none other than 500 milli seconds

#

essentially

#

I open a crate

#

items scroll across the GUI

#

if I don't have a wait

#

it happens instantly

#

makes no sense

vernal spruce
#

make a method with a runnable inside

#

passing w/e you need

#

and doing it there?

boreal tiger
#

instead of a new Runnable, you can subtitute it with a lambda:

() -> {
  //code here
}
formal nimbus
#

o

vernal spruce
#

tbh i think hes gonna have the same problem

formal nimbus
#

oh neat

#

yeah I think so

#

1 sec

#

yeah

#

still happens instantly

#

also

#

I realised I need it there

#

cause I need a delay between each iteration of the first for loop

vernal spruce
#

its a prettyer way to do it

#

in the end does the same thing

boreal tiger
#

yes

formal nimbus
#

regardless, it's still not working?

vernal spruce
#

told you make a method to handle that for you

formal nimbus
#

but yeah, lamba is noicer

#

when and what for?

#

told you make a method to handle that for you
@vernal spruce

vernal spruce
#

let me give you a old example

#

i used to simulate a moving line of items

formal nimbus
#

๐Ÿ˜ฎ

#

I've got everything right

#

just need to implement this delay

#

then we gucci

vernal spruce
#
    new BukkitRunnable() {
        int count = 0;

        @Override
        public void run() {
            if(count>=15) {
                rollItemSlower(p,inv,back,barrierChance);
                this.cancel();
                return;
            }
            count++;
            rollItems(inv,back,barrierChance);
            p.playSound(p.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 1, 1);
            
        }
        
    }.runTaskTimerAsynchronously(pl, 0, 10);
}
public void rollItemSlower(Player p,Inventory inv,List<ItemStack> back,Integer bc) {
     new BukkitRunnable() {
         int count = 0;
        @Override
        public void run() {
            if(count>=5) {
                this.cancel();
                rollItemEvenSlower(p,inv,back,bc);
                return;
            }
            count++;
            rollItems(inv,back,bc);
            p.playSound(p.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 1, 1);
        }
         
     }.runTaskTimerAsynchronously(pl, 0, 15);
}
public void rollItemEvenSlower(Player p,Inventory inv,List<ItemStack> back,Integer bc) {
    new BukkitRunnable() {
         int count = 0;
        @Override
        public void run() {
            if(count>=2) {
                this.cancel();
            }
            count++;
            rollItems(inv,back,bc);
            p.playSound(p.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 1, 1);
        }
         
     }.runTaskTimerAsynchronously(pl, 0, 20);
}```
#

its a crude way of doing it now that i think about it

#

but it got the job done when it needed

#

was smooth enough for my taste

#

changing the timings should however solve it

formal nimbus
#

00f gtg for dinner

#

will look at this later

#

hopefully I will be able to figure it out

wheat forum
#

Can someone please help me. SO I published my plugin to spigot, but want to update the file. How would I do that?

sturdy oar
#

there's a button to publish a new version

wheat forum
#

Where?

#

@sturdy oar

sturdy oar
wheat forum
#

Ok can you guide me?

sturdy oar
#

???

#

just click it lul

wheat forum
#

Ok I did

#

I put in my new file

#

save update?

#

@sturdy oar Done but is not showing in version history

#

but it shows in the update tab

sturdy oar
#

then you messed up something

wheat forum
#

But idk

#

I just did wat I needed too

sturdy oar
#

and saved the update

wheat forum
#

Yes, it said Changes were saved

muted geode
#

is anyone able to help me with my plugin?

sturdy oar
#

maybe

muted geode
#

I am having a problem with my code where when a plant grows it does not grow to the max stage like I am expecting the code to...

#
import org.bukkit.block.data.Ageable;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockGrowEvent;
import org.bukkit.plugin.Plugin;

public class PlantGrowthListener implements Listener
{

    Plugin plugin;

    PlantGrowthListener(Plugin plugin)
    {
        this.plugin = plugin;
    }

    /**
     * listens for a block break event.
     *
     * @param event
     *                  a block break event.
     */
    @EventHandler
    public void PlantGrowEvent(BlockGrowEvent event)
    {
        plugin.getLogger().info("plant grow...");
        Block block = event.getBlock();
        if (block.getBlockData() instanceof Ageable)
        {
            Ageable age = (Ageable) block.getBlockData();
            plugin.getLogger().info("Max Age : " + age.getMaximumAge());
            age.setAge(age.getMaximumAge());
            block.setBlockData(age);
        }
    }
}```
fathom coral
#

When I try using the /send command it tells me that I dont have permission. I have the * permission

muted geode
#

the prints print however the plant does not grow....

vernal spruce
#

well age is already inside the blockstate

#

tried calling state.update

#

?

pastel basin
#

@muted geode try executing this method 1 tick after

muted geode
#

not exactly sure how to do that

pastel basin
#

(BukkitRunnable) -> {
age.setAge(age.getMaximumAge());
block.setBlockData(age);
}.runTaskLater(plugin, 1);

muted geode
#

testing...

wheat forum
#

Can I please have help from a mod or resource staff!

vernal spruce
#

what help you need?

wheat forum
#

I am trying to update my download link to my plugin on spigot, but when I hit the post resource update and stuff, the update shows up but the new version is not in version history and the link isn't updated

muted geode
#

@pastel basin Thanks! it worked!

vernal spruce
#

the link doesnt update

wheat forum
#

No

vernal spruce
#

once a resource updated if someone clicks download

#

it will give the new version

wheat forum
#

Ik, but it isn't

vernal spruce
#

it is..

wheat forum
#

For me it isn't

#

i can screen share

#

if u want

#

want me too screen share?

#

@vernal spruce

#

So you can see what I am doing

#

and tell me if I do something wrong

#

?

vernal spruce
#

no.. ask a staff member

wheat forum
#

They don't respond

#

It's a support server where staff don't help and leave it up to everyone else

vernal spruce
#

its late rn

#

dont expect answer within hours

frigid ember
#
 public void setSkin(Player p, UUID uuid) {
     EntityPlayer player = ((CraftPlayer) p).getHandle();
     GameProfile playerProfile = player.getProfile();
 
     PropertyMap pm = playerProfile.getProperties();
     Property property = pm.get("textures").iterator().next();
 
     pm.remove("textures", property);
     pm.put("textures", new Property("textures", textureValueHere, textureSignatureHere));
     
     for (Player pl : Bukkit.getOnlinePlayers()) {
         pl.hidePlayer(p);
         pl.showPlayer(p);
     }
 
     reloadSkinForSelf(p);
  }```

Hey guys, I'm trying to change player skins but I'm stuck here, I don't know how to get "textureValueHere" or "textureSignatureHere"

formal nimbus
#

anyone know why this isn't working?

#

essentially

#

this is a scrollable gui

#

I want the items to move 1 slot a long 100 times

#

which is the reason for the outer for loop

#

each iteration of that loop, another for loop runs

#

which moves all the times in slots 9-17 along by 1

#

there should be a 0.5ms delay between each iteration of the second for loop

#

sorry,

#

0.5ms delay between each iteration of the first for loop

#

which I why I put the dleay between the 2

#

as

#

every iteration of the first for loop

#

it waits 0.5ms before itterating

#

unfortunately, this has not worked

#

and the items scroll 100 items instantly

#

any fix would be appreciated

frigid ember
#

Guys, I need some help I'm getting this error and don't know how to fix it
https://hastebin.com/kubuvibaka.apache

    public void setSkin(Player p, String texture, String signature) {
    EntityPlayer player = ((CraftPlayer) p).getHandle();
    GameProfile playerProfile = player.getProfile();

    PropertyMap pm = playerProfile.getProperties();
    Property property = pm.get("textures").iterator().next(); //line 192

    pm.remove("textures", property);
    pm.put("textures", new Property("textures", texture, signature));
    
    for (Player pl : Bukkit.getOnlinePlayers()) {
        pl.hidePlayer(p);
        pl.showPlayer(p);
    }

    reloadSkinForSelf(p);
    }
    public static EntityGuard createNPC(Player p, String name, World world, Location location) {

    MinecraftServer nmsServer = ((CraftServer) Bukkit.getServer()).getServer();
    WorldServer nmsWorld = ((CraftWorld) world).getHandle();
    GameProfile profile = new GameProfile(UUID.randomUUID(), name);
    PlayerInteractManager interactManager = new PlayerInteractManager(nmsWorld);

    EntityGuard entityPlayer = new EntityGuard(nmsServer, nmsWorld, profile, interactManager);
    PlayerConnection conn = new PlayerConnection(nmsServer,
        new DummyNetworkManager(EnumProtocolDirection.CLIENTBOUND), entityPlayer);

    entityPlayer.setLocation(location.getX(), location.getY(), location.getZ(), location.getYaw(),
        location.getPitch());

    nmsWorld.addEntity(entityPlayer);
    Tab.getPlugin(Tab.class).setSkin(entityPlayer.getBukkitEntity(), Tab.textures.get(p), Tab.signatures.get(p));
...
dusty topaz
#

Line 192 of Tab?

#

ohh right

#

ignore that - it means the textures doesn't exist

#

just use getProperties#put

#

ie for my coinflip plugin I do

#
        GameProfile profile = new GameProfile(UUID.randomUUID(), null);
        profile.getProperties().put("textures", new Property("textures", TOKEN_TEXTURE_BLOB));
river niche
#

anyone know why this isn't working?
@formal nimbus
Isnโ€™t it supposed to be a bukkit runnable with a run method?

dusty topaz
#

that is what it is

#

it's just a lambda

#

but you're creating 100 schedulers

formal nimbus
#

nvm I've figured it out

dusty topaz
#

i tihink you got it the wrong way around

formal nimbus
#

yep I just realised that

#

this is working

#

I just now need a counter which stops it

frigid ember
#

@dusty topaz how would I get TOKEN_TEXTURE_BLOB?

dusty topaz
#

it's just a base64 string

#

of your texture link

#

this is 1.8 - you are supposed to do that signature stuff, but mine is only for a playerhead

#

so the string I have is:

#

which when you stick it from base64 in cyberchef

#
{"textures":{"SKIN":{"url":"http://textures.minecraft.net/texture/97f57e7aa8de86591bb0bc52cba30a49d931bfabbd47bbc80bdd662251392161"}}}
#

skin is just an ad since it's from head database

frigid ember
#

@dusty topaz , so property.toString(); would work?

    Property property = profile.getProperties().get("textures").iterator().next();
    String texture = property.getValue();
    String signature = property.getSignature();
    
    property.toString();
dusty topaz
#

if you're setting it, just set it like I do

#

i know what tutorial you're following, but it's just extra effort

#

you don't need to do any of that iterator stuff - just pm.put

#

i assume the map is implemented to follow the contract, meaning put will 100% put

#

so you just pm.put(new Property("textures", value, signature));

frigid ember
#

how i can connect this 2 Gui ,when someone click the spesific items in the BossMenu and open the BossList Gui ?

dusty topaz
#

listen to click event, checkk if it's the right gui and call openInventory if the correct item is clicked

vernal spruce
#

or have abstract inventory to do a certain action when clicked..

dusty topaz
#

which would listen to the click event, check if it's the right gui and check if it's the right item clicked ......

vernal spruce
#

its more complex

#

as it doesnt care where it is

formal nimbus
#

oop

vernal spruce
#

well time to spend another 30+hrs

formal nimbus
#

wrong thing lol

vernal spruce
#

finishing sevtech ages

#

again

formal nimbus
#

lol gl

vernal spruce
#

its rly fun

#

especially the beginning

#

the ideea of primitive minecraft..

frigid ember
#

@dusty topaz , I've changed it to this but the skin stays like steve


    public void setSkin(Player p, String texture, String signature) {
    EntityPlayer player = ((CraftPlayer) p).getHandle();
    GameProfile playerProfile = player.getProfile();    
    PropertyMap pm = playerProfile.getProperties();
    pm.put("textures", new Property("textures", texture, signature));
    
    for (Player pl : Bukkit.getOnlinePlayers()) {
        pl.hidePlayer(p);
        pl.showPlayer(p);
    }

    reloadSkinForSelf(p);
    }
vernal spruce
#

hmm let me see something

formal nimbus
#

something is wrong with my scrolling

dusty topaz
#

@frigid ember send texture and signature

formal nimbus
#

though it's really hard to explain

#

without video

#

can't seem to upload one

dusty topaz
#

and just make sure it's applied to the player

vernal spruce
#
        WorldServer world = ((CraftWorld)loc.getWorld()).getHandle();
        GameProfile gp = new GameProfile(UUID.randomUUID(),ChatColor.translateAlternateColorCodes('&', pl.getConfig().getString("Npc.Nume")));
        gp.getProperties().clear();
        gp.getProperties().put("textures", new Property("textures","fulltexturecode"));
        EntityPlayer npc = new EntityPlayer(server,world,
                gp,
                new PlayerInteractManager(world));
        npc
#

that fulltexturecode is the texture code itself..

#

place skin here then copy paste

#

the texture

#

i used mine but cant rly post it

#

as that shit its over 2k

#

funny thing in the end didnt even use it

#

the guy hated that it flickered in the tab list like citizens(wich he avoid for that reason) ๐Ÿ˜‚

formal nimbus
#

if that works...

vernal spruce
#

we cant see it

#

..

formal nimbus
#

then you'll be able to see the issue

#

;-;

vernal spruce
#

still processing

formal nimbus
#

that should let u download it

vernal spruce
#

yeah dont do that..

formal nimbus
#

don't do what

vernal spruce
#

throw random download links..

formal nimbus
#

):

vernal spruce
#

so what are you trying to do?

formal nimbus
#

so the items should cycle across

#

and mvoe 1 to the left

#

*move 1 to the left

#

every 0.5s

#

which they do

#

however

vernal spruce
#

hmm didnt i post something related to this

formal nimbus
#

if you look at the 2 slots furthest to the right

#

you will see they're glitchy

#

hmm didnt i post something related to this
@vernal spruce Possibly?

#

It's working now

#

but

#

just this weird glitchiness?

vernal spruce
#

this is some shi.. i did to simulate that

formal nimbus
#

w u t

vernal spruce
#

whoops bot got mad

#

?paste

worldly heathBOT
vernal spruce
frigid ember
#

@vernal spruce , @dusty topaz , I'm doing that but I'm doing this

            PlayerInfoData newPid = new PlayerInfoData(pid.getProfile().withName(finalName), pid.getPing(),
                pid.getGameMode(), WrappedChatComponent.fromText(name));

            event.getPacket().getPlayerInfoDataLists().write(0, Collections.singletonList(newPid));

However it's making all players steve and alex, although players can still see their own skin they can't see others

vernal spruce
#

a mess but it did what its supposed to

formal nimbus
#

this is working now

#

for some reason it's sideways

#

lol

#

wut is that code x_x

vernal spruce
#

wich one?

formal nimbus
vernal spruce
#

a manually switching horizontal line inventory

#

lmao

formal nimbus
#

w3utiouwtwt

vernal spruce
#

every time its called each item

formal nimbus
#

mine is a lot more complex and easily manipulatable

vernal spruce
#

gets moved to the left 1 time

#

wait

#

nvm yeah this was the one i used

formal nimbus
#

yeah I aint doing that x_x

#

any clue why mine is glitching?

vernal spruce
#

jeez

#

anyone know a decent

#

gif maker?

#

like recording screen n shit

formal nimbus
#

I don't lmao

#

nvm I have fixed glitchiness

frigid ember
#

Help

#

Dont tell me to take it to paper

#

Because im banned

vernal spruce
#

why you think taking it here is a better ideea? ๐Ÿ˜‚

frigid ember
#

I got banned from the paper discord

#

too hyped for 1.15

vernal spruce
#

i mean you dont get banned for nothing..

frigid ember
#

I got too hyped

#

Just do you have any ideas

#

whats wrong with it?

vernal spruce
#

holy shit

#

u fell for songoda shit

#

๐Ÿ˜‚

frigid ember
#

K

#

How

#

Do

#

I

#

Fix

#

It

#

Guys, anyone here experienced with ProtocolLib, I'm doing this

            PlayerInfoData newPid = new PlayerInfoData(pid.getProfile().withName(finalName), pid.getPing(),
                pid.getGameMode(), WrappedChatComponent.fromText(name));

            event.getPacket().getPlayerInfoDataLists().write(0, Collections.singletonList(newPid));

In this packet

        .addPacketListener(new PacketAdapter(this, PacketType.Play.Server.PLAYER_INFO) {

But it's overriding the skin!

vernal spruce
#

@frigid ember a plugin

#

named DiscordSRV

#

seems to cause it

frigid ember
#

Eh, that stupid thing

vernal spruce
#

the hole error log

#

is filled with it lol

#

github.scarsz.discordsrv

frigid ember
#

Ok, thanks, I will remove songoda

#

And Discord SRV

vernal spruce
#

dont think theyr related

#

to each other

#

also said that bout songoda cause its a meme here ๐Ÿ˜‚

frigid ember
#

Ok

#

This is like the dark web of mc

vernal spruce
#

depends how you see it

frigid ember
#

Yeah with DiscordSRV, It syncs your server chat to your mc chat VIA a discord bot

vernal spruce
#

well thats what the error log says,try removing it

#

and see if it crashes again

frigid ember
#

Hello! Iโ€™m here to see if you guys think is possible to have 20+ k players in a single map and what type of hardware that would require to run

vernal spruce
#

a server is not meant to have more than idk couple hundreds players

#

no matter what hardware you give it

#

its gonna die as the server is mostly single-thread

frigid ember
#

Theoretically the ports are like 60k

#

What if I had a multi core 3k a month custom server

#

With 1TB memory

vernal spruce
#

doesnt matter

#

the server itself cant handle it

#

its gonna bottleneck with the cpu

#

as it cant use more than 1

frigid ember
#

Even a Xeon

#

Platinum 32 core

vernal spruce
#

and again.. minecraft is mostly single-thread

#

it will use 1 of them

frigid ember
#

Mmh so the only solution would be to have it maxed out

#

And load balance over multiple servers

#

The incoming connections

vernal spruce
#

thats how most servers do it

#

having 5 lobbys or more

frigid ember
#

Because we are doing an event that requires many people together

vernal spruce
#

you can try but it will most likely brick at 200

frigid ember
#

Is there any evidence of anyone that did some sort of maximum

#

Guys, anyone here experienced with ProtocolLib, I'm doing this

            PlayerInfoData newPid = new PlayerInfoData(pid.getProfile().withName(finalName), pid.getPing(),
                pid.getGameMode(), WrappedChatComponent.fromText(name));

            event.getPacket().getPlayerInfoDataLists().write(0, Collections.singletonList(newPid));

In this packet

        .addPacketListener(new PacketAdapter(this, PacketType.Play.Server.PLAYER_INFO) {

But it's overriding the skin, how can I fix this?

vernal spruce
#

well hypixel has a certain maximum players per instance

#

idk what is it,around 100..

#

most likely there are

frigid ember
#

Yea it also runs full Minecraft

vernal spruce
#

videos on youtube

frigid ember
#

And custom plugins

vernal spruce
#

who maxed it out

frigid ember
#

Basically we are doing a Music Festical

#

With international DJs

#

It will fill very quickly

vernal spruce
#

well ur gonna be out of luck..

frigid ember
#

Well I mean we can still do maybe multiple instances of 200

#

And put mobs or spawn crown

#

Around to make it seem full

#

Even if we have so many people across 100 servers

#

@vernal spruce thank you maybe you could help us? Iโ€™m looking for devs

vernal spruce
#

as rn im already working at a project..

frigid ember
#

Guys, anyone here experienced with ProtocolLib, I'm doing this

            PlayerInfoData newPid = new PlayerInfoData(pid.getProfile().withName(finalName), pid.getPing(),
                pid.getGameMode(), WrappedChatComponent.fromText(name));

            event.getPacket().getPlayerInfoDataLists().write(0, Collections.singletonList(newPid));

In this packet

        .addPacketListener(new PacketAdapter(this, PacketType.Play.Server.PLAYER_INFO) {

But it's overriding the skin, how can I fix this? Full thread https://www.spigotmc.org/threads/player-skins-not-working.437041/#post-3800324

vernal spruce
#

cant rly help you.. not using protocollib

frigid ember
#

@vernal spruce thanks ๐Ÿ™

shadow berry
#

I have a spigot server via nitrado and my mate has built a 0 tick farm but it is not working. (1.15.2)
My friend told me its working on a singleplayer world.

Is this fixed on spigot?

hybrid elbow
#

paper disables this because it's a bug

shadow berry
#

Never heard of paper - let me google that ๐Ÿ˜„

#

Ok, if i am understanding it correctly its a completely different server "engine" that we are not using.

Ok I have checked to files and we have a paper.yml in our bukkit-folder (a bit confused)

But I can enable it there - thanks for the hint

sour hinge
late tangle
#

Okay I've got myself stuck... This is my code: ```java
//Open Inventory Menu for player;
public void openGUI(Player player, IGUI gui) {
//private Map<Player, IGUI> openGUIs; (This is the structure of openGUIs)
if(openGUIs.containsKey(player)) {
openGUIs.replace(player, gui);
} else {
openGUIs.put(player, gui);
}

    //Debug
    if(openGUIs.containsKey(player)) {
        player.sendMessage("true");
    } else {
        player.sendMessage("false");
    }
    //End of Debug

    player.openInventory(gui.getInventory());

    //Debug
    if(openGUIs.containsKey(player)) {
        player.sendMessage("true");
    } else {
        player.sendMessage("false");
    }
    //End of Debug
}

//This get executed with InventoryCloseEvent
public void closeGUI(Player player) {
    openGUIs.remove(player);
}``` When I open the first menu for the player, everything works fine. And the debug returns "true" and "true" After I open another menu, from inside the first menu it returns "true" and "false". However it can be temporarily fixed by inserting ``player.closeInventory();`` just before ``player.openInventory()``. However this is not the solution I want, as this resets the cursor to the center of the screen. Any help?
hybrid elbow
#

@shadow berry looks like your host automatically put paper on your server, it's just like spigot but supposed to be faster

wind dock
#

is there a way to see what commands were executed by a player even after the server has been restarted?

hybrid elbow
#

but yeah just turn 0 tick farms on in paper.yml and they'll work again

naive goblet
#

@late tangle I think you can check current inventory that player has opened?

#

I suppose you use InventoryHolder and then you check get the holder from the current inventory

shadow berry
#

@hybrid elbow yeah, did the trick - thanks ๐Ÿ™‚

naive goblet
#

I donโ€™t know why you would have a GUI interface otherwise

late tangle
#

@naive goblet I don't use Inventory Holder, as to my understanding, this is a bad practice.

naive goblet
#

Is this IGUI an interface?

late tangle
#

Yeah.

naive goblet
#

Itโ€™s your code?

late tangle
#

Yep. So I can pass in every GUI Menu I create.

naive goblet
#

Switch to an abstract class and rename it to something like GuiBase

#

then make all methods abstract

#

Itโ€™s much better to use an abstract class in this case

late tangle
#

How should this make a difference?

naive goblet
#

Well tbh Iโ€™d make the abstract class implement InventoryHolder even if itโ€™s not recommended itโ€™s a good way of handling custom guis

late tangle
#

Have done Inventory Gui's using InventoryHolder before, but as this seems to be a bad practice, im trying to do something different.

naive goblet
#

like what?

#

Also HumanEntity#getOpenInventory exist

#

Nullable

hybrid elbow
#

why's it a bad practice? I use inventoryholder all the time to store metadata about inventories lol

naive goblet
#

^

tiny dagger
#

It's not supposed to be used like thst

#

You can have your own inv holder

#

It would be the same thing

#

Don't use api that can and will get removed

wind dock
#

is there a way to see what commands were executed by a player even after the server has been restarted?

hybrid elbow
#

it's not deprecated

tiny dagger
#

Maybe not today

hybrid elbow
#

if it's not deprecated i have no reason not to use it

#

you can say "Don't use api that can and will get removed" of literally anything

tiny dagger
#

But your program is prone to be broken

naive goblet
#

I have hard to see that it will get removed as it would break very many plugins

hybrid elbow
#

it's just as prone to be broken as me using any of the other apis

naive goblet
#

It would probably get deprecated only

#

Which means it will still have its functionality

tiny dagger
#

Okay guys you do you

naive goblet
#

Itโ€™s know that itโ€™s overall โ€œmisleadingโ€ but itโ€™s a perfect interface of how itโ€™s method is involved

hearty trellis
#

hi guys, is it possible to get a net.minecraft.server.v1_15_R1.EntityCreeper reference from a org.bukkit.entity.Creeper reference? I tried casting it like this (EntityCreeper) event.getEntity() but i dont think it worked

naive goblet
#

Making some basic abstraction and it can be very functional and easy to work w/

#

Yes

#

Use craftbukkit classes to convert

tiny dagger
#

Cast it to Craftcreeper

#

Then get handle

naive goblet
#

^

paper compass
#

How can I replace a LOT OF BLOCKS really fast without any lag?

tiny dagger
#

You update the blocks without light and physics

paper compass
#

But how?

naive goblet
#

Idk if fawe has a lib that can help

tiny dagger
#

There is for sure a method somewhere on spigot

paper compass
#

Oh yeah fawe

#

I'll use that

tiny dagger
#

I'm on phone so I can't give mine

paper compass
#

Do you know how I can use fawe for it?

#

Whats the method

naive goblet
#

Add it as a dependency

#

Then decompile and check for yourself if they donโ€™t have a developer documentation

paper compass
#

Editsession?

naive goblet
#

Idk never used it

#

But try experiment a lil

molten prairie
#

I am looking for someone who is extremely experienced in the bungee cord server field, i have it setup but I have a ton of questions and need some help, you will be paid for you time

dusty topaz
#

is it possible to get the correct tool to break a block

paper compass
#

Like omnitool?

dusty topaz
paper compass
#

Lmao

vale horizon
#

Hello everyone! Sorry for interrupting BTW... I really need help from someone who is the master of ruling with command blocks.
Basically it's me and my command writing or paper server that i have right now... ๐Ÿ˜ฆ Help here or on PM would be appreciated.

naive goblet
#

@molten prairie I donโ€™t want to minimod but this is a support channel not a channel to hire developers.

#

?ask @vale horizon

worldly heathBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.

vale horizon
#

oh, sorry ๐Ÿ™‚

tawny crescent
#

which has a plugin that teleports to spawn when someone dies (tp to spawn the world world when the player in the world Monde or other)

naive goblet
#

I mean essentials or somethinf

pastel basin
#

essentials is just bloated with stuff

pastel basin
#

search for setspawn plugin or something

naive goblet
#

Took 2 seconds

paper compass
#

How do I use fawe to replace a lot of blocks super fast

tawny crescent
#

Can we delete /spawn command ? @naive goblet

pastel basin
#

@paper compass idk, ask them?

paper compass
#

?????

pastel basin
#

this is the spigot development discord server

#

not fawe discord server

paper compass
#

wow

#

When people suggested me to use fawe here

terse schooner
#

I'm allowed to ask for general help here, right?

#

Having server issues that I have no idea how to address tbh

vale horizon
#

?ask Sooo, i have commands for cb's and they are going like this:
TEST
/minecraft:execute if entity @e[type=item_frame,limit=2,sort=nearest,x=3000095,y=81,z=2999984,distance=..2,nbt={Item:{id:"minecraft:ender_eye",Count:1b}}]
CB1
/minecraft:execute if block 3000095 75 2999984 minecraft:repeating_command_block{SuccessCount:2} run fill 3000095 79 2999984 3000095 80 2999984 minecraft:air
CB2
/minecraft:execute if block 3000095 75 2999984 minecraft:repeating_command_block{SuccessCount:1} run fill 3000095 79 2999984 3000095 80 2999984 minecraft:black_concrete
So basically 3 command blocks, one on top of each other, 1st one working (test), 2nd & 3rd no...
They are for hidden doors but nothing is working as it supposed to. :(
I showed this commands to my friend and he told me that is should work.
Maybe it's paper server problem?

worldly heathBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.

naive goblet
#

Remove permission to that command?

tawny crescent
#

i already have /spawn command

naive goblet
#

๐Ÿคฆโ€โ™‚๏ธ

terse schooner
#

default players

naive goblet
#

I mean

terse schooner
#

remove the permission from them

pastel basin
#

@paper compass you can only ask things related to spigot here, if its related to a plugin ask on #general or in the plugin's discord

naive goblet
#

Remove the permission to the command you donโ€™t want them to have access to. Also you can explicitly override it with commands.yml

terse schooner
#

I'm having issues with spawn chunks saving, I get the error "Failed to save chunk 46,96". Apparently this is due to corruption but I see no visible errors with the chunks and I can access them fine

#
09.05 23:16:46 [Server] INFO net.minecraft.server.v1_15_R1.ReportedException: Saving entity NBT
09.05 23:16:46 [Server] INFO at net.minecraft.server.v1_15_R1.Entity.save(Entity.java:1589) ~[Spigot_Latest.jar:git-Spigot-2f5d615-d07a78b]
09.05 23:16:46 [Server] INFO at net.minecraft.server.v1_15_R1.Entity.c(Entity.java:1476) ~[Spigot_Latest.jar:git-Spigot-2f5d615-d07a78b]
09.05 23:16:46 [Server] INFO at net.minecraft.server.v1_15_R1.Entity.d(Entity.java:1484) ~[Spigot_Latest.jar:git-Spigot-2f5d615-d07a78b]
09.05 23:16:46 [Server] INFO at net.minecraft.server.v1_15_R1.ChunkRegionLoader.saveChunk(ChunkRegionLoader.java:314) ~[Spigot_Latest.jar:git-Spigot-2f5d615-d07a78b]
09.05 23:16:46 [Server] INFO at net.minecraft.server.v1_15_R1.PlayerChunkMap.saveChunk(PlayerChunkMap.java:717) ~[Spigot_Latest.jar:git-Spigot-2f5d615-d07a78b]
09.05 23:16:46 [Server] INFO at net.minecraft.server.v1_15_R1.PlayerChunkMap.lambda$15(PlayerChunkMap.java:332) ~[Spigot_Latest.jar:git-Spigot-2f5d615-d07a78b]
09.05 23:16:46 [Server] INFO at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) [?:1.8.0_211]
09.05 23:16:46 [Server] INFO at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) [?:1.8.0_211]
09.05 23:16:46 [Server] INFO at java.util.Iterator.forEachRemaining(Iterator.java:116) [?:1.8.0_211]
09.05 23:16:46 [Server] INFO at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) [?:1.8.0_211]
09.05 23:16:46 [Server] INFO at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) [?:1.8.0_211]
#

That's the start of the error, I don't know how to read it

#

all I think I know is that it's related to some custom mob?

#

But there are none on that chunk. Just villagers. And after the first save error, there were none

#

if anyone needs me to send more of the error, just lmk

naive goblet
#

NBT error

#

Can has to do with versioning

terse schooner
#

er

#

wdym

#

do you have any idea what I could do to resolve it?

subtle blade
#

Need the actual crash report. That error tells us nothing whatsoever

#

The crash log will include information about the entity, its id, position, etc.

#

The error in saving can be from literally any sort of invalid NBT value

terse schooner
#

Er

#

Okay. How do I get that? crash my server?

#

the server didn't actually crash

#

Excuse my ignorance, lol. I really should know how to get that by now but I haven't had to deal with them at any point so far

#

I know where they are but does it save one for every time my server restarts? I presume not

#

Oh, actually. I'll just get you a regular log lol

#

hopefully that's sufficient. Thanks for your patients guys, I know I'm a bit slow with this stuff lol

subtle blade
#

Usually those force out crash logs in the crashes directory

#

If not, it'll probably be in the log

terse schooner
#

I can't attach files, is there another way I should send it?

#

I found the crash in a server log

#

Er, *save error

#

I could just paste the text here again.

#

actually I'll make a pastebin

subtle blade
#

?paste

worldly heathBOT
terse schooner
#

oh

#

Well, it's there on pastebin. If more is needed just lmk

#

starts at about line 10

subtle blade
#

helps a bit more

terse schooner
#

what else should I send?

sterile star
#

Any staff?

#

My essentials kit not working

subtle blade
#

most that tells us slippy is that it's a villager failing to save

terse schooner
#

is there any way I could provide you with more information?

sterile star
#

Can any staff by any chance help me with creating my essentials kits? It's not working.

subtle blade
#

Unless there's a crash log, most likely not, slip

sterile star
#

Choco?

subtle blade
#

that crash log should append the entity's exact position

#

i don't know. i hate essentials

sterile star
#

I created a ticket at the website and i havent got a respond for like 2days

terse schooner
#

soooo.. If I

#

cause the save issue

#

then crash my server

#

will that produce the needed crash log?

#

Also domination, what's the issue? is the command not working?

#

It's a villager issue, is it possibly related to custom changes due to mythical mobs?

#

or is it possibly because a plugin can't handle saving a 1.15 villager?

subtle blade
#

as far as i could tell taking a brief glance over the server source, it looked like it was having issues saving the dimension type so i have a feeling some plugin is doing something stupid and messing with the dimension registry

terse schooner
#

Soo

#

dimension registry and villagers?

true anvil
#

Anyone know of a tutorial for custom enchants in 1.15? Either lore based or an actuall enchant

terse schooner
#

I do have multiverse installed, but it hasn't updated recently and I didn't have this issue in the past

#

custom enchants
I know you can use artifice for that but I presume u mean making your own plugin

true anvil
#

yeah

light geyser
#

lores could probably work

#

then just add event listeners to do the things you need

true anvil
#

ok

pastel condor
#

I added a method to prevent shift clicking out of the gui but he removed it

#

I also made it so the gui is by class

dusty topaz
#

pretty sure phoenix is irc mod or smth

hoary parcel
#

because your way is not supported

#

officially speaking, you shoulnt use inventory hold like that

pastel condor
#

but at least he could of kept the shift clicking part

#

thats important

dusty topaz
#

i think it's on you to make the edit properly

#

not for phoenix to make your edit proper

pastel condor
#

he just trashed it though?!

hoary parcel
#

your stuff is still there

pastel condor
#

oh good

hoary parcel
#

wiki has history

frigid ember
#

did spigot ever have anything along the lines of hud stuff or being able to create menus?

hybrid elbow
#

how are you supposed to use inventory holder? the way they did it in the edit isn't very good, but it is ok to use it to tell whether it's an inventory you care about

dusty topaz
#

who owns the inv

hoary parcel
#

you shouldnt implement inventory holder yourself

hybrid elbow
#

oh

hoary parcel
#

thats the offical spigot answer

pastel condor
#

really?

hoary parcel
#

yell at md if you disagree

#

this has been discussed multiple times tho

pastel condor
#

oh I see

hybrid elbow
#

are you supposed to just use a map then

pastel condor
#

^

#

I mean I didn't know

subtle blade
#

it is documented

wanton delta
#

whats the reason for not allowing inventoryholder implementations?

subtle blade
#

It's leaky API and was not its purpose

wanton delta
#

i see

dusty topaz
#

leaky API
where's the ban on metadeta

subtle blade
#

Plugin code should not be injected into the server, ever

#

Metadata is handled through CraftBukkit

#

Not NMS

pastel condor
dusty topaz
#

implements Listener, InventoryHolder

#

yes

subtle blade
#

i was literally typing exactly that

#

lol

pastel condor
#

lol

dusty topaz
#

be faster

hybrid elbow
#

that's bad for more reasons than one

pastel condor
#

rip

hybrid elbow
#

it will break if multiple people open the gui

pastel condor
#

now I have to fix my entire plugin

frigid ember
dusty topaz
#

the username gets cut short?

subtle blade
#

There's no ping meters

pastel condor
#

Anyone know how I can fix my code (like what should I change?)

subtle blade
#

Keep track of InventoryViews when you open the inventory

#

(player's openInventory() method returns InventoryView)

#

They are reference comparable

dusty topaz
#

the legendary ==

pastel condor
#

yeah lol

#

I love ==

#

what do you mean by keep track of that?

#

besides the friends gui page everyone has the same gui

#

oh wait and the main page

dusty topaz
#

have a map of uuid to inventoryview

#

or something

pastel condor
#

okay?

#

but what would that achieve?

dusty topaz
#

uhh it allows you to get inventory views

pastel condor
#

can't I just do event.getViewers()?

#

I think?

dusty topaz
#

ok, you can get the viewers of an inventory on a click event

#

does that tell you if they are in your gui

pastel condor
#

I use this if (!(event.getInventory().getHolder() instanceof SettingsGUI)) return;

#

to make sure they are in the gui

#

should I be using something else?

dusty topaz
#

you should be checking if they are in the map

#

of inventory views

pastel condor
#

oh I see

#

thanks

stiff monolith
#

Can anyone java? help me write a very simple plug-in.

pastel condor
#

yeah?

stiff monolith
#

yes

pastel condor
#

so you need help?

stiff monolith
#

yes

#

...

pastel condor
#

you should just say your question

stiff monolith
#

Didn't I tell you?

frigid ember
pastel condor
#

thats odd

#

Idk

frigid ember
pastel condor
#

yeah

#

I know the black border expands if you have a long header / footer

#

but I never have seen it shrink

#

what are your trying to make @stiff monolith

stiff monolith
#

What is this? I can't see clearly.

#

I want to find someone to help me write a plug-in.

pastel condor
#

that does what

stiff monolith
#

what

pastel condor
#

here is how you make a blank plugin

subtle blade
#

besides the friends gui page everyone has the same gui
@pastel condor No. There is a distinction between Inventory and InventoryView

#

While they may have the same Inventory open, they will each have their own InventoryView

stiff monolith
#

I can't java. I don't have a programming foundation.

subtle blade
#

Every InventoryEvent has an InventoryView you can get and compare against

pastel condor
#

thanks for letting me know, I will fix that asap

radiant pollen
#

If I force unload a chunk using World#unloadChunk(), do I need to due anything to ensure nothing breaks? Will it reload automatically if a player approaches it or teleports to it?

fleet crane
#

It will reload

somber basin
#

Hey guys, quick question. I just started doing the spigot tutorials. Using eclipse/maven/spigot-1.15.2. Basically, maven does not seem to be able to download the javadocs or sources. I have enabled it in preferences, and tried manually selecting the menu options in the menu Project->Maven but it does not seem to be working. Any ideas?

pastel condor
#

@somber basin don't use the bukkit dependency

somber basin
#

oh

#

delete

pastel condor
#

yup

somber basin
#

Nvm, I used the page about downloading local source/javadoc and just attached the dependency to that in eclipse... this'll do

pastel condor
#

oh okay

timid fractal
#

hey guys, just did a reset on a server, but everyones /homes/ from essentialsx are still there, deleted all the files for it, all the user data but its still there, i cant figure out how to get rid of them

slim hemlock
#

if there are any javascript people in here, anyone mind telling me why const imageArray = [[]]; imageArray[1][2] = "a"; is undefined?

#

is that type of declaration not valid?

#

because const x = [] is valid

pastel condor
#

I can't seem to upgrade my server from 1.13 to 1.14, it just gets stuck at a world

regal basin
#

if there are any javascript people in here, anyone mind telling me why const imageArray = [[]]; imageArray[1][2] = "a"; is undefined?
@slim hemlock imageArray[1] is undefined

slim hemlock
#

sure but if I do imageArray[1] = "blah" it becomes defined

#

oh

#

is it because I first have to define the array before the inner array?

regal basin
#

It's because JavaScript starts counting from zero when it indexes an array

slim hemlock
#

yeah but I was defining them from 0

#

I did 1 2 as an example but I was recursively filling it from 0

#

I have to assume it's because I didn't define the array that was outside

regal basin
#

is it because I first have to define the array before the inner array?
@slim hemlock "blah"[2] is 'a' and undefined[2] throws a error

slim hemlock
#

ah

#

bummer

#

I got it to work by declaring it otherwise anyhow

#

but good to know that's what's going on

regal basin
#

I have to assume it's because I didn't define the array that was outside
@slim hemlock no. const imageArray = [[],[]]; imageArray[1][2] = "a"; is not undefined

somber basin
#

@slim hemlock You're attempting to access index 1 of the outer array, which doesn't exist, and index 2 of the inner array, which also doesn't exist. If you had imageArray = [[], []]; then the first index (1) should return the second inner array, which is still [] - then index 2 of that array is undefined because well... it's empty. If you try, for example, imageArray = [['a','b','c'], ['d','e','f']]; then imageArray[1][2] would be 'f' - hope that helps

#

So, the issue is that you're trying to index into an undefined array

somber basin
#

Does the spigot api allow you to register custom blocks and items, or do I have to override existing items?

regal basin
#

Does the spigot api allow you to register custom blocks and items, or do I have to override existing items?
@somber basin MC doesn't allow one to register custom blocks

vernal spruce
#

Items however can be using custommodeldata meaning with a texture pack you can have multiple items disguised

#

Unless you have a worldmanager plugin you can only replace the current active one..

fleet burrow
#

How would I fix this? I switched to IntelliJ Ultimate recently and this happened... I was previously able to view decompiled code...

fleet crane
#

Idk make sure a decompiler plugin is installed/enabled?

worn gate
#

can anyone help me out with

Bukkit.getSheduler()```
which doesn't work on my code
fleet burrow
empty sonnet
#

Hi, can someone help me, basically I built a long redstone smelting machine it's 64 blocks long, but after 25blocks away the machine will stop and not load, I think it's because spigot try to opt the server, it makes all redstone stuff to not work if it's x blocks away from the player, is there anyway I can change that?

worn gate
#

u need a chunk loader ?

empty sonnet
#

what do you mean by chunk loader?? I think the chunk is loaded because I can still see the chunks, or it's just visually loaded?

frigid ember
#

can you change your server's render distance?

#

or, well

#

have you tried changing it

empty sonnet
#

Yes the server render distance is set to 12 right now

worn gate
#

20 on some servers

#

but usually they put it down to 5

#

overwise the server crashes

#

so either ur the server admin and u can check, either you ask to an admin to change render distance to 20

empty sonnet
#

does that affect how redstone works?? since it's weired that the redstone stop working when am more than 25 blocks away

#

am the server owner

#

its a private server

#

right now it needs two people to afk in the machine ๐Ÿ˜ฆ

frigid ember
#

hm - try tinkering with spigot.yml

#

i believe there are certain ranges you can set

#

also, i have a question too

#

about mysql

#

is it required that i run results.next() after statement.executeQuery?

#

this is being run asynchronously and i don't know a ton about sql - players are having issues with their data loading

#

it's very inconsistent, i think that's probably because of the async stuff

#

if it helps, i don't close the connection when pulling/saving data - should i do this if it's async?

formal nimbus
#

is there a way I can initialise a varaible only on the first run?

#

or inititalise a varaible in the parameters

#

I'm not sure how to do it, can't seem to find anything about online and I need a counter to count the number of runs

frigid ember
#

ran into the same thing, not a great way of doing it :/

formal nimbus
#

oh?

#

how else would I do it

#

and what's wrong with doing it like this

#

@frigid ember

frigid ember
#

OH

#

sorry

#

i meant that there isn't a great way of doing it

#

other than by what you're doing

formal nimbus
#

ah

#

well how am I meant to get a vriable in there?

#

If I declare a variable outside of the scheduler, then I can;'t use it

sweet hemlock
#

You can use it if you keep it constant

formal nimbus
#

is there a way to define one in parameters?

#

o?

#

by making it final?

sweet hemlock
#

Declare a variable and assign it once. If you don't reassign the variable, it's considered constant and you'll be able to use that in the lambda functions.

#

Pretty much

formal nimbus
#

uhhh

#

right

#

but the thing is

#

I need a counter

#

which has to change

sweet hemlock
#

AtomicInteger maybe

formal nimbus
#

atmoic integer?

#

*atmoic

sweet hemlock
#

Mhm

formal nimbus
#

pray tell, for what is an atomic integer

sweet hemlock
#

AtomicInteger, along with other Atomics, allows you to change values even after initialization.

formal nimbus
#

i n t e r e s t i n g

sweet hemlock
#

It's basically an encapsulation of a primitive

formal nimbus
#

what strucutre do I use?

#

assigning 0 doesn't work

sweet hemlock
#
AtomicInteger I = new AtomicInteger(0);
i.increment();
i.decrement();
i.....

Something like that

formal nimbus
#

ah

#

that's perfec

sweet hemlock
#

Look up the docs for AtomicInteger or something

formal nimbus
#

kk

sweet hemlock
#

^^

#

There's also AtomicString, AtomicBoolean, etc.

formal nimbus
#

interesting

#

is there AtmoicDouble?

#

*AtomicDouble

#

looks like there is, but it's from google?

#

the import I mean

sweet hemlock
#

Hmmm, I'm not sure

formal nimbus
#

I want to apply a random number

sweet hemlock
#

All I know is that IntelliJ has an option to turn things atomic

formal nimbus
#

but math.random gives a double

sweet hemlock
#

There is AtomicDouble yeah

formal nimbus
#

cool

sweet hemlock
#

Uh I've used new Random().nextInt() or similar so

#

idk about Math.random()

formal nimbus
#

kk

#

what range does that give?

sweet hemlock
#

but I'd assume the double is between 0 and 1

#

I can't say for sure

formal nimbus
#

yep, math.random is between 0.0 and 1.1

#

*1.0

sweet hemlock
#

๐Ÿ‘

vernal spruce
#

why not everything in 1?

silk gate
#

everything in 1 would be fine

fleet burrow
#

"I found a type but it is not Any type it's just some type"

vernal spruce
#

๐Ÿ˜‚

#

time for you to use a generic type then..

#

try E

fleet burrow
#

What? I am using a generic type though

vernal spruce
#

oh yeah

#

wth

fleet burrow
#

this makes literally no sense

naive goblet
#

I havenโ€™t worked with kt very much

#

Try change Any to C?

#

Or would that break something else?

fleet burrow
#

Wdym?

#

C extends C
?

fleet burrow
#

it is C

#

though

#

that's the problem

naive goblet
#

That is C but does save take it?

fleet burrow
#

yes

#

This fixed it lmao

#

wtf was all of this lol

naive goblet
#

Cool (:

rotund jasper
#

kotlin is love

naive goblet
#

Nah

rotund jasper
#

@fleet burrow what is that IntelliJ font

fleet burrow
#

default in IntelliJ ultimate

#

ikr, sexy

#

Segoe UI

rotund jasper
#

o_O

#

indeed

vernal spruce
#

how would i solve a warning that im using a non-softdepended method

#

while soft depending that plugin? ๐Ÿ˜‚

#

i just cant get my head around this

rotund jasper
#

open the plugin.yml in the compiled JAR (not the one in your resources folder) and see if it the softdepend line is there

#

had this issue once

#

if you're using maven clean the project then build again

vernal spruce
#

yep it is there

#

softdepend: [Vault,HolograhpicDisplays]

arctic cloud
#

how should I go by cancelling a tnt's explosion but retain the player toss? Seems like cancelling the event or using setDamage seem to just cancel the throw. setHealth seems to be not working too

#

oh nvm

#

figured it out

fleet crane
#

@vernal spruce how do you spell holographic?

vernal spruce
#

oh wow

#

well thats embarassing

red bolt
#

same

#

do a face reveal md_5

naive goblet
#

His face is on pfp

#

md_5 .

red bolt
#

we need a face reveal

#

who is the man behind spigot

naive goblet
#

who is the man behind spigot
lmao

red bolt
#

im helping by making spigot meet his owner

bronze marten
#

MD_4
@frigid ember SHA1.

ashen stirrup
#

I'm having a complete blank moment, I'm assuming you can't just do getConfig().set() for a string list, so would you save the list, add the data you want, and then reset the list?

frigid ember
#

Anyone that knows a plugin that disables the ability to grief crops by jumping on them

desert gazelle
#

I think worldguard does that

frigid ember
#

yes but like

#

it is the only thing i need, really

#

because its a hub server

#

and wg takes more resources than neccesary @desert gazelle

desert gazelle
#

Then I haven't seen 1 only Griefprotection or w/e has it when a piece is claimed

#

Shouldn't be hard to write a small plugin for that

stiff monolith
#

Is this the plug-in you want?

ashen stirrup
#
abc:
  defg: 42
  hijk: "xyz"

How would I change the name of abc to '123', without losing the data from defg and hijk

sturdy oar
#

I'm not sure but I think you'd need to clone it and make a new one with different name

naive goblet
#

Uhm get the map from abc clone it to 123 then set abc to null

frigid ember
#

@stiff monolith yup, thanks :)

stiff monolith
#

Never mind๐Ÿ˜„

chrome heron
#

I cant use tpa or any tpX on essential but i hv no idea where the problem is

stiff monolith
#

Do you have no authority?

chrome heron
#

no ,no tab complete

stiff monolith
#

Incompatible versions

#

To install the corresponding version of the plug-in

naive goblet
#

Can't you the command or is it just the tab complete?

#

If there is another plugin blocking try /etpa

chrome heron
#

just the tab complete

stiff monolith
#

what

naive goblet
#

Any other ess cmd works?

stiff monolith
#

It is not possible to install Essentials on the Sponge server.

chrome heron
#

i am using bc + spigot

naive goblet
#

What version on spigot?

chrome heron
#

latest

naive goblet
#

1.15.2?

chrome heron
#

ys

stiff monolith
#

To install it on the spigot.

chrome heron
stiff monolith
#

what

naive goblet
chrome heron
#

Note:PLZ dont download the version of spigot and use the jekkins one(ESSENTIALX)

naive goblet
#

WHat

stiff monolith
#

ใ€‚ใ€‚ใ€‚.
What is the version of your server? I'll download it for you and send it to you.

naive goblet
#

Even if builds from Jenkins are successful they can have bugs and glitches.

#

Here is where it should be downloaded if you want the most bug free versions

chrome heron
#

@stiff monolith I download the latest version on jekkins now works fine thx

stiff monolith
#

ok

chrome heron
#

Just remind that the spigot.org of the essentialx doesnt add the tpa on the tab complete

naive goblet
#

WHat

#

That's false

#

You probably got an outdated version

chrome heron
#

no,the essentialx that i download is the last week version

stiff monolith
#

em

chrome heron
#

but there are no update on spigot

naive goblet
#

Hmm then it probably got patched in a recent build version

#

No because the latest build versions are experiment ones

#

and can contain various bugs

stark remnant
#

Hey, anyone know what the problem of this is?

naive goblet
#

Is that a cause by your plugin?

stark remnant
#

Internal Exception: io.netty.handler.codec.EncoderException: java.util.ConcurrentModificationException

naive goblet
#

Is that a cause by your plugin?

#

Or could you check console?

stark remnant
#

I'm just a moderator on the said server, and was wondering what the issue could be? And maybe formulate some solutions to the server owner

naive goblet
#

Internal Exception: io.netty.handler.codec.EncoderException: java.util.ConcurrentModificationException

#

This tells us nothing

#

Almost

worn gate
#

java.lang.Error: Unresolved compilation problem:
getSheduler cannot be resolved or is not a field anyone can help ?

stark remnant
#

In the console, the error just disconnects players randomly with no further information.

[12:34:22] [Server thread/INFO]: iAnson lost connection: Disconnected
[12:34:22] [Server thread/INFO]: [-] iAnson

worn gate
#

trying to use getSheduler

naive goblet
#

gnaboo code?

worn gate
#

Bukkit.getSheduler.runTaskTimer(this, new BukkitRunnable() {

        @Override
        public void run() {
            Bukkit.broadcastMessage("test");
            
        }
    }, 0, 20);
naive goblet
#

eww

stiff monolith
worn gate
#
package fr.gnaboo.gnanplugin;

import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.Bukkit;

import fr.gnaboo.gnanplugin.commands.CommandSpawn;
import fr.gnaboo.gnanplugin.commands.CommandTest;
#
Bukkit.getSheduler.runTaskTimer(this, new BukkitRunnable() {

            @Override
            public void run() {
                Bukkit.broadcastMessage("test");

            }
        }, 0, 20);```
naive goblet
#
Bukkit.getScheduler().runTaskTimer(this, () -> {
  //code
}, 0L, 20L);
worn gate
#

ok, i'll try

frigid ember
#

That wasnt the problem

naive goblet
#

@stark remnant It's hard to know as we don't know where the Exception was thrown from.

frigid ember
#

You mispelt scheduler .-. But it is better to use () ->

worn gate
#

it works, thx @naive goblet

naive goblet
#

No but he shouldn't use BukkitRunnable

#

It's only in the API because a lot of plugins still use it.

worn gate
#

anyone has an idea of how putting a cooldown on a command with this ?

naive goblet
#

Don't use the scheduler for it

#

compare time

worn gate
#

how ?

naive goblet
#

System.currentTimeMillis() or something will get the current time in millis

#

You can turn that into second by using this:

#

TimeUnit.MILLIS.toSeconds(System.currentTimeMillis())

#

Then make 2 references of it

worn gate
#

so how does it work ?

stark remnant
#

@naive goblet we weren't able to diagnose what plugin exactly is causing the problem, but most of our players are disconnected with this error when typing in chat mid (/msg) and backspacing

naive goblet
#

Nothing in console?

stark remnant
#

Nothing in console that would give further information

ripe spear
#

Hey gus i have a deeep problem

worn gate
#

yeah ?

ripe spear
#

I used ip for my home derver so i dojt have ti pirt foward

#

Using radmin vpn

#

Today when i login to mc

#

A server is already started

#

In the same ip

#

Idk howw

#

Its not my server

#

It seem to be a 24/7

naive goblet
#
Map<UUID, Long> cooldownMap = new HashMap<>();

//onCommand
Player sender = (Player) sender; //instanceof check first
if (!cooldownMap.contains(sender.getUniqueId()) {
  cooldownMap.put(sender.getUniqueId(), TimeUnit.MILLIS.toSeconds(System.currentTimeMillis()));
} else {
  long current = TimeUnit.MILLIS.toSeconds(System.currentTimeMillis()), 
  original = cooldownMap.get(sender.getUniqueId());
  if (current - original > 5) {
    //code if it has been 5 seconds since last execution
  } else {
    //code if not
  }
}``` @worn gate
ripe spear
#

It was there all the time qith 0/10 players

naive goblet
#

Something like that

#

@stark remnant sorry can't help but try filter the plugins

ripe spear
#

Do u gus now anything to do with this

naive goblet
#

ninja what is the issue?

ripe spear
#

A server is already started
@ripe spear

#

In the same port

naive goblet
#

switch port?

ripe spear
#

@naive goblet not just pirt in the same ip

#

I use radmin vpn so its not my ip

naive goblet
#

Maybe the usage of VPN messes it up?

ripe spear
#

I dont know how this happend

#

Itworked yeterday

#

@naive goblet no a liyerral server is started

naive goblet
#

what

#

Can you try to avoid spelling errors

#

It's extremely hard to understand

ripe spear
#

It says in the server list in mc " a minecraft server " 0/10

#

its a 24/7 server by the lloks

#

Looks

#

Sorry

#

I am on mobile right now

silent veldt
#

@worn gate Still here?

light geyser
#

so I ran into an odd thing, I do a check to make sure a block is air, but it was a leave block, but still returns true, how can I prevent this from happening?

#

I check like so: java location.getBlock().getType().equals(Material.AIR)

frigid heath
#

maybe use ==?

light geyser
#

shouldnt matter, but sure Ill try it

idle zodiac
#

Hi

#

So

#

I need a tiny bit of help

light geyser
#

Do ask ๐Ÿ™‚

idle zodiac
#

I've been using Skript for a while now

#

and have recently just started using Spigot

#

as i need some more flexibility

silent veldt
#

@light geyser When using an Enum like Material, you should generally use ==

idle zodiac
#

I've been following the official tutorial on the spigot webite, but I cant get the command to work

light geyser
#

Does that really make that much of a difference then?

idle zodiac
#

I'm using IntelliJ

silent veldt
#

It depends on how .equals is implemented

frigid heath
#

@idle zodiac did you register your command

silent veldt
#

Whereas == doesn't

idle zodiac
#

@frigid heath Yes

light geyser
#

good point

silent veldt
#

For enums, it will work

idle zodiac
#

It just says /kit whenever I enter it into mc

hoary parcel
#

code?

#

you most likely don't return true

light geyser
#

another thing I find weird though, for debugging I already print out the block, which shows as Material.AIR

idle zodiac
#

OK

light geyser
#

even though its a leave block

swift compass
#

Hi guys. I'm must blocks items from mods. My question is How to do ?

frigid heath
#

@light geyser are you sure you provided the correct Location?

silent veldt
#

Are you certain it's the correct coordinate?

#

^

light geyser
#

yep 100%

frigid heath
#

really strange bug then