#help-archived

1 messages ยท Page 66 of 1

frigid ember
#

instead you can put 3G insteand of M

#

Xms1G -Xms1G

#

oh

#

okay

formal nimbus
#

anyone know what's wrong here?

inland meteor
#

1024M = 1G

frigid ember
#

can i put 5?

heady jolt
#

whatever you want

#

-Xmx5G

#

-Xmx69G

formal nimbus
#

it's saying it can instantiate it

subtle blade
#

inb4 wrong import for Pair. That or the constructor is private

formal nimbus
#

right

#

prob wrong import

subtle blade
#

Pair.of() most likely

frigid ember
#

sorry that im such an idiot, I have never done this before and I get frustrated quickly. I hope this works.

subtle blade
#

I'm just taking shots in the dark. Don't remember off the top of my head

formal nimbus
#

I'm using this one?

#

import org.bukkit.craftbukkit.libs.org.apache.commons.lang3.tuple.Pair;

frigid ember
subtle blade
#

Internal dependency

frigid ember
#

more errors

subtle blade
#

Shouldn't be relying on craftbukkit libraries

heady jolt
#

show your bat file

formal nimbus
#

fixed it

#

import com.mojang.datafixers.util.Pair;

heady jolt
#

normally I think you have to edit something inside windows path or something

subtle blade
#

That's arguably worse lol

formal nimbus
#

;-;

subtle blade
#

If you want to use a Pair, I advise creating your own. They're not too difficult to create

formal nimbus
#

it's working now though D:

#

eh

#

I cba lol

frigid ember
chrome heron
#

what is scrollable strings

frigid ember
#

sorry for these phone pictures, I don't have discord on this laptop

#

this is a clean windows install, wiped all the drives

heady jolt
#

remove the Xms

#

i don't think you really need it ๐Ÿท

subtle blade
#

@formal nimbus

#

Quick easy c/p and you're good to go. Throw it into a utils package PES_SadShrug

frigid ember
#

didnt work

#

I give up, I'll just wait for someone who's willing to do it for me :/

heady jolt
#

host services is welcoming you

frigid ember
#

I don't have money for those. And the amount of RAM they give you is ridicilous

marsh nova
#

don't use craftbukkit or mojang pair, both are terrible ideas

frigid ember
#

1.5 GB ram for 10$ per month

#

no way

sturdy oar
#

@frigid ember

#

do you still have that issue

#

I know how to fix

#

maybe

frigid ember
#

I turned off my laptop, I don't think this can handle a minecraft server anyways, it's a 2 core i5 M520

#

this is a probook from 2010

sturdy oar
#

the issue is that you prob. have a 32bit java version

frigid ember
#

oh

#

I'll check later

sturdy oar
#

try and to java -version , if it doesn't contain "64-Bit" it is 32bit

frigid ember
#

I could host it on my main PC, but I can't leave that running 24/7

#

alright

#

will do

#

later though, I need to do something else lmao. I get tired quickly.

sturdy oar
#

k

formal nimbus
#

@formal nimbus
@subtle blade

#

thanks

bleak osprey
#

hey, does anyone know about bungee?

keen compass
#

make sure you also updated those mc servers config file to use those ports

bleak osprey
#

i did ๐Ÿ˜ฆ

wind dock
#

hey guys so I have a server and for some reason im an alex skin on the server, even though my skin isnt an alex

#

Any way I can fix?

heady jolt
#

online-mode: true

wind dock
#

oh

#

I forgot

#

thnx

keen compass
#

ah someone managed to spot the problem

vestal patrol
#

I am coding a plugin and when I put the jar in my plugins folder, nothing shows up in /pl

#

pleas help

crimson cairn
#

errors?

vestal patrol
#

No errors

#

i can send you my code

crimson cairn
#

plugin.yml?

#

they should be in the jar

vestal patrol
#

Wdym

crimson cairn
#

during compilation

#

the code and plugin.yml should be in the jar

vestal patrol
#

this is what i have

crimson cairn
#

open up the jar with 7 zip

wind dock
#

in luckperms, does the parent inherit the childs permissions or is it the other way around?

vestal patrol
#

Yeah

#

it is

wind dock
#

so if i set the rank vip to have the parent default, will the vip rank get the default perms?

crimson cairn
#

you would think children inherit from the parents, no?

wind dock
#

no but

#

will the parent also inherit form the child

crimson cairn
#

thats weird @vestal patrol

wind dock
#

is it a two way thing

#

or a 1 way thing

vestal patrol
#

look in ur dms

crimson cairn
#

should be 1 way, but i never used luckperms

vestal patrol
#

i send u code and things

frigid ember
#

"displayName" is both chat and nick I assume, if im looking for a plugin that modifies only the players name that hovers above them, what am I looking for?

clever hornet
#

why does ENDER_EYE not work in my plugin when its put item: ENDER_EYE but every other item works

naive stratus
#

Best way to prevent falling block from falling? I've tried:

@EventHandler(priority = EventPriority.HIGHEST)
public void onBlockPhysicsEvent(BlockPhysicsEvent event) {
    Block block = event.getBlock();

    if (block.getType().equals(Material.SAND)) {
        event.setCancelled(true);
    }
}

But it has no effect.

#

And it doesnt seem like I can get to its gravity either. I've tried casting it to a falling block, but it will allow me to do so because I cant cast it.

wind dock
#

so another thing

#

i have this plugin

#

and when i try to do some troll commands it says

#

"This command has been disabled because there is no recognized backing library available."

#

any solution?

#

?

sturdy oar
#

read the damn wiki

#

it took me 5s to figure out the issue

wind dock
#

I dont know what a backing library is ok

vernal spruce
#

I mean by the name..

#

its a library behind wich most likely means another plugin

wanton delta
#

To be fair the plugin overcomplicated the language a bit

vernal spruce
#

well to administrate a server you should have the minimum knowledge..

digital sphinx
#

Why it crashed

wanton delta
#

?paste

worldly heathBOT
wanton delta
#

Use that instead

vernal spruce
#

fk me i clicked on it

wanton delta
#

lmao

digital sphinx
#

Why it crahed?

vernal spruce
#

its not even

#

the full log?

digital sphinx
#

Yes. It is the full log

paper pumice
#

I'm trying to sort HashMaps

vernal spruce
#

i mean what full log it stops at some commands

#

no error or anything

#

hmm why would it say

digital sphinx
#

i mean what full log it stops at some commands
@vernal spruce I dont know

vernal spruce
#

ur casting comparable to a player

paper pumice
#

@vernal spruce me?

vernal spruce
#

yeah somewhere

paper pumice
#

Where

vernal spruce
#

Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer cannot be cast to java.lang.Comparable

#

sadly doesnt rly say exactly where

paper pumice
#

This is my data file

#

Is this why?

#

I'm using UUIDs in the flatfile

#

And I'm using Player in the HashMap

vernal spruce
#

are you converting them to player from them?

paper pumice
#

I dont think so

#

is that why

vernal spruce
#

i mean uuuid =/= player

#

also hmm

paper pumice
#

Oh shit

vernal spruce
#

player.put(Bukkit.getPlayer(UUID.fromString(players)),

paper pumice
#

I changed <Player, Integer>

#

to <String, Integer>

#

String being the UUID

#

And it worked

vernal spruce
#

k then

paper pumice
#

Thank you I appreicate it man

#

been bugging me for hours

vernal spruce
#

tbh you found the solution

#

rather than me

paper pumice
#

but you helped lol

#

I didn't know it was a comparable

earnest grove
#

I need ideas for how to show player private messages in chat
Like the chat format

mental coral
#

@earnest grove are you developing this yourself or looking for a plugin to do it?

earnest grove
#

myself

keen compass
#

I mean what formatting do you really need o.O

mental coral
#

You can get the player's instances and use TargetPlayer.sendMessage(ChatColor.GRAY + '' + ChatColor.ITALICS + "Whatever you sent");
Same with the sender.

#

Just format sendMessage however you want. You can use chat formats and string manipulation, placeholder api, etc.

#

sendMessage would include who it came from and such as well.

subtle blade
#

sendMessage would include who it came from and such as well.
You're thinking of chat()

#

sendMessage() sends a message to a player, chat() sends a message from a player to the server

#

(erhm - it imitates a client sending a message to the server lol)

paper pumice
#

How can I get an index in Set of Entries?

#
        Set<Entry<String, Integer>> entrySetSortedByValue = sortedByValue.entrySet();```
#

Such as this

subtle blade
#

Sets are not random accessible. They're not ordered

#

There are no indices

paper pumice
#

But if I have this:

        Bukkit.broadcastMessage("HashMap after sorting entries by values ");
        Set<Entry<String, Integer>> entrySetSortedByValue = sortedByValue.entrySet();
        for (Entry<String, Integer> mapping : entrySetSortedByValue) {
            Bukkit.broadcastMessage(Bukkit.getPlayer(UUID.fromString(mapping.getKey())) + " ==> " + mapping.getValue());
        }```
How can I get the 4th entry?
#

Or would I just to a for statement and stop when I want to get the value

boreal tiger
#

A set doesnt have the 4th entry

#

think of it like a bag

#

you cant order stuff inside a bag

#

you cant get the "4th item in a bag"

paper pumice
#

But I have an ordered list.

#

Let me show you my full code, it might make more sense.

#

This code is a method to get values of players in my flatfile, and order them.

keen compass
#

looks like you would be better off with an object instead of a bunch of maps

boreal tiger
#

Set<Entry<String, Integer>> entrySetSortedByValue = sortedByValue.entrySet();
this is not sorted
Its a set, it has no order

#

even if you sort it first, it wont be sorted in the set

#

also you should try hitting the Enter key here and there ๐Ÿ˜‚

#

it helps readability xD

tiny dagger
#

a set can't be ordered

#

unless is a navigable set

keen compass
#

I think that has already been covered ๐Ÿ˜‰

tiny dagger
#

but that's different altogheter

mental coral
#

@subtle blade

You're thinking of chat()
No, I just worded it weird. You would want to include who it was from and sent to in sendMessage. They we're asking specifically for private messages.

#

Unless I misunderstand chat()

subtle blade
#

Ah, no, I missed that part

#

You're right then ๐Ÿ™‚

lofty otter
#

how do I check if a CommandSender is the console?

#

i dont see an interface for the console command sender so i cant do an instanceof

subtle blade
#

ConsoleCommandSender

distant sorrel
#

That's not in the api

subtle blade
#

It most definitely is lol

distant sorrel
#

uh no

lofty otter
subtle blade
#

Oh well you could have said you were on Bungee

lofty otter
#

ah right

#

yes im on bungee

#

oops

#

so ideas?

subtle blade
#

Can bungee send commands through the console? I thought that was just players?

distant sorrel
#

yes

lofty otter
#

yeah you can

subtle blade
#

Clearly I'm not familiar enough with it

frigid ember
#

Hi! Im making the bridges minigame like mineplex have with plugin which i found. I want to know how should I set randomly spawn ores on islands? Do I need put some code in plugin or? If anyone know please reply

subtle blade
#

Do I need put some code in plugin or?
Yea, if you're making a plugin, generally you need to put some code into it. ๐Ÿ˜•

frigid ember
#

Its not my plugin, i buy it on spigot

true anvil
#

How do i get how mant sugar cane blocks a player has broke?

tiny dagger
#

imagine the day we get plugins that writes themself ๐Ÿค”

frigid ember
#

But plugin get removed

subtle blade
#

It's not quite that simple

#

You would have to decompile it and edit that. If you're a novice with Java, you will struggle

#

I'd also put money on it being obfuscated because screw premium resource authors

distant sorrel
#

return ProxyServer.getInstance().getConsole().getClass().isAssignableFrom(subject.getClass()); so i assume i will have to do this

lofty otter
#

hacky

boreal tiger
#

๐Ÿ‘€

#

what is that monstrosity lmao

lofty otter
#

to check whether a subject has a permission

distant sorrel
#

that's how you check if it's a console lol

#

that's the whole method

true anvil
#

int scane = p.getStatistic(Statistic.MINE_BLOCK, Material.SUGAR_CANE_BLOCK); this throws an error there is no statistic same for SUGAR_CANE how do i fix that

subtle blade
#

That looks horrendous

distant sorrel
#

That's all for the lack of the api ๐Ÿ˜‰

subtle blade
#

Version, christo?

true anvil
#

1.8

frigid ember
#

Choco, is there any site which can explain it? I know how to replace it

#

But idk how they would spawn in groups

#

Like 5 diamondores togather

subtle blade
#

The issue is that in decompiling the plugin, the source is going to be in significantly worse shape. Not to mention there may be decompile errors you would also have to resolve

#

And if it's obfuscated, that's a whole other hurdle

frigid ember
#

That wont be problem

#

Can't we edit the face the block will be?

#

Just ores in groups

true anvil
#

int scane = p.getStatistic(Statistic.MINE_BLOCK, Material.SUGAR_CANE_BLOCK); this throws an error there is no statistic same for SUGAR_CANE how do i fix that
@true anvil

subtle blade
#

I asked you a question

#

What version

true anvil
#

1.8

subtle blade
#

And what's the error?

true anvil
#

hold on let me get the full error

subtle blade
#

?paste it preferrably (or some other paste site, whatever)

worldly heathBOT
true anvil
#

im in the middle of a test for school so it may be about 10 mins before i can recreate it

subtle blade
#

Sounds good. Take your time

mental bone
#

Hello, I have a pb with my LinkedList my nickname is duplicate when I write the command /classement

subtle blade
#

I don't even know what you're asking

true anvil
#

^ Atleast show the code

mental bone
#

wait ^^

#
    LinkedList<String> classement = new LinkedList<String>();

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String msg, String[] arg3) {
        if(sender instanceof Player) {
            Player player = (Player) sender;
            classement.add(player.getName());
            for(int i = 0; i < classement.size(); i++){
                player.sendMessage("\nPlayer Classement");
                player.sendMessage("-----------------------------------");
                ListIterator li = classement.listIterator();
                while(li.hasNext()){
                    player.sendMessage("TEST : " + li.next() + " with " + player.getStatistic(Statistic.PLAYER_KILLS) + " player kills.");
                }
            }
        }
        return false;
    }```
earnest grove
#

@subtle blade

subtle blade
#

No reason for that to be a linked list. An ArrayList would suffice would it not?

earnest grove
#

I need ideas for how to show player private messages in chat
Like the chat format

true anvil
#

yeah

#

thats what i would do

mental bone
#

the LinkedList is better for this

#

it *

subtle blade
#

Though you have to understand that List implementations allow for duplicate values

frigid ember
#

Anyone for blocks direction?

subtle blade
#

Not really. There's no justifiable reason for it to be one

mental bone
#

I have write only time the commands

#

2

subtle blade
#

Yes. Lists can hold duplicate values

#

So if you run it a third time, you're going to see three of those Player Classement messages with 3 entries

#
            classement.add(player.getName());
            for(int i = 0; i < classement.size(); i++){
                player.sendMessage("\nPlayer Classement");
                player.sendMessage("-----------------------------------");
                ListIterator li = classement.listIterator();
                while(li.hasNext()){
                    player.sendMessage("TEST : " + li.next() + " with " + player.getStatistic(Statistic.PLAYER_KILLS) + " player kills.");
                }
            }```
#

What you're doing here is, "Send this message x amount of times, where x is the amount of entries"

#

If you have 3 entries, it's going to send that message 3 times. 4 entries? 4 times. So on and so forth

mental bone
#

ok but i have only 1 entries no ?

earnest grove
#

lopps

#

I need ideas for how to show player private messages in chat
Like the chat format

subtle blade
#

You add an entry every time you send the command

mental bone
#

mhhhhhh

#

Ok

subtle blade
#

So you can ensure before adding it that they are not already there. That, or you may use a HashSet though I'm not sure that's necessary

mental bone
#

I pref to verify if is already exist

subtle blade
#

I too would do the same

mental bone
#

and

#

when i kill a player

#

wait xd

#

1st and 2nd

marsh lynx
#

Hi!

#

Does anyone know how to swap biomes on 1.8.8?

#

For example, I would like to replace Ocean with something else

#

I've tried everything from spigot

#

Nothing worked

ember salmon
#

you'd probably have to download your world into MCEdit

#

idk of a way to do it in game.

marsh lynx
#

Nope, I need to do so from a plugin

ember salmon
#

can't help ya

#

I have a question though: It seems to have been a common one, but i havent seen it answered yet:
*** Error, this build is outdated ***
*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***
*** Server will start in 20 seconds ***

#

This keeps popping up even though i have the latest spigot

subtle blade
#

You likely don't

#

Just because you're on the latest version of Minecraft does not mean you're on the latest version of Spigot

#

For any given major Minecraft release, there are hundreds of Spigot releases

paper compass
#

And how long do we have to wait

dusty topaz
#

I'm guessing it means that someone has to manually review your page or whatever, and you will have to wait as long as it takes for someone to review your page

paper compass
#

No no no, someone bought something on the store worth $45

#

And it says that

dusty topaz
#

then your paypal probably isn't verified, or its a new store

tiny dagger
#

they ran out with your money

visual glade
#

Anyone know a plugin that automatically transfers any items picked up to a chest if the player's inventory is full? Please ping me ๐Ÿ™‚

river wasp
#

anyone else have problems with worlds getting overwritten when you start up a server?

dusty topaz
#
                player.addPotionEffect(PotionEffectType.INCREASE_DAMAGE.createEffect(Integer.MAX_VALUE, 1));
                Bukkit.broadcastMessage("Applying potion effect");
#

Can confirm the potion effect is not applied

#

Though the debug message does come up :^)

zenith siren
#

Try player.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, <duration in ticks>, <amplifier/strength of the effect>))

#

@dusty topaz

ember salmon
#

where do i enter this command for build tools java -jar BuildTools.jar --rev latest

subtle blade
#

That's what you use to run it

lament wolf
#

I have this error which suddenly appeared whereas since the last time I launched the plugin I have modified it very little.

subtle blade
#

Open a command line and run that command

#

(in the same directory as BuildTools - preferably its own)

lament wolf
#

Do you know why ?

ember salmon
#

my server is through a hosting site

mental bone
#

YES

#

OK

#

@subtle blade LinkedList duplicated my list xd

#

but i use Array

#

and i's fix ๐Ÿ™‚

subtle blade
#

dritch if you're using a host, it's likely they let you just pick a server software

dire horizon
#

ey hay algun plugin tipo el slimefun para la 1.14.4

#

??

subtle blade
#

No need for BuildTools

#

English server, jusosi, but I see Slimefun & 1.14.4, I'm not sure that's available. It was abandoned to my knowledge

mental bone
#

But i have a new problems with the ArrayList

#

we didn't see the nickaname of other payers

#

players *

dire horizon
#

hay algun plugin parecido a el slime fun para la 1.14.4?

dusty topaz
#

@zenith siren they do the same thing

#

and neither work

dire horizon
#

is there any plugin similar to the slime fun for 1.14.4?
?

frigid ember
#
                    block.setBlockData(Material.BARREL.createBlockData());

                    Directional data = (Directional)block.getBlockData();
                    data.setFacing(BlockFace.NORTH);
                    block.setBlockData(data);

mhm it seems to be not working, it that a correctly way to put a direction?

subtle blade
#

block.setBlockData(Material.BARREL.createBlockData(d -> ((Directional) d).setFacing(BlockFace.NORTH));

#

(would make that BlockData a constant though)

frigid ember
#

Can't we edit this at runtime and update it like customName?

subtle blade
#
private static final BlockData BARREL_NORTH = Material.BARREL.createBlockData(d -> ((Directional) d).setFacing(BlockFace.NORTH));

// elsewhere
block.setBlockData(BARREL_NORTH);```
#

What do you mean?

frigid ember
#

I mean, if I place a block with my own hand, at server runtime or with an command can't I modify directly the facing direction like I've tried to do?

subtle blade
#

Oh you most definitely can. Though in this case here you have it set to a constant value every time so it's best to create a constant

frigid ember
#

Alright, I see what you mean

subtle blade
#

If you're accessing an existing block in the world you're likely better off to getBlockData(), modify and setBlockData()

#

This way you wouldn't mess with existing states

#

Though here you're just always setting it to a barrel and always setting it to face north.

frigid ember
#

Alright thanks

subtle blade
#

It's a potion effect, you are aware of that, right?

inland depot
#

Yeah, also I deleted the message because I thought it wouldn't let me edit it but it was my wifi.

#

I know it's a potioneffect but how do I set the duration using the api?

#
        
        PacketContainer packet = plugin.getProtocolManager().createPacket(PacketType.Play.Server.ENTITY_METADATA);
        packet.getIntegers().write(0, glowingPlayer.getEntityId());
        WrappedDataWatcher watcher = new WrappedDataWatcher();
        Serializer serializer = Registry.get(Byte.class);
        watcher.setEntity(glowingPlayer);
        watcher.setObject(0, serializer, (byte) (0x40));
        packet.getWatchableCollectionModifier().write(0, watcher.getWatchableObjects());
        
        try {
            plugin.getProtocolManager().sendServerPacket(sendPacket, packet);
        } catch (InvocationTargetException e) {
            System.out.println("[vCustomEnchants] There was an issue with one of the glowing enchants!");
        }
            
    }```
frigid ember
#
if (block.getType() == _block.getType()) {
                if (block.getLocation() == _block.getLocation()) {
                    System.out.println("Should be the same type & location but nothing here...");
                    event.getPlayer().sendMessage("error message right here");
                    event.setCancelled(true);
                }
            }

https://i.imgur.com/yDV36tQ.png and the code does, nothing, the type is the same and the position is the same, what I've done wrong? ๐Ÿค”

inland depot
#

send the full method

frigid ember
#
public void onBlockBreak(BlockBreakEvent event) {
        BlockState block = event.getBlock().getState();

        for (BlockState _block : blocks) {
            if (block.getType() == _block.getType()) {
                if (block.getLocation() == _block.getLocation()) {
                    System.out.println("Should be the same type & location but nothing here...");
                    event.getPlayer().sendMessage("error message right here");
                    event.setCancelled(true);
                }
            }

            System.out.println(block.getType());
            System.out.println(_block.getType());
            System.out.println(block.getLocation());
            System.out.println(_block.getLocation());
        }
    }
inland depot
#

also replace "==" with ".equals(your object here)" in the line if (block.getLocation....)

#

do you have the @EventHandler annotation written on top

frigid ember
#

yup

#

equals is working thanks

storm vessel
#

In your opinion, what is the best dedicated server provider? I got screwed by my old host

frigid ember
#

Btw, can I make json objects and save them in the servers data for saving?

#

Or what is the best method of saving files?

inland depot
#

@subtle blade ik that its a potion effect but i dont see the method to set the duration because the object is a packetcontainer

#

and the packettype is PacketType.Play.Server.ENTITY_METADATA

clever hornet
#

Could anybody recommend me some top tier free lootbox/crate plugins that are free to install on spigot

#

For spigot 1.8.8

frigid ember
#

My next question is, how I can put a nametag or somes on a chest? ๐Ÿค”

#

Does I need to use packet or something?

#

Because we can show a custom name on a chest right?

boreal tiger
#

its a hologram

frigid ember
#

What do you mean?

hallow surge
#

Johnnnny use crazy crates

signal yarrow
#

If you want the inventory name to be changed, you need to rename the chest in an anvil else if you want the name to hover over the block chest, you need an invisible named armor stand. You can also use holograms plugin if you want so. @frigid ember

frigid ember
true anvil
orchid garden
#

crossed out link so im not banned lmao

tiny dagger
#

you could use my holo class

subtle blade
#

It's very possible the sugar canes just didn't have a statistic back in 1.8

true anvil
#

oof

#

so how do i get how many they have broke?

#

or what would be my best option

boreal tiger
#

either stop being a dinosaur or using the BreakBlockEvent to count the sugarcanes that are broke

true anvil
#

but i like being a dinosaur -_-

#

ill try block break event

boreal tiger
#

just saying, 1.8 is almost 6 years old

true anvil
#

maybe i should just move to 1.15 i mean player heads dont work nothing

#

ik but its the best!

#

1.15 is trash

boreal tiger
#

why? you can get similar pvp mechanics in 1.15

true anvil
#

ik but its not the same as the old school

#

ill prob end up doing that

ember salmon
#

help: my server has a space in the world name, and its incompatible with most plugins, as they look for a single string. any ideas other than renaming the world and all the files that reference it?

tiny dagger
#

'Your name'

wanton delta
#

100s of features between 1.8 and 1.15

#

u should

#

consider that

dark shuttle
#

i tried to update Furnace BlockState when FurnaceSmeltEvent got fired, but it went wrong in 1.15.2, the smelt item wont get decreased, it ended up duplicating items, this thing works fine in older versions

#

tried to decrease it manually, but it just create another duplication issue when i tried to FurnaceInventory#setSmelt, it drops the smelt items and its being duplicated

boreal tiger
#

FurnaceSmeltEvent is triggered when it finishes smelting

clever hornet
#

Whats a good lobby plugin for 1.8.8

boreal tiger
#

just search on spigot's forums. there are probably so many

clever hornet
#

Yeah fair enough

dark shuttle
boreal tiger
#

ah, I think you need to user another event then.
that event is called when it finishes

#

oh wait

silk cape
#

Does anyone know how to disable mob ai

dark shuttle
#

programmatically or by plugin?

silk cape
#

im not development

#

if it is not big code

#

plugin should be the best option

versed forge
#

anyone know how to remove default join and leave msg

karmic socket
tiny dagger
#

the grid?

karmic socket
#

Oh sorry no ๐Ÿ˜„

#

The "Bank" stuff

#

I'm using a custom scoreboard (Scoreboard revision), and this stuff hides it for a sec

#

And it can be problematic for plugins what update more often the money

#

Like jobs, mcmmo

#

Or maybe just jobs

#

But it's super annoying ๐Ÿ˜„

versed forge
#

that look like one of you plugins making the scoreboard so when u get or spend money u can see ur balance bud so have a look at your plugins ๐Ÿ™‚

brisk mango
#

LivingEntity#setAi(boolean ai) @silk cape

true anvil
#

The method getMaterial(String) in the type Material is not applicable for the arguments (int)

karmic socket
#

@versed forge yea bot i don't know which one ๐Ÿ˜ฆ

true anvil
#

i upgate to 1.15 and now im getting this error when i try getting material

#
      List<String> lore = new ArrayList<>();
      ItemStack item = new ItemStack(Material.getMaterial(materialId), amount);
      ItemMeta meta = item.getItemMeta();
      meta.setDisplayName(chat(displayName));
      byte b;
      int i;
      String[] arrayOfString;
      for (i = (arrayOfString = loreString).length, b  = 0; b < i;) {
          String s = arrayOfString[b];
          lore.add(chat(s));
          b++;
      }
      meta.setLore(lore);
      item.setItemMeta(meta);
      inv.setItem(invSlot - 1, item);
      return item;
      
  }```
subtle blade
#

Well that's decompiled

#

So

versed forge
#

lol wow

true anvil
#

no its from a youtube video

subtle blade
#

There is absolutely no way someone wrote that by hand

frigid ember
#

@subtle blade Think you could check my PM please?

true anvil
#

I did make it but i followed a yt video

dusty topaz
#

And no, @true anvil, you didn't

true anvil
#

lol its from VerveDev

dusty topaz
#

looks a tad different.

versed forge
#

Anyone delt with removing defualt minecraft join/leave msg

subtle blade
#

LMAO THAT FACE

true anvil
#

that ss is the second time he did it

dusty topaz
#

he saw the code this guy sent

surreal rover
#

For some reason, my plugin spams the PlayerGameModeChanged i tried to stop the event by using SetCancelled, I change gamemode and just s p a m. I started yesterday so its abit bad.------> Code https://pastebin.com/raw/N3vVZMtP
(No errors, just shuts down the server.
LOG:
--- This is where i typed gamemode survival 4gdatawentto2g
[23:03:37] [Server thread/INFO]: Stopping server
[23:03:37] [Server thread/INFO]: [4gtest] Disabling 4gtest v1.14.4
[23:03:37] [Server thread/INFO]: EndingThePlugin
[23:03:37] [Server thread/INFO]: Saving players
[23:03:37] [Server thread/INFO]: 4gdatawentto2g lost connection: Server closed
[23:03:37] [Server thread/INFO]: 4gdatawentto2g left the game
[23:03:37] [Server thread/INFO]: Saving worlds
[23:03:37] [Server thread/INFO]: Saving chunks for level 'world'/minecraft:overworld
[23:03:40] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[23:03:40] [Server thread/INFO]: Saving chunks for level 'world_nether'/minecraft:the_nether
[23:03:42] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[23:03:42] [Server thread/INFO]: Saving chunks for level 'world_the_end'/minecraft:the_end
[23:03:43] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[23:03:43] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[23:03:43] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[23:03:43] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
Sorry for the long message but ye

dusty topaz
#

thats why he looks like that

#

send me the video link then @true anvil

#

I highly doubt someone coded that

surreal rover
#

That code looks codable

dusty topaz
#

ah, so i'm not the only one who does for loops using byte int comparisons

true anvil
#

his is a little different from that lmao, I couldnt get mine working and thats what a friend told me to try

#

ima recode it

dusty topaz
#

i love how the story changes

#

๐Ÿคฆ take it with dignity at least

true anvil
#

well at first i had what he had in the video

surreal rover
#

oh ive been in intellij for 4 hours

#

@dusty topaz sorry for the ping but how do you get ur status like that?

#

like the playing game

#

cuz mine is just PluginV6 IntelliJ IDEA

limber marlin
surreal rover
#

java.lang.NoClassDefFoundError: Could not initialize class com.sk89q.worldguard.WorldGuard

dusty topaz
#

its an intellij plugin

surreal rover
#

Name?

silk cape
#

help with deluxe menus??

ebon charm
#

hey, my server is crashing i think every 22-24hrs, and idk why, here's the code: java.lang.NullPointerException: Exception in server tick loop at net.minecraft.server.v1_8_R3.LoginListener.d(LoginListener.java:155) at net.minecraft.server.v1_8_R3.LoginListener.a(LoginListener.java:151) at net.minecraft.server.v1_8_R3.NetworkManager.l(NetworkManager.java:312) at net.minecraft.server.v1_8_R3.ServerConnection.c(ServerConnection.java:145) at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:875) at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:378) at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:713) at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:616) at java.lang.Thread.run(Thread.java:748)

bronze marten
#

That doesnt tell much tbh

ebon charm
#

ye ik

#

There isn't more details

silk cape
#

left_click_requirement:
requirements:
Item:
type: has item
material: 'SKULL_ITEM'
amount: 10
deny_commands:
- '[message] &cYou do not have enough heads.'
- '[refresh]'

#

how to check does player have any skull_item data:3

ebon charm
#

work with bytes

#

i think

sturdy oar
#

1.8 ๐Ÿ˜‚

#

glhf

wind dock
red zenith
#

Well, I think the obvious issue here is your poor connection: 4gdatawentto2g lost connection: Server closed ๐Ÿ˜›

finite stag
#

Someone has stolen my plugin from bukkit, and is hosting it on Spigot, despite me already having a version of my plugin hosted there. On the offender's spigot plugin page, he literally links to my Bukkit plugin. What do? Note: I go by ExiFlame on Spigot and SailStun on Bukkit.

My bukkit plugin: https://dev.bukkit.org/projects/portablechests
My spigot plugin: https://www.spigotmc.org/resources/portablechests.77408/
Offender's spigot plugin: https://www.spigotmc.org/resources/portablechests.77473/

keen moth
#

Report the resource

finite stag
#

Okay I have

rotund fulcrum
#

is there a way to self-host a server on a VPN?

naive stratus
#

What are my options for rendering 3d text/graphics? In Spigot, not existing plugins.

rotund fulcrum
#

i am not looking to dox myself

#

ping me if you can answer me

finite stag
#

@rotund fulcrum Do you mean a VPS (virtual private server)? I believe with some VPN providers you can setup port forwarding, but it would come with the cost of added latency.

rotund fulcrum
#

a

#

i don't wanna pay because i am broke

#

lol

#

@finite stag but technically yes i do mean VPS

finite stag
#

@rotund fulcrum Try the Google Cloud. it comes with a large free trial, and it's pretty ok. You need to be quite experienced with Linux however.

#

I'm pretty sure you can find some tutorials online for it

rotund fulcrum
#

im trying to do beta

#

@finite stag don't have linux either

mental bone
#

when i try

#

if(classement.contains(player.getName)) return false;

#

it's fix but

#

we can see only 1 nickname

lusty vortex
#

@mental bone If you don't want duplicates in your collection, use something like HashSet

#

It wont allow for duplicated entries

mental bone
#

Ok i have test LinkedList and Array

#

Ty god ! ๐Ÿ˜ฎ

#

but my 2nd problem is :

lusty vortex
#

Idk what you're showing me

#

The kills isn't updating?

#

I think what you're looking for is a hashmap

mental bone
#

it's update but we can see

#

on left screen 1 kills and the right screen 12 kills

lusty vortex
#

Idk what you mean

mental bone
#

and it's always update

lusty vortex
#

Show your code

#

So I can understand better

mental bone
#

yes ^^ sorry

lusty vortex
#

What's your intention here?

#

To track their kills?

#

Atm what you're doing is printing the user in the collection's name, and then printing the user who EXECUTED the command's kill's

#

So:
SomeGuyInHashSet + player.kills + " kills"

#

Is that your intention?

mental bone
#

yes

#

i want a leaderboard of kills

#

kills leaderboard *

lusty vortex
#

So "classement" can contain OFFLINE player kills too?

#

I believe the stats are binded to online players only, and stored inside the player's file.

#

So you might have to keep track of their stats yourself

mental bone
#

classement it's scoreboard in french ^^

#

arf

#

Normally player.getStatistic (Statistic.PLAYER_KILLS) does it automatically

#

and no he can contains offline player kills too ^^

finite pilot
#

hi, am creating a server for friends

#

where do I put this command?

#

crazyenchantments.limit.#

#

Thank you so much

#

LEGEND

hallow surge
#

is there a way to use itemstacks cross class

haughty stag
#

You can send the itemstack object through a method to the other class, or make the itemstack object global and static and just call on it from other classes. Although the class its stored in would need to be also stored as a static instance. First step is more appropriate.

long crow
wooden harness
#

smh you dont need to put that in every channel

#

report it to the plugin author maybe?

long crow
#

but

#

i dont know the plugin author's discord ID is

wooden harness
#

you probably wont get their id, but I'd assume they include how to contact them on their spigot page

buoyant path
#

whats the best way to stress test a server? I'm coding a huge plugin and I wanna know how optimized it really is

keen compass
#

best way is to create some scenarios in how it would be used. Startup the server that a profiler attached and maybe a GC profiler. Then lets say you want to stress test the commands, just make a whole bunch of fake players that runs commands from your plugin and monitor the usage of resources

#

incrementally increase the load until it crashes

#

only you know how to stress test your server since you are the one that made your plugin

haughty stag
#

@long crow I think your problem is that white square. Looks ominous.

#

wow, he really did post it in every single channel. Even the spigotcraft channel.

unreal hedge
#

Lmao hacks Discord and posts in announcements XD

jaunty night
#

Judging by the amount of reflection exceptions it might be a NMS issue, like an incompatibility somewhere.

#

but it's hard to tell because we can't reference it to the source code

haughty stag
frigid ember
#

how i can Bold and Give Color at text at the same time, im using

lore1.add(ChatColor.RED + ChatColor.BOLD + "Doubled" + ChatColor.GOLD + "Health Points & Damage");
unreal hedge
#

ChatColor.RED + "" + ChatColor.BOLD +

red zenith
#

try putting a + '' + between ChatColor

unreal hedge
#

Yeah, you can use .toString() but "" isn't as long ;P

frigid ember
#

is does not effect the ChatColor.RED ?
"Doubled" Still red ?

unreal hedge
#

Note that if you are using a lot of chat colours, just make a method

public static String toColor(String message){
    return ChatColor.translateAlternativeColorCodes('&', message);
}```
frigid ember
#

ah can use the "&" too thanks dude

unreal hedge
#

You should get in the habit of making a messages.yml and making all messages configurable .-.

#

nps

dry kiln
#

How would I go about giving a boss bar a namespaced ID

#

so my plugin can display multiple at once

blissful verge
#

Anyone here have experience with vault api?

#

If you do, how tf do I check the players balance?

#

Anyone got experience with luckperms api, how tf do I check a players group

fleet crane
#

import java.util.List;

public class Test<T extends Test<T>>
{

    private List<Test> list;

    public void foo(Test test)
    {
        for ( Test t : test.list ) // ERORR: incompatible types: java.lang.Object cannot be converted to Test
        {
            System.out.println( t );
        }
    }
}
#

why doesn't this compile?

hollow crystal
#

Md_5 ore someone do spigot server exist for bedrock edition

quartz trench
#

No Nukkit is the closest thing

hollow crystal
#

Nukkit ore bukkit

quartz trench
#

Nukkit

#

or use GeyserMC plugin with Spigot

hollow crystal
#

Where I found it

quartz trench
#

use google

hollow crystal
#

Nukkit, do plugins for spigot work on nukkit

fleet crane
quartz trench
#

No it uses a similar but different API

#

it has it's own plugins on it's site

#

there is a signifigant community though

#

@hollow crystal

hollow crystal
#

Thanks

quartz trench
#

no problem

#

@blissful verge to check for group just check for group.groupname permission

frigid ember
#

is anyone experienced with protocollib ?

#

i want to know which packet is sent when a player spawns

sturdy oar
#

I know

quartz trench
frigid ember
#

can... can you tell me?

sturdy oar
#

well I remember spawning players with NMS and I used these packets in order to make them visible

frigid ember
#

named entity spawn

#

uh ok

sturdy oar
#

PacketPlayOutPlayerInfo, PacketPlayOutNamedEntitySpawn
i think those are definetively sent when a player joins or spawns

#

there may be more

frigid ember
#

yeah according to the protocol wikia

#

it is player info

#

and then smth else right after

#

seems like named entity spawn

#

thanks

chrome edge
#

I use AsyncPlayerPreLoginEvent for getting information from database and make a class that contains item stacks from database but timing shows the event is causing delay. What should I do for it?

sturdy oar
#

are you doing it async

chrome edge
#

I've tested with only database. It works without delay but whenever I use itemstack method it causing delay

#

Yes I do

#

I'm %100 sure about it

#

I only use AsyncPlayerPreLoginEvent for that

fleet crane
#

AsyncPlayerPreLoginEvent wont even appear on timings

#

so no idea what youre reading

chrome edge
#

I was asking same thing. In paper it shows "playerloginevent". Isn't it weird?

sturdy oar
#

well this is not paper -.-

fleet crane
#

well this isn't paper help

sturdy oar
#

spigot still has timings v1 am I right

tiny dagger
#

md5, why is the previous names tab from profile public?

fleet crane
#

because people should know who you used to be

sturdy oar
#

md_5 do you have any idea of how the new RGB support color in text is going to be implemented into spigot

tiny dagger
#

my names are just a variation of it tho

fleet crane
#

you just use the component api, its not hard

#

though it is possible to use the old-style API if you're really desperate

chrome edge
#

md_5, is event priority works with order in async?

fleet crane
#

yes, why wouldn't it

chrome edge
#

Oh okay. I'm trying to understand this issue -_-

hollow crystal
#

Please can spigot fix a download for bedrock.๐Ÿ™ƒ

#

;)

#

@fleet crane

sturdy oar
#

don't ping dude

quartz trench
#

bruh use geysermc if u rly need spigot for bedrock

#

no one here uses bedrock normally this is the spigot server for java edition

hollow crystal
#

O excuse me @sturdy oar

#

@quartz trench wats geysermc

quartz trench
#

its a bridge server

#

use it as a plugin for spigot

#

or run it standalone as a proxy

#

the config file is under 10 lines its very simple

#

to run standalone just do java -jar like you do for spigot

hollow crystal
#

Ok thanks so much @quartz trench

quartz trench
#

np

formal nimbus
#

is extending Inventories a bad idea?

tiny dagger
#

is there a way to import authlib only?

clever hornet
#

Anybody know a good free lobby plugin for 1.8.8

chrome edge
#

Is depend option in plugin.yaml waits until the plugins load?

tiny dagger
#

yes

#

same as softdepend

#

but this doesn't stop the plugin from loading if missing

chrome edge
#

so what about loadbefore option?

#

Should I add it in core plugin?

frigid ember
#

that description confusing af

fleet crane
#

loadbefore is a bad option, no idea why it was added

#

its just illogical

tiny dagger
#

i wonder if any of these combinations would freeze the plugin loading

#

i actually see a good thing

#

load before vault

#

so i can listen on pluginloading

fossil shoal
#

How would I softdepend on Vault? What I mean is if I have a field of type Economy in my main class and Vault is not on the server I would get a NoClassDefFoundError, how to prevent it and make Vault optional?

tiny dagger
#

and implement the hook right away

#

so i won't fight any other's plugin race condition with vault

#

softdepend it

#

then just on enable hook or not

frigid ember
#

@fossil shoal Separate vault into a different class and only load that class if getPlugin("Vault") doesn't return null. Maybe a better way to check if its loaded, idk

tiny dagger
#

and neither disabled

frigid ember
#

you can't reference vault via imports while softdepending, cause like you got, java will not find the class and error

fossil shoal
#

Thanks, that's what I thought I would have to do @frigid ember

fleet burrow
#

basically all the yellow ones

frigid ember
#

how are you debugging your plugin in idea?

silent frost
#

you run the server in idea

#

its a well known thing

frigid ember
#

:concern:

silent frost
#

anyway wdym skip frames

#

you can go back up with step out

fleet burrow
#

but if i go one by one it makes the server crash

#

lmao

#

because everything is basically stopped

#

and also, it's a pain in the ass to go through all those frames to get back to my code which i am trying to debug

silent frost
#

just put the breakpoint at your code then

fleet burrow
silent frost
#

or you can make your breakpoint enable only if another breakpoint (which doesn't need to suspend!) has been reached

fleet burrow
#

And if I stay in a breakpoint for too long I get timed out

silent frost
#

oh you're talking about getting timed out

fleet burrow
#

also

silent frost
#

can't really do much about that

fleet burrow
#

darn

silent frost
#

and after a while the server watchdog will kill the server when you stop the breakpoint or whatever

fleet burrow
#

the horror

#

a field of mine just resets it's value for no reason

#

no other code i ran in between

#

the value is just reset

#

After sendDepositMessage is executed shop.item.amount is 2

#

on the second run it resets to 1

ashen stirrup
#

int capitalPercent = (msgLength/capitals)*100;
Should get the percentage of a message which is capitalised.
And then check if capitalPercent >= requiredPercent
capitalPercent often returns numbers like 300, I know it's me being dumb here but maths ain't my thing xD Any help?

fleet burrow
#

you want to do (capitals/msgLength)*100

ashen stirrup
#

I'll try that one sec

frigid ember
#

I really need to do an .yaml file in my resources folder for creating it in my server data?

#

I mean, if I want to make playerNickname.yml can I do it without creating it in the plugin project?

ashen stirrup
#

Strange, double capitalPercent = capitals/msgLength;, returns 0.0 when capitals is 1 and msgLength is 2

chrome edge
#

Is it good to use async, sync everywhere which includes normal bukkit library? (Like creating 500 new itemstack and give to player etc.)

last gulch
#

Strange, double capitalPercent = capitals/msgLength;, returns 0.0 when capitals is 1 and msgLength is 2
try double capitalPercent = (double)capitals/(double)msgLength;

fleet burrow
#

you only need to cast one of them

swift compass
#

Hi. I have a question. How to get a name of clicked button?

ashen stirrup
#

Cheers, it worked ๐Ÿ˜„

#

Hi. I have a question. How to get a name of clicked button?
An actual button? or mouse button

clever hornet
#

is there any up to date multi world plugins for 1.8.8 around?

vernal spruce
#

multiverse not working?

frigid ember
#

I really need to do an .yaml file in my resources folder for creating it in my server data?
I mean, if I want to make playerNickname.yml can I do it without creating it in the plugin project?

clever hornet
#

idk i havnt tried multiverse

vernal spruce
#

@frigid ember yeah

#

you have it in ur project folder incase you write something to it first

#

like a custom config file..

frigid ember
#

Really? If you're coming to my server and I don't know your name, how I'm handling this?

vernal spruce
#

but otherwise you can create it after

karmic socket
#

Hi. Can i somehow show 2 prefix with LuckPerm?
Like: [StaffRank] [PlayerRank] name
Eg.: [Admin] [Legend] name

#

And what i really want is to show the two group/rank (default, moderator) prefixes, lik: [Moderetor] [Player]. I use two tracklist aswell for that

swift compass
#

@ashen stirrup Stone Button have name "Teleport button" and i must get name o this button when player click

ashen stirrup
#

BlockClickEvent, check if the action is right click, check if the block is a stone button and then do whatever

vernal spruce
#

@frigid ember i handle my custom file for players...

#

i listen to joinevent,i create a custom config file(wich will either create one or load the existing one) then i link it to either the player or a handle or smthng..

#

so final product is a HashMap containing player as the key,and the config as the value

#

if you dont feel confident enough rn to make a system i can happly post mine

swift compass
#

@ashen stirrup I write plugin on paper 1.12.2 and didn't have this event

fleet burrow
#

Is it possible to return to the original program flow after a breakpoint was hit?

marsh hawk
#

Anyone know of any good tutorials for entity pathfinding. I want to make something follow the player like a parrot or wolf

hoary parcel
#

use paper and you can do so without nms ๐Ÿ˜„

ashen stirrup
#

How does double jump work?

boreal tiger
#

I have multiple classes that extend an abstract class that I want to load
I also have a Map of "human name" -> Class
is it a bad idea to use reflection to call a static method that loads the stuff I need for each class on that map?

ripe spear
#

Do u know about a npc plugeen for bungeecird

hoary parcel
#

npc plugin on bungeee

#

whhhhyyyyyyy

vernal spruce
#

i guess he wants lobby

#

with npc as servers

ripe spear
#

I need one to telepirt npc to tlepor trleports to servers

hoary parcel
#

so put a plugin onto your lobby...

vernal spruce
#

alot of servers do that..

marsh hawk
#

citizens has the feature to execute commands when you press on em

vernal spruce
#

yeah citizens seems to fit the best

#

or just do one yourself

#

not that hard

marsh hawk
#

or just do one yourself
@vernal spruce no

#

lol

#

not as simple as it seems

ripe spear
#

If i do that i would end up blowing my cimmputer up

#

From the maddne

vernal spruce
#

i already created one in half n hours using all the tutorials out there

ripe spear
#

Ss

#

I tryied it did not go well

vernal spruce
#

a packet based npc doing stuff based on right clicking it

#

but i removed it

#

because the guy didnt liked how it flashed in tab list ๐Ÿ˜‚

ripe spear
#

I foud one

frigid ember
#

@vernal spruce Thanks for your proposal, but yeah, I've done something and, it is working well for now

ripe spear
#

Not on spigot

vernal spruce
#

@frigid ember the api config is really usefull as it has the create/load

#

all in one

ripe spear
#

It needs citizens but it says a priblem occyred

vernal spruce
#

check if citizens have any dependencies

silent veldt
#

@boreal tiger Why would you need reflection to call a static method?

boreal tiger
#

I'm keeping a map of "human name" to class
I cant just call a static method on Class

#

I have a feeling this isnt a good design xD

silent veldt
#

I mean you can definitely call it, I don't know what it would do to your Map

#

I'm not sure what the Map is or what it does or when it's loaded

boreal tiger
#

The configuration file would have say:

test1:
test2:

the map tells me what class I should use to load test1

silent veldt
#

You're using different classes to load areas of a configuration file?

boreal tiger
#

yeah

silent veldt
#

Yeah that does seem like a bad idea

boreal tiger
#

I dont load the config just the section

vernal spruce
#

oh boy

silent veldt
#

Is it a YML file?

boreal tiger
#

yes

#

I pass the MemorySection onto the load method

#

I dont "load" the config

silent veldt
#

Honestly, I would have a ConfigManager class that handles loading the file, and pass a reference to that to the class constructor you are loading

boreal tiger
#

yaml sort of "does that" by default

#

yeah thats what Im doing

#

I just pass the specific MemorySection that was already loaded onto each subclass

silent veldt
#

I get that, but why do you need the Map of classes then?

vernal spruce
#

why not keep all areas loaded into memory?

boreal tiger
#

they are already loaded into memory thats not the point

#

the map is so that I can know what class I'm supposed to use to load that particular section

vernal spruce
#

tell from 0 how you handle the arena

boreal tiger
#

given the key in the yaml file

#

this is not an arena

silent veldt
#

YamlConfiguration keeps the whole file loaded

#

That's not the point though

boreal tiger
#

yeah I get the section from the YamlConfiguration

vernal spruce
#

so in the end what are you trying to achieve?

silent veldt
#

Yeah, and you pass the ConfigurationSection to another class. I've done that before, but I didn't need a Map to do it

boreal tiger
#

the map is because I have different classes for each section

#

if I had test1 how would I know which class I'm supposed to use to deserialize?

silent veldt
#

You said they are all subclasses, correct?

boreal tiger
#

yeah

#

but each class overrides a method

#

so I cant just use the super class

silent veldt
#

The constructors don't

#

If you pass the configuration section to a constructor

#

The constructor for each class will get it

boreal tiger
#

yes but how do I know which class's constructor I should pass that specific section?

#

thats why I have the map

silent veldt
#

The constructor should know what data it needs to load based on the config section name

#

So basically, the constructor is presented with all the data in the config section

boreal tiger
#

mhm thats a good point but it still seems weird to pass everything onto each class

silent veldt
#

Then it recognizes and loads what it needs

#

You aren't really

vernal spruce
#

tbh im surprised you arent just straight up

#

creating a object to hold these

#

for each section

boreal tiger
#

I already have an object

#

thats not the point stellrow

silent veldt
#

ConfigurationSection can contain a lot of info

#

But it can access it easily, so it's not wasteful to pass it

vernal spruce
#

by that i mean having a hashmap with section as pointer(name) and a object ..

boreal tiger
#

@silent veldt yeah I might just do that thanks

#

@vernal spruce the map was so that I knew which class to pass the config section

#

not to store the loaded stuff

silent veldt
#

No worries, I used the same setup for my YML block protection plugin

boreal tiger
#

๐Ÿ‘Œ thank you ๐Ÿ˜„

silent veldt
#

You specify what interactions are allowed, how much each block is worth, what interactions are allowed, etc. It just passes the same config section through it's subclasses and each one checks for and loads the relevant data

#

Good luck on it!

boreal tiger
#

thanks ahha ๐Ÿ‘

red bolt
#

how do you set an item to unbreakable ?

#

is there any method ?

ashen stirrup
#

Whenever they use it, set the durability to Integer.MAX_VALUE

boreal tiger
#

there is a method

#

setUnbreakable

#

@red bolt ^

red bolt
#

i found it

#

ItemMeta.spigot().setUnbreakable

boreal tiger
#

you dont need the spigot() part anymore

#

you can just do setUnbreakable in the itemmeta

red bolt
#

1.8.8 :p

boreal tiger
#

ah my bad xD

frigid heath
#

can i gate a command behind an op-level?

finite pilot
#

i have some economy plugins and since im admin i don't lose any money buying stuff, how can I turn this off?

#

am using epic spawners with Vault

inland meteor
#

which economy plugin are you using?

#

like which one is your main economy

finite pilot
#

vault? or like newtshops

boreal tiger
#

neither of those is an economy plugin

#

vault just handles the connection iirc

finite pilot
#

oh ok i'll check now

#

apparently it is vault

tiny dagger
#

frConomy is an economy plugin btw ๐Ÿ‘€

dusty topaz
#

frShamelessPlug

inland meteor
#

i was thinking that

#

i was like "is he... making the most of a situation?"

tiny dagger
#

why not?

#

it's not like i'm gaining anything anyway

#

i just recommend something that i know is good

naive stratus
#

Have any of you guys ever noticed this? https://imgur.com/a/4EPSnaJ - Removing light sources in unloaded chunks seem to cause some issues. The block is gone, but the light remains.

inland meteor
#

Nothing bad @tiny dagger just one of the best self promos ๐Ÿ˜‚๐Ÿ˜‚

digital sphinx
#

Should i use the spigot-1.15.2-R0.1-SNAPSHOT.jar or spigot-1.15.2.jar

wanton delta
#

What

#

Whichever one is in the buildtools folder

#

I think its the second

formal nimbus
#

hey, can anyone help me with hashmaps?

#

I've set one up

#

but their is an issue

#

I have an itemstack as a key

#

I give a player the itemstack in game

#

an event listens for when they right click that item

#

the event then passes that item into a hasmap.get

#

but it returns null

#

even though they are the same item

#

I have checked, and when I use the item directly

#

it doesn't return null

#

is seems that their is a difference in the item the listener picked up, and the item that I set as the key

#

anyone have a solution?

wanton delta
#

You need to iterate through the keyset of the hashmap

#

And use ItemStack.isSimilar

#

Map#keySet

#

@formal nimbus

formal nimbus
#

@wanton delta Sorry was afk

#

right....

#

How do I iterate through the keyset?

#

oh

wanton delta
#

Use a for loop like you would for an arraylist

formal nimbus
#

yep

#

so like

#

ItemStack key : myHaskMap

#

*myHaskMap

wanton delta
#

myHashMap.keySet()

formal nimbus
#

?

#

why would I then set the key

wanton delta
#

ItemStack key : map.keySet()

#

Or actually

formal nimbus
#

ah

#

I see

wanton delta
#

Use entryset

#

Because i assume youre trying to get the value correct

formal nimbus
#

no

#

otherway round

#

or..

#

essentially

#

my entrySet is a list of pairs

wanton delta
#

But you want to get the value value associated with the key right?

formal nimbus
#

yes i do

wanton delta
#

Right

formal nimbus
#

but I can't compare using the sentrySet

#

*entrySet

#

they're too complex

wanton delta
#

what

formal nimbus
#

ok

wanton delta
#

Yes you can

formal nimbus
#

the entry sets are lists of pairs

wanton delta
#

Map.Entry<K, V> entry : hashmap.entryset

#

LISTS of pairs?

#

Or just pairs?

formal nimbus
#

yep

#

Lists of pairs

wanton delta
#

What does the map look like

formal nimbus
wind dock
#

uh,

#

How do i send images

formal nimbus
#

get image on clipboad

boreal tiger
#

you need to be verified iirc

formal nimbus
#

cntrl+v

wanton delta
#

that ContentsList wrapper may not be a good idea, seems a bit much. but anyways ill help with ur original problem

formal nimbus
#

lmao

#

it was a bit much

wanton delta
#

Map.Entry<K, V> entry : hashmap

wind dock
#

ok

formal nimbus
#

having to do the List<Pair<ItemStack, Double>> every time

wanton delta
#

if key is similar to the itemstack, use entry.getValue() to get the contentsList

mental bone
#

Yesterday a good guy help me for my pb in my scoreboards and i know how to fix it

formal nimbus
#

soo...

wind dock
#

?

formal nimbus
#

00f I've been confused now

wanton delta
#

@wind dock in your bungee config the server lobby isnt defined as a server

mental bone
#

player.getstatistic print only the statistic of player who write the command so

formal nimbus
#

so if I have a similar item

mental bone
#

i need to use the PlayerDeathEvent

formal nimbus
#

and need to get the entry for it

#

what would I do?

wanton delta
#

wdym

mental bone
#

and create myself the kilsl count

wind dock
#

@wanton delta I called it hub :/

wanton delta
#

then in your bungee config, there is a priority list

#

it probably says " lobby"

#

change it to " hub"

#

@formal nimbus what do you want to get from the hashmap

#

Map<K, V>

#

K is your itemstack

#

V is your ContentsList

formal nimbus
#

I'm trying to get a contents list

wanton delta
#

right

formal nimbus
#

V

#

I'm trying to get the contents list from an item which is similar to the key

wanton delta
#

yep

formal nimbus
#

so what do I do to get that?

wanton delta
#

Map.Entry<K, V> entry : hashmap.entrySet()

formal nimbus
#

but V is contents?

wanton delta
#

entry.getKey().isSimilar(itemstack)

formal nimbus
#

I don't have the contents

wanton delta
#

entrySet is the whole entry

formal nimbus
#

ah

#

ok

vernal spruce
#

@formal nimbus V is a generic type

#

K-Key,V-Value

sturdy oar
#

learn generics ;_;

formal nimbus
#

;-;

wanton delta
#

yea im just using V for just the example

sturdy oar
#

they're essentials i'd say

wanton delta
#

you dont need to use V

vernal spruce
#

not rly

formal nimbus
#

right

vernal spruce
#

its just to specify a object type

#

you can place anything in there

wanton delta
#

replace K and V with whatever your map is