#help-archived

1 messages Β· Page 57 of 1

narrow crypt
#

or do you mean this

#

import org.bukkit.inventory.ItemStack;

chrome edge
#

Is the problem serialize or deserialize?

narrow crypt
#

deserialize

chrome edge
#

import itemstack

#

1.15

#

and click on it

#

import net.minecraft.server.v1_15_R1.ItemStack;

narrow crypt
#

click on the line u ss?

chrome edge
#

click on itemstack part

narrow crypt
#

in the import

#

from the import line

chrome edge
#

Your ide should open destination class.

narrow crypt
#

well

#

it makes sense

chrome edge
#

@narrow crypt ...

narrow crypt
#

isnt this what u needed?

#

im sorry

frigid ember
#

I don't tinker with NMS that much unfortunately

tiny dagger
#

you should

lament wolf
#

why f and g are "byte" notwithstanding they correspond to the yaw and pitch that are float ? So I get IllegalArgumentException

#

The server sank into deep inactivity..

chrome edge
#

I've never tried to use as a byte but I don't think you get IllegalArgumentException

lament wolf
#

Caused by: java.lang.IllegalArgumentException: Can not set byte field net.minecraft.server.v1_12_R1.PacketPlayOutNamedEntitySpawn.f to java.lang.Float

chrome edge
#

So you can get it xD

lament wolf
#

:')

chrome edge
#

Just use headrotation packet

tiny dagger
#

what about casting to byte

frigid ember
#

Right, you're passing it a float?

chrome edge
#

new PacketPlayOutEntityHeadRotation();

#

or set entity position before tits spawn

lament wolf
#

I'm just creating a DataWatcher, I don't want to create a packet rotationhead

chrome edge
#

but sometimes it's not actually fixed yaw and pitch

#

so you should use another packet for fixing it

lament wolf
#

Yeah I think i'll do that Fr33

frigid ember
#

yeah, can't send a byte field a float lmao

chrome edge
#

but why...

#

I think that's not correct.

frigid ember
#

because the computer says so

cold wharf
#

Hey

chrome edge
#

-_-

cold wharf
#

How to use placeholders?

tiny dagger
#

that's why you should learn why there are sizes

frigid ember
#

@chrome edge stack trace doesn't lie MonkaShake

chrome edge
#

@frigid ember if it's correct why there's another packet for settings yaw and pitch. It looks ugly tho

#

@cold wharf you've should plugin's wiki.

#

if you're using plugin for that

tiny dagger
#

i think the other one is for the movement blackone

cold wharf
#

@chrome edge I am making plugin

chrome edge
#

I mean look at it how ugly it is;

new PacketPlayOutEntityHeadRotation(entity, y);```
cold wharf
#

And I want to use other plugin's placeholder

frigid ember
#

wasn't a hard find

chrome edge
#

I've no experience about other plugin's api and placeholder things...

dusty topaz
#

Then google it

lament wolf
#
        MinecraftServer nmsServer = ((CraftServer) Bukkit.getServer()).getServer();
        WorldServer nmsWorld = ((CraftWorld) Bukkit.getWorld("world")).getHandle();
        GameProfile gameProfile = new GameProfile(UUID.randomUUID(), "Β§aΒ§l" + npcName);

        EntityPlayer npc = new EntityPlayer(nmsServer, nmsWorld, gameProfile, new PlayerInteractManager(nmsWorld));
        Player npcPlayer = npc.getBukkitEntity().getPlayer();
        npcPlayer.setPlayerListName("");

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

        PacketPlayOutNamedEntitySpawn d = new PacketPlayOutNamedEntitySpawn(npc);
        DataWatcher w = new DataWatcher(null);
        w.register(new DataWatcherObject<>(13,DataWatcherRegistry.a),(byte)127);
        
        setValue(d, "a", 55);
        setValue(d, "b", npc.getUniqueID());
        setValue(d, "c", npc.locX);
        setValue(d, "d", npc.locY);
        setValue(d, "e", npc.locZ);
        setValue(d, "f", (byte) npc.yaw);
        setValue(d, "g", (byte) npc.pitch);
        setValue(d, "h", w);



        PlayerConnection connection = ((CraftPlayer) player).getHandle().playerConnection;
        connection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER,   npc));
        connection.sendPacket(d);
        connection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, npc));```
tiny dagger
#

jeez

#

what version is this?

#

1.8.8?

lament wolf
#

1.12.2

#

:relieved:

tiny dagger
#

why don't you do it like me

lament wolf
#

Well,

tiny dagger
#

well what

#

in every version the logic is changed

#

no way you can do it viaversion 1.8.8 to 1.15

lament wolf
#

I need to get the npc when player interact with the npc

#

So in my channelRead()

tiny dagger
#

that's a sniffer for

#

hook into the pipeline

#

then listen to PacketPlayInUseEntity

lament wolf
#

yeah PacketPlayInUseEntity

#

But

#

wait i'll try something

tiny dagger
#

no butts, go to work

#

:p

lament wolf
#

=)

sharp dew
#

I want to log into the git page of spigot but i don't know what credentials, I tryed with the forum ones but they didn't work

tiny dagger
lament wolf
#

ahah

#

How to get all nms entity in a world ?

fleet crane
#

It's JIRA credentials and you need to sign the cla

#

?cla

worldly heathBOT
lusty vortex
#

Damn you guys got serious with contributions

hoary parcel
#

uuuhm, the cla is like 5 years old?

inland meteor
#

That’s been there for ages πŸ˜‚

frigid ember
lusty vortex
#

I haven't seen anything related to Spigot contributions ever. Last time I even thought about it was back in the bukkit days πŸ˜†

remote socket
#

I am getting Caused by: java.util.UnknownFormatConversionException: Conversion = 'l' does anyone know how i can fix it?

    @EventHandler
    public void onChat(AsyncPlayerChatEvent e) {
        Player player = e.getPlayer();
        String swapPlayer = plugin.chatFormat.replace("%player%", player.getName());
        String swapMessage = swapPlayer.replace("%message%", e.getMessage());
        String swapPlaceholders = PlaceholderAPI.setPlaceholders(player, swapMessage);
        String colourSwap = ChatColor.translateAlternateColorCodes('&', swapPlaceholders);
        e.setFormat(colourSwap);
    }
hoary parcel
#

well, print out your colorSwap var

#

and see why its in the wrong format

celest garden
#

Can someone explain me how work WorldGuard region priority?

#

I set one region with mob-damage allow and priority 2 and set another one region inside with priority 1, set on this region mob-damage deny and it isn't working

#

mobs can still give damage

keen compass
#

the higher the number, the higher the priority

bronze marten
#

Just swap priorities

celest garden
#

So i should to swap this numbers?

#

ok

#

Thanks

keen compass
#

do note though, since you have 2 regions with 2 opposite flags, that if a player is a member of the region with mob damage allow, it will allow mob damage for that player

sharp dew
#

I the CLA under JIRA account you should put the username of jira?

lament wolf
#

@chrome edge I tried :

       for (Entity entity : Bukkit.getWorld("world").getEntities().stream().map(xx -> ((CraftEntity) xx).getHandle()).collect(Collectors.toList())){

            if (entity.getId() == mobID){
                if (entity instanceof EntityPlayer){
                    StaticNPC staticNPC = manager.convertEntity((EntityPlayer) entity);
                    player.sendMessage(" ok" );
                }
            }

        }```
that should check for every nms entity if it has the same ID. But it doesn't work ;-;
chrome edge
#

Make a class that containt NPC information. Whenever you create NPC save npc's id into its class.

#

when you click to entity, check ids in NPC classes. If it's equal clicked mob's id, reurtn NPC class

celest garden
#

Can i enable hoppers on worldguard region without enabling chest-access?

chrome edge
#

I think it's not the place ask question about spigot plugins.

#

You've should ask to world guard discord or github

lament wolf
#

Driven crazy

chrome edge
#

@lament wolf haven't you fixed yet?

celest garden
#

ok, sorry

lament wolf
#

I know I can, but I've been at it for six hours without a break. I can't do a single loop anymore

chrome edge
#

Okay, just try what I said step by step.

#

It's your solution

lament wolf
#

:relieved:

chrome edge
#

after understanding how it works, you can edit as your needs

versed forge
#

is it possible to issue a set permission coommand on issue of a nomrla command

uneven sandal
#

@versed forge What do you mean? Like do make a command that uses a permissions plugins set permission command? Just make an alias for the set permission command.

chrome edge
#

@versed forge what exactly do you want?

versed forge
#

what i mena so when they do /is it give them a diffrent scoreboard with featherboard

narrow carbon
#

Anyone know how you can execute a bungee command from the spigot console?

versed forge
#

so it gives them the permission node for that sscoreboard

uneven sandal
#

@versed forge Make an alias command that runs both the set permission command and the /is command

chrome edge
#

@narrow carbon As I know, it's not possible but there're alternative methods to execute bungee command from bukkit console. Use message channels and send command data to bungee. Listen command from bungee and execute.

narrow carbon
#

So I would have to write a custom plugin?

uneven sandal
#

Yeah, a plugin that interacts with both bungee and Spigot. Otherwise it's not really possible.

narrow carbon
#

Welp, since I'm pretty new to java IG I'm up for a challange x)

uneven sandal
#

x) Good luck haha. I haven't even begun to dabble in the Bungee API yet.

frigid ember
#

It shouldn't be too hard, will require a spigot plugin and bungee plugin

#

Both just need to communicate using proxy channels

#

any crates plugin 1.15.2

earnest jackal
#

I have a question, how long does it take for a premium plugin to be reviewed?

tiny dagger
#

~3 weeks

narrow carbon
frigid ember
#

@narrow carbon pretty sure that just executes on multiple spigot server across bungee

earnest jackal
#

~3 weeks? So much?

narrow carbon
#

Third line of the usage:

/sync console bungee alert Wassup! would make the console of the BungeeCord server run the command alert Wassup!
#

I think this does it :3

#

I'm going to test it

frigid ember
#

Maybe then 🀷

narrow carbon
#

I'll post it here if it works πŸ˜„

frigid ember
#

crate plugin simple for 1.15 works fine, thanks

narrow carbon
#

@frigid ember you say that this shouldn't be too hard, yet I don't know where to start.
Can you redirect me to some documentation or smth bc's I can't seem to find it :3

frigid ember
narrow carbon
#

I'll take a look, thanks.

hollow crystal
#

Can someone help me

#

Do spigot have some plotplugis

#

@atomic rapids

#

^^^

inland meteor
#

Try not to tag staff ^^

#

What do you mean about plot plugis

hollow crystal
#

Oo excuse me

inland meteor
#

Are you looking for a plot plugin?

hollow crystal
#

Plots to my minecraft server

inland meteor
#

ahhh

hollow crystal
#

Yes

inland meteor
#

Bottom one is premium which gets updates, top one no longer gets updates

frigid ember
#

i love when people do that

#

i'll make a loved free plugin, i'll stop updating so they're forced to used the premium version πŸ“ˆ

#

Some people decide they don't want to work for free anymore

#

and that's fine

#

I haven't released a plugin to any market in years lmao

crimson sandal
#

Hmm, is there a way to get the SpigotWorldConfig when using the API? I didn't realise the world-settings in the config were per world but I can't seem to find a method to get the settings for each world with the API.

wanton delta
#

@radiant hollow

#

Theyre talking about ur plugin what u gonna do

red bolt
#

does ram clock matter in running a server ?

frigid ember
#

ram clock or ram cock?

#

On a serious note, not really

#

might see a small improvement but not anything worth while unless you've got 100s of players constantly

#

any plugin devoloper contact me pls

zenith palm
#

?ask

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.

vernal spruce
#

Good enough to act as a inventory config saver? ```@EventHandler
public void closeEvent(InventoryCloseEvent e){
itemStackList.clear();
if(e.getInventory().equals(lootTableInventory)){
pl.getloottablecfg().set("LootTables."+name,null);
for(int x=0;x<=53;x++){
if(lootTableInventory.getItem(x)!=null){
itemStackList.put(x,lootTableInventory.getItem(x));
pl.getloottablecfg().set("LootTables."+name+"."+x,lootTableInventory.getItem(x));
}
}
pl.saveloottable();
e.getPlayer().sendMessage(ChatColor.GREEN+"[HuntingGrounds] "+ChatColor.GRAY+"Succsessfully saved the loottable!");
return;
}

}```
#

Does what is supposed to

frigid ember
#

If it works, it works

naive stratus
#

Where is a blocks position anchor point? Not center, right?

#

I mean, when I get the location, is that the center of the block or a corner?

subtle blade
#

minimum coordinate

#

Rounds down to nearest integer

naive stratus
#

Hmm okay. Thank you.

crimson sandal
#

Hmm, is there a way to get the SpigotWorldConfig when using the API? I didn't realise the world-settings in the config were per world but I can't seem to find a method to get the settings for each world with the API.
@crimson sandal Anyone have any clue if the api can do this without manually reading the config for per world values?

subtle blade
#

for(int x=0;x<=53;x++){
inventory.size(). Don't assume inventory size. Make this future proof

vernal spruce
#

its hardcoded to 54 though

subtle blade
#

It may not be one day

#

Think forward

#

It's a minor change that may save you some bug fixing down the line

vernal spruce
#

also size-1 right?

subtle blade
#

Just < size() is fine

vernal spruce
#

thanks

subtle blade
#

Other than that, looks fine to me. ItemStacks are configuration serializable

vernal spruce
#

yeah i love that

crimson sandal
#

Yeah that's really handy, I use that in my plugin to save custom inventories

sturdy inlet
#

C:\Users\dimit\Desktop\Backup>java -Xmx15G -jar spigot.jar nogui
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
Loading libraries, please wait...
[22:12:06] [Server thread/INFO]: Starting minecraft server version 1.15
[22:12:06] [Server thread/INFO]: Loading properties
[22:12:06] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-f39a89e-4633e6c (MC: 1.15) (Implementing API version 1.15-R0.1-SNAPSHOT)
[22:12:06] [Server thread/INFO]: Debug logging is disabled
[22:12:06] [Server thread/INFO]: Server Ping Player Sample Count: 12
[22:12:06] [Server thread/INFO]: Using 4 threads for Netty based IO
[22:12:06] [Server thread/INFO]: Default game type: SURVIVAL
[22:12:06] [Server thread/INFO]: Generating keypair
[22:12:06] [Server thread/INFO]: Starting Minecraft server on 192.168.0.2:25565
[22:12:06] [Server thread/INFO]: Using default channel type
[22:12:07] [Server thread/WARN]: ** FAILED TO BIND TO PORT!
[22:12:07] [Server thread/WARN]: The exception was: java.net.BindException: Cannot assign requested address: bind
[22:12:07] [Server thread/WARN]: Perhaps a server is already running on that port?
[22:12:07] [Server thread/INFO]: Stopping server
[22:12:07] [Server thread/INFO]: Saving players
[22:12:07] [Server thread/INFO]: Saving worlds

C:\Users\dimit\Desktop\Backup>pause
Press any key to continue . . .
What do i do

#

i moved my computer and then it stopped working

vernal spruce
#

Perhaps a server is already running on that port?

frigid ember
#

Task manager is your best friend

vernal spruce
#

you didnt close the previous server

chrome edge
#

Are there anybody who using Redis/Jedis?

crimson sandal
#

You will have a Java instance in task manager thats still running

sturdy inlet
#

ok

crimson sandal
#

Either reboot/log out or find it in task manager

sturdy inlet
#

log out of what

crimson sandal
#

Of Windows, it's easy enough to find it in Task manager though

sturdy inlet
#

what is the file called

crimson sandal
inland meteor
#

sable lmao

crimson sandal
#

Should look like that

#

lol

dusty topaz
#

If you do:

FileConfiguraiton config = getConfig();
ConfiguraitonSection section = config.getConfigurationSection("section");
section.set("abc", 123);
saveConfig();
#

Will it update the configuration?

subtle blade
#

Yes

dusty topaz
#

Thanks, wasn't sure if it was a clone or not

lament wolf
#

@chrome edge It's an unnecessary mention, but it works, after a week and dozens of hours of research. Thank you

analog roost
#

Hello πŸ™‚ with gradle ? How I can get a plugin on my computer ?

naive goblet
#

Anyone knows if the beach biome was added in 1.13 or 1.12?

#

Nvm 1.12

jolly aurora
#

anyone familiar with MyChunk 3

#

its used on a server im modded in and we're trying to raise the number of chunks people can claim

sturdy inlet
#

C:\Users\dimit\Desktop\Backup>java -Xmx15G -jar spigot.jar nogui
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
Loading libraries, please wait...
[22:12:06] [Server thread/INFO]: Starting minecraft server version 1.15
[22:12:06] [Server thread/INFO]: Loading properties
[22:12:06] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-f39a89e-4633e6c (MC: 1.15) (Implementing API version 1.15-R0.1-SNAPSHOT)
[22:12:06] [Server thread/INFO]: Debug logging is disabled
[22:12:06] [Server thread/INFO]: Server Ping Player Sample Count: 12
[22:12:06] [Server thread/INFO]: Using 4 threads for Netty based IO
[22:12:06] [Server thread/INFO]: Default game type: SURVIVAL
[22:12:06] [Server thread/INFO]: Generating keypair
[22:12:06] [Server thread/INFO]: Starting Minecraft server on 192.168.0.2:25565
[22:12:06] [Server thread/INFO]: Using default channel type
[22:12:07] [Server thread/WARN]: ** FAILED TO BIND TO PORT!
[22:12:07] [Server thread/WARN]: The exception was: java.net.BindException: Cannot assign requested address: bind
[22:12:07] [Server thread/WARN]: Perhaps a server is already running on that port?
[22:12:07] [Server thread/INFO]: Stopping server
[22:12:07] [Server thread/INFO]: Saving players
[22:12:07] [Server thread/INFO]: Saving worlds

C:\Users\dimit\Desktop\Backup>pause
Press any key to continue . . .
What do i do
i moved my computer and then it stopped working i have looked through task manger nothing is open i dont have any other serverws on mc pc what do i do

naive goblet
#

Port is already in use.

#

Make sure you don't have any other instances running on port 25565

sturdy inlet
#

how can i check that

naive goblet
#

Okay open up the cmd prompt

sturdy inlet
#

yep

naive goblet
#

netstat -aon | findstr '[port_number]'

#

iirc

#

It should show which application is using the port

sturdy inlet
#

do i put 25565 in the [port number

naive goblet
#

yes

sturdy inlet
#

nothing came up

naive goblet
#

try switch the port number in properties to something else

sturdy inlet
#

will it stuff up my portfowarding?

#

if its a different port

naive goblet
#

wym

sturdy inlet
#

like if i change the port on the server it shouldnt effect portfowarding of it

#

C:\Users\dimit\Desktop\Backup>java -Xmx15G -jar spigot.jar nogui
*** 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 ***
Loading libraries, please wait...
[00:33:29] [Server thread/INFO]: Starting minecraft server version 1.15
[00:33:29] [Server thread/INFO]: Loading properties
[00:33:30] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-f39a89e-4633e6c (MC: 1.15) (Implementing API version 1.15-R0.1-SNAPSHOT)
[00:33:30] [Server thread/INFO]: Debug logging is disabled
[00:33:30] [Server thread/INFO]: Server Ping Player Sample Count: 12
[00:33:30] [Server thread/INFO]: Using 4 threads for Netty based IO
[00:33:30] [Server thread/INFO]: Default game type: SURVIVAL
[00:33:30] [Server thread/INFO]: Generating keypair
[00:33:30] [Server thread/INFO]: Starting Minecraft server on 192.168.0.2:25566
[00:33:30] [Server thread/INFO]: Using default channel type
[00:33:31] [Server thread/WARN]: **** FAILED TO BIND TO PORT!
[00:33:31] [Server thread/WARN]: The exception was: java.net.BindException: Cannot assign requested address: bind
[00:33:31] [Server thread/WARN]: Perhaps a server is already running on that port?
[00:33:31] [Server thread/INFO]: Stopping server
[00:33:31] [Server thread/INFO]: Saving players
[00:33:31] [Server thread/INFO]: Saving worlds

C:\Users\dimit\Desktop\Backup>pause
Press any key to continue . . .

#

thats what it says now

naive goblet
#

uh that's weird

sturdy inlet
#

all i did was move my computer

#

and like i have a finished server here

naive goblet
#

move your pc?

sturdy inlet
#

i unpluged my pc and moved it as i was cleaning my desk

#

*desktop pc

#

and now it doesnt work

#

what do i do

naive goblet
#

You haven't assigned any specific ip address to the server props?

sturdy inlet
#

yea my ip

#

i have a domain for the server

#

that is connected to my private ip

naive goblet
#

try make server-ip blank

#

in the props

sturdy inlet
#

ok

#

it loaded thank you

#

would my domain still work or do i have to add my ip back

naive goblet
#

You might have to remanage the domain

sturdy inlet
#

ok

#

its with go daddy

naive goblet
#

Yeah I mean update the ip it's redirecting to

sturdy inlet
#

yea my portfowarding doesnt work with it not in it

#

im gonna try add the ip back in

vernal spruce
#

Why would this throw bound negative? public ItemStack returnItem(){ Random rnd = new Random(); return itemStackList.get(rnd.nextInt(itemStackList.size()-1)); } every time after i edit the list ```@EventHandler
public void closeEvent(InventoryCloseEvent e){
itemStackList.clear();
if(e.getInventory().equals(lootTableInventory)){
pl.getloottablecfg().set("LootTables."+name,null);
for(int x=0;x<lootTableInventory.getSize()-1;x++){
if(lootTableInventory.getItem(x)!=null){
itemStackList.put(x,lootTableInventory.getItem(x));
pl.getloottablecfg().set("LootTables."+name+"."+x,lootTableInventory.getItem(x));
}
}
pl.saveloottable();
e.getPlayer().sendMessage(ChatColor.GREEN+"[HuntingGrounds] "+ChatColor.GRAY+"Succsessfully saved the loottable!");
}

}```
naive goblet
#

Yeah. Maybe your ip changed because you moved idk shrugface

sturdy inlet
#

that would be funny

#

omfg it did

#

no way

#

it actually changed

#

wtf

#

LOL

naive goblet
#

lmao

sturdy inlet
#

nooo i have to re do everything

naive goblet
#

Yeah that's poopy

sturdy inlet
#

argggggg

naive goblet
#

@vernal spruce can you send the stacktrace?

vernal spruce
#
        at java.util.Random.nextInt(Unknown Source) ~[?:1.8.0_231]
        at me.Stellrow.HuntingGrounds.LootTable.LootTable.returnItem(LootTable.java:51) ~[?:?]
#

even though i have like 6 items

#

in there

naive goblet
#

public ItemStack returnItem(){
Random rnd = new Random();
return itemStackList.get(rnd.nextInt(itemStackList.size()-1));
}

#

-1

vernal spruce
#

yes but 6 items.. and does it same

#

tried with and without -1

#

strange..

naive goblet
#

Well, first of all, have 1 random instance.

#

But I mean return itemStackList.get(rnd.nextInt(itemStackList.size())); this should work fine

vernal spruce
#

same stuff hmm

crimson sandal
#

With a configurationsection can you get a value by its path? Like ```
ticks-per:
hopper-transfer: 8

unkempt dock
#

Hi there any ideas how to extract folder from jar?

crimson sandal
#

.getInt("ticks-per/hopper-transfer")

vernal spruce
#

@unkempt dock WinRar

crimson sandal
#

Hi there any ideas how to extract folder from jar?
@unkempt dock open it in winrar

unkempt dock
#

like in Java

naive goblet
#

@vernal spruce if it's empty it would return the Exc

#

Random#nextInt doesn't like integers under 1

vernal spruce
#

strange im saving a total of 6 items... in the hashmap

#

itemStackList.put(x,lootTableInventory.getItem(x))

naive goblet
#

Well try debug the size when invoking the method returnItem

vernal spruce
#

yep jumps to 0

naive goblet
#

With a configurationsection can you get a value by its path? Like ```
ticks-per:
hopper-transfer: 8

@crimson sandal yes you would have to get the key of the config section and then get value by the path.

vernal spruce
#

while it jumps to zero the other methods keeps working perfectly even after the edit

#
        lootTableInventory.clear();
        for(Integer i : itemStackList.keySet()){
        lootTableInventory.setItem(i,itemStackList.get(i));
        }
        p.openInventory(lootTableInventory);
    }```
#

This still works after that

naive goblet
#

Can you put everything in a bin

vernal spruce
#

found the problem..

#

itemStackList.clear(); was outside the if statement for inventory saving

naive goblet
#

ah

#

makes sense

vernal spruce
#

it was clearing it without being it..

#

well.. beside the messy command system the plugin is kinda ready for what i expected it to do

unkempt dock
#

Do somebody know how to do it?

#

I need to extract folder from a jar. However, when the jar is obfuscated the path changes

vernal spruce
#

Google the god

naive goblet
#

lol

unkempt dock
#

I need it in java -.-

vernal spruce
#

yeah kinda took me 5 secs to type it πŸ˜‚

unkempt dock
#

I googled lol

#

a lot

naive goblet
#

add java

#

to the search

vernal spruce
#

and in what category

unkempt dock
#

I was even on 2nd page

vernal spruce
#

is the link i sent you?

unkempt dock
vernal spruce
#

so instead of reading the "solution marked reply"

unkempt dock
vernal spruce
#

you went to the 2nd answer?

unkempt dock
#

problem

patent monolith
#

But should we use FileSystem zip or ZipInputStream πŸ€”

unkempt dock
#

cuz

#

this works only on windows

#

yah im using filesytem but the problem is

#

final URI resource = SimplePlugin.class.getClassLoader().getResource("").toURI();

subtle blade
#

I need to extract folder from a jar. However, when the jar is obfuscated the path changes
πŸ‘ Don't πŸ‘ ob πŸ‘ fus πŸ‘ cate πŸ‘

#

You're making your own life more difficult, you're making that of your users more difficult and you're going against the entire purpose of Bukkit - free and open source

versed forge
#

well said choco

crimson sandal
#

@crimson sandal yes you would have to get the key of the config section and then get value by the path.
@naive goblet I'm trying .getInt("ticks-per/hopper-transfer") but that's not working, what's the correct format or is that not possible?

subtle blade
#

If I have to say it over a thousand times, it gets said better and better each and every time. I also hate saying it more each time I have to, but y'know

versed forge
#

yeah we should make a command for it choco

subtle blade
#

I think there is

#

?obfuscate

#

?obfuscation

frigid ember
#

BuT iF i DoNt FuScAtE mY cOdE mAy GeT sToLeN

subtle blade
#

Damn I remembered there being one

versed forge
#

they might have removed it

subtle blade
#

It should say "Stop disrespecting Bukkit you ass hole >:(("

vernal spruce
#

i agree

#

how dare you Kappa

versed forge
#

I agree with you on that choco let get it added

inland meteor
#

You're making your own life more difficult, you're making that of your users more difficult and you're going against the entire purpose of Bukkit - free and open source
Thats why a project a few friends of mine and I were walking on switched to public repos for everything - it’s the entire point of the community... collaboration, support & open source

versed forge
#

Its just basic tbh everyone helps everyone in this commnity

#

thats just what being a part of a community is

inland meteor
#

But iTs tO mAkE mOnEy nOt bE a cOmMuNiTy

#

That’s what I had said to me when I asked why someone was making stuff obfuscated πŸ˜‚

chrome edge
#

Money is good.

inland meteor
#

Just doing it for money and not because you like the community is eh

vernal spruce
#

dont get me wrong i would love to have some spare money rnπŸ˜‚

chrome edge
#

@frigid ember /reload ?

remote socket
#

I have utf-8 set in maven and on the config file, but my symbol comes out with a funny looking a.

chrome edge
#

It's not possible. You have to stop to server.

#

How?

#

@remote socket May I see your maven?

#

<?xml version="1.0" encoding="UTF-8"?> In the start of the maven, you can set encoding.

#

Which iso do you use?

remote socket
chrome edge
#

ubuntu centos etc.

#

or just linux

remote socket
#
    <properties>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
#

also have that

chrome edge
#

nope

#

@remote socket I couldn't see any problem from your maven

#

Is still shows weird character instead of utf-8?

#

Which IDE do you use?

#

Try to export with your IDE not maven.

remote socket
#

I did export with ide

#

Intellij

chrome edge
#

So is it work?

versed forge
#

have u made it executable

chrome edge
#

You export from your IDE. If it didn't work, probably causing ide

frigid ember
#

Intellij just sounds like a pain in the arse

remote socket
#

Nope

#

Intellij is excellent

frigid ember
#

everyone just seems to have issues with it 🀷

chrome edge
#

Actually everyone who doesn't know how to use ide have problem with intellij xD

#

They jump notepad++ to intellij

#

Of course it's normal to hear problem from them

frigid ember
#

yo

#

how did md_5 get the snapshot in the bukkit form?

#

NP++ to an actual IDE shouldn't be an issue lmao

subtle blade
#

I've been using Eclipse for almost 6 years. IJ still bothers me

frigid ember
#

^

subtle blade
#

It's preference

chrome edge
#

Notepad++ is everything for me ._.

frigid ember
#

where do you get the bukkit/spigot snapshot?

subtle blade
#

Tleer, md is the maintainer. He has tools to update the software. Snapshot builds are not public

frigid ember
#

rip.\

subtle blade
#

You shouldn't be seeking them either. They're not stable builds of the game

#

Wait until a pre-release

frigid ember
#

but he runs a server on it lol

subtle blade
#

Even then, those shouldn't be production

#

It's a test server

#

To find bugs

chrome edge
#

...

subtle blade
#

So that when it is released, you DON'T have bugs

frigid ember
#

just get a plugin for that

chrome edge
#

Doesn't default chat color codes work?

#

Try it

#

or try Β§

#

Β§a

subtle blade
#

If & doesn't work (can't recall off the top of my head), yea, section symbol

chrome edge
#

Yes.

subtle blade
#

Same as with &

frigid ember
#

@subtle blade when is the release of 1.16

naive goblet
#

1.16 Will break colors right?

frigid ember
#

It will be less laggy, and more smooth.

#

Ik that for sure

#

yo Conclure

final verge
#

@frigid ember that's probably a question for mojang lol

frigid ember
#

true

naive goblet
#

Well iirc it comes with that you can choose any color ?

final verge
#

You can use custom colors but we don't know how that will fit into the API

#

As colors previously were an enum which represents set values and don't allow for modification

frigid ember
#

I can't wait to mess around with the api

final verge
#

So it will require some sort of rework of the system

subtle blade
#

when is the release of 1.16
Yea I'm not Mojang ;P We don't know that

#

Spigot's releases are generally pretty quick. A day or two after that of Mojangs

#

Sometimes within a few hours

final verge
#

At the earliest we might see a spigot pre release mirroring a mojang one

#

that's not to say we will 100% get one, that's up to md if he feels spigot is ready enough for that

frigid ember
#

where do u reporty bugs at

subtle blade
#

?jira

worldly heathBOT
final verge
#

so don't go spamming the man saying "when prerelease. mojang did theirs 37 seconds ago"

subtle blade
#

Ensure you're on latest and that bugs are not present on vanilla

vernal spruce
#

36 secs late? REE

frigid ember
#

wdym not present on vanilla

#

thats what the snapshot is on

subtle blade
#

Oh you want to report bugs for the snapshot?

#

?spigotcraft

#

Fuck

frigid ember
#

xD

subtle blade
#

Had to type that bugger out lol

frigid ember
#

yeah they already fixed a lot of bugs in the recent snap

narrow crypt
#

this is quite a basic java question im sorry
I have a method called purgeDrops() which removes blocks, it returns a int.
If i want to print the int i can do
System.out.println(purgeDrops());
but is that the right way to do it?
it executes the method just fine right?

frigid ember
#

it will print out the int

#

or the returning int from the method

narrow crypt
#

yea but i mean, will it execute the method just fine?

frigid ember
#

It should.

narrow crypt
#

anyone that can confirm ?:D

chrome edge
#

Of course it'll work.

frigid ember
#

well unless theirs error in your code.

chrome edge
#

But if you get error in method the return will not work

narrow crypt
#

okay thanks

frigid ember
#

you can dupe Items?>

narrow crypt
#

?

frigid ember
narrow crypt
#

nice

subtle blade
#

System.out.println(purgeDrops());
That will work fine, yes. Though worth noting it won't work for something like player.sendMessage(purgeDrops()) only because it accepts a String, unlike println() which accepts an Object

#

You'd have to stringify the result. player.sendMessage(String.valueOf(purgeDrops()))

versed forge
#

How can i stop peoplepulling items out of a GUi

frigid ember
#

How do i check the last block, making an anticheat and i need to it from false flaging with someone jumping on ice and getting off ice

hoary parcel
#

Cancel the events

versed forge
#

?

chrome edge
#

cancel the inventory click event

frigid ember
#

Cancel the events for them being able to pull the stuff out

versed forge
#

thanks @chrome edge

zenith siren
#

p.getLocation().getX()

frigid ember
#

How do i check the last block, making an anticheat and i need to it from false flaging with someone jumping on ice and getting off ice

near lodge
#

Just store the last location?

#

and get it that way

#

or what do you mean?

#

PlayerMoveEvent e.getFrom()?

chrome edge
#

@frigid ember You may save player's location that has on ground. Whenever gets true flag, teleport the player to saved location.

frigid ember
#

I don’t wanna teleport I just want to stop flagging then

#

Becaue if they jump from a ice block they go faster

#

So it’s passing the threshold

dark shuttle
#

Use PlayerMoveEvent to listen, and use PlayerMoveEvent#getFrom().getBlock() to get the last block, to stop it, cancel the event.

frigid ember
#

Ah didn’t know I can getFrom then the block

dark shuttle
#

#getFrom().clone().subtract(0,1,0) to get the block under the player

light folio
#

hi im using the screaming bed wars plugin and i was wondering how to enable leather armor and wooden sword to always spawn with you?

inland meteor
#

Oh, sh works!
@frigid ember Just to add to this (sorry for v late response) it may be that you created the file with sudo and then are generally running it, try chmod'ing the file πŸ™‚

chrome edge
#

@light folio this is not the place you can ask spigot plugins help

#

Try to find their discord server or just pm to creator of plugin

dusty topaz
#

@dark shuttle no need to clone every time

#

Use block getRelative

#

If you're trying to get the block underneath

dark shuttle
#

it will get the block twice isnt it? the block on player's location and then block under it

narrow crypt
#

what is the right way to get a offlineplayer

#

OfflinePlayer target = Bukkit.getOfflinePlayer(args[0]);

#

this is deprecated according to my ide

violet aspen
#

that's how I always do it, I think it's good

subtle blade
#

Deprecated because (1) Will cause an API request to Mojang which may be blocking and (2) Names are not meant to be used as persistent data

#

So if you want to get by name, that's the way to do it, but don't store names as persistent data if that's your reason for getting them

crimson sandal
#
Resetting Spigot-Server to CraftBukkit...
fatal: ambiguous argument 'origin/patched': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
  Applying patches to Spigot-Server...
Applying: POM Changes
Applying: Skeleton API Implementations
Applying: mc-dev imports
Applying: Spigot Configuration
error: sha1 information is lacking or useless (src/main/java/net/minecraft/server/DedicatedServer.java).
error: could not build fake ancestor
Patch failed at 0004 Spigot Configuration
``` I'm getting this error when trying to applyPatches the Spigot project, not sure what I've done wrong
neat orbit
#

Hello, I am making a MC server and I have noticed that when my players (premium players) change their usernames; everything they have earned and saved like /bal /home etc is gone. The server treats their user as a brand new player, with a brand new welcome message. What is the reason for it?

frigid ember
#

Hey guys, when I open a gui for the player when clicking on a fake player, when i click on the fake player it opens a gui, but when i click in the gui it doesn't do anything, but if i open the gui from a command I can click on items and it works

    ProtocolLibrary.getProtocolManager()
        .addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Client.USE_ENTITY) {
            @Override
            public void onPacketReceiving(PacketEvent event) {
            if (event.getPacketType() == PacketType.Play.Client.USE_ENTITY) {
                try {
                Player p = event.getPlayer();
                PacketContainer packet = event.getPacket();

                int id = packet.getIntegers().read(0);

                int stats = npcStats.getId(p);
                int unranked = npcStats.getId(p, true);
                int ranked = npcStats.getId(p, false);

                if (id == ranked) {
                    p.openInventory(Methods.duelGUI());
                }

                } catch (Exception e) {

                }
neat orbit
#

How can I keep the credentials such as /home and /bal of users when they change their username?

spring sapphire
#

Guys

#

May I ask a quick question?

lyric badge
#

Hello. I was wondering if someone could help me with some really basic stuff, just installing a plugin or two and getting everything to work fine. Willing to PayPal someone a few dollars. Please let me know if anyone can help

frigid ember
#
                || event.getFrom().clone().subtract(0, 1, 0).getBlock().getType().equals(Material.ICE)
                || event.getFrom().clone().subtract(0, 1, 0).getBlock().getType().equals(Material.PACKED_ICE)
``` i have this but i jump around land on a normal block and it flags?
spring sapphire
#

"Legacy plugin v1.01 does not specify an api-version." I currently made a plugin with eclipse from scratch and I am getting this on console.

golden vault
#

if you only want to support MC 1.13.2+ you need to specify api-version: <the version you built with> in the plugin.yml

#

otherwise ignore it

upper hearth
#

@lyric badge What do you need help with?

lyric badge
#

How do I install a plugin LOL

upper hearth
#

@neat orbit Whatever plugin you're using is saving their data via username instead of UUID

#

Just drag and drop into the plugins folder

subtle blade
#

event.getFrom().clone().subtract(0, 1, 0).getBlock().getType()
Just call this once and hold it in a variable, please. Don't call things more than you need to

lyric badge
#

the individual .jar files?

upper hearth
#

Yes

subtle blade
#

Yes. Drag and drop files to the plugins/ directory

#

Bukkit will load them for you

limber marlin
upper hearth
#

Most plugins are drag and drop anyways, you might need dependencies for some but those should be listed on the plugin's page if applicable.

subtle blade
#

You're using : without surrounding it in quotations

#

It thinks its a config section

lyric badge
#

What's the difference between white-list and enforece-whitelist

subtle blade
#

Surround that string with ''

#

i.e. - 'diamond_pickaxe 1 DIG_SPEED:12 ...'

#

so on and so forth

upper hearth
#

Looks like enforce-whitelist will kick people if they're on the server and not on the whitelist

#

Whereas just turning on white-list won't actually kick them

lyric badge
#

So what exactly does just white-list do then lol

upper hearth
#

white-list prevents people from joining if they're not on the list.

lyric badge
#

Oh okay

frigid ember
#

Ok i am doing ```java

Material e = event.getFrom().clone().subtract(0, 1, 0).getBlock().getType();

            || e.equals(Material.ICE)
            || e.equals(Material.PACKED_ICE)) { return; }
And it stills flags.
upper hearth
#

Do == instead of equals()

subtle blade
#

Don't you want if it's NOT equal to those?

frigid ember
#

Hey guys, when I open a gui for the player when clicking on a fake player, when i click on the fake player it opens a gui, but when i click in the gui it doesn't do anything, but if i open the gui from a command I can click on items and it works

    ProtocolLibrary.getProtocolManager()
        .addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Client.USE_ENTITY) {
            @Override
            public void onPacketReceiving(PacketEvent event) {
            if (event.getPacketType() == PacketType.Play.Client.USE_ENTITY) {
                try {
                Player p = event.getPlayer();
                PacketContainer packet = event.getPacket();

                int id = packet.getIntegers().read(0);

                int stats = npcStats.getId(p);
                int unranked = npcStats.getId(p, true);
                int ranked = npcStats.getId(p, false);

                if (id == ranked) {
                    p.openInventory(Methods.duelGUI());
                }

                } catch (Exception e) {

                }
dusty topaz
#

.equals will work fine, it's the lack of an if statement

subtle blade
#

In this case, if it is ice or packed ice, it will return

upper hearth
#

if statement cut off maybe? Surely it's there

frigid ember
#

yes i want it to return if they are because if they double jump and go to a different block it flags them (so i want to stop the false flag)

But it doesnt return when i jump of the block to fast

dusty topaz
#

Does getOfflinePlayer(uuid) ping Mojang API also?

#

Or only in the circumstance that the player hasn't played recently (or always)

#

I currently use it when opening a coinflip menu to get the head ..

#

and give money to the winner

frigid ember
upper hearth
#

Idk how you're checking speed, but that's doing what it should. They're velocity is still higher coming OFF of the ice, so it's flagging

frigid ember
#

want me to send how i am checking?

#
   float threshold = p.isOnGround() ? 0.31f : .341f;

        float deltaXZ = (float) Math.sqrt(Math.pow(event.getTo().getX() - event.getFrom().getX(), 2) + Math.pow(event.getTo().getZ() - event.getFrom().getZ(), 2)), deltaY = (float) (event.getTo().getY() - event.getFrom().getY());



        threshold += data.slimeTicks > 0 ? 0.07f : 0;
        threshold += PlayerUtils.getPotionEffectLevel(event.getPlayer(), PotionEffectType.SPEED) * (p.isOnGround() ? 0.06f : 0.045f);
        threshold *= data.onStairSlab ? 1.8f : 1.0;
        threshold *= data.iceTicks > 0 && data.groundTicks < 6 ? 2.5f : 1.0;
        threshold *= data.blockTicks > 0 && deltaY != 0 ? 2.0f : 1.0;

        if (deltaXZ > threshold) {
            if ((data.speedThreshold += 2) > 25) {
                flag(event.getPlayer(), deltaXZ + ">-" + threshold);
                data.speedThreshold = 0;
            }
        } else {
            data.speedThreshold = Math.max(0, data.speedThreshold - 1);
        }
    }
``` Here.
upper hearth
#

Sure I suppose, but you could just not flag players who were recently on ice for a few seconds.

#

Yeah they're going over the speedThreshold

frigid ember
#

thats what i thought

#

how could i stop it ?

upper hearth
#

Do what I said, just don't flag anyone who has recently been on ice.

frigid ember
#

Do i do what i have been doing to get recently on ice?

upper hearth
#

? No. Check if they're on ice, if they are, add them to a HashSet<> or something. If they're in that HashSet don't flag them

#

Then remove them from the Set after like a second or something

sage wigeon
#

Does anyone knows a guide to the best approach to store user data for a MMO with things like Citizen, Denizen?

dusty topaz
#

pretty sure its not possible

upper hearth
#

Just have two subdomains... na and eu

frigid ember
dusty topaz
#

probably just have NA and EU servers on the same bungee

upper hearth
#

Just connect all your servers to the same Bungee Proxy

#

@frigid ember It's possible the server doesn't know about the Inventory or something

frigid ember
#

How would I fix that?

#

DessieYT i cant get what you said.

upper hearth
#

What don't you understand?

frigid ember
#

i just cant get it

#

i made a Map

#

and stuff

#

but now it wont flag

upper hearth
#

Are you removing it

frigid ember
#

i be the dumb sometimes

#

yes.

#

after about 3 seconds

upper hearth
#

Can you show?

frigid ember
#
   Material e = event.getFrom().clone().subtract(0, 1, 0).getBlock().getType();

        Vector velocity = p.getVelocity();

        long Time = System.currentTimeMillis();

        long MS = System.currentTimeMillis() - Time;

        if (MS > 10000L) playerIceCache.remove(event.getPlayer().getUniqueId());

        //1.9 check for player.isGliding and in 1.13 check for player.isRiptiding().
        if (event.getPlayer().getAllowFlight()
                || event.getPlayer().isInsideVehicle()
                || data.isVelocityTaken()
                || playerIceCache.containsKey(event.getPlayer().getUniqueId())) {

            return;
        }

        if (event.getPlayer().getLocation().getBlock().getType() == Material.PACKED_ICE && !playerIceCache.containsKey(event.getPlayer().getUniqueId())) playerIceCache.put(event.getPlayer().getUniqueId(), event.getPlayer().getName());



        float threshold = p.isOnGround() ? 0.31f : .341f;

        float deltaXZ = (float) Math.sqrt(Math.pow(event.getTo().getX() - event.getFrom().getX(), 2) + Math.pow(event.getTo().getZ() - event.getFrom().getZ(), 2)), deltaY = (float) (event.getTo().getY() - event.getFrom().getY());


        threshold += data.slimeTicks > 0 ? 0.07f : 0;
        threshold += PlayerUtils.getPotionEffectLevel(event.getPlayer(), PotionEffectType.SPEED) * (p.isOnGround() ? 0.06f : 0.045f);
        threshold *= data.onStairSlab ? 1.8f : 1.0;
        threshold *= data.iceTicks > 0 && data.groundTicks < 6 ? 2.5f : 1.0;
        threshold *= data.blockTicks > 0 && deltaY != 0 ? 2.0f : 1.0;

        if (deltaXZ > threshold) {
            if ((data.speedThreshold += 2) > 25) {
                flag(event.getPlayer(), deltaXZ + ">-" + threshold);
                data.speedThreshold = 0;
            }
        } else {
            data.speedThreshold = Math.max(0, data.speedThreshold - 1);
        }
    }``` it prob wrong i aint used to making anticheats and checking blocks
upper hearth
#

Use

Bukkit.getScheduler().runTaskLater(() -> {
  playerIceCache.remove(event.getPlayer().getUniqueID());
}, 60);

Not System.currentTimeMillis()

frigid ember
#

60?

#

is that seconds?

upper hearth
#

60 ticks

frigid ember
#

ah

upper hearth
#

Which is 3 seconds

frigid ember
#

it can't resolve method 'runTaskLater(Lamba expression)

upper hearth
#

You need the 60

frigid ember
#

i have it

#
        Bukkit.getScheduler().runTaskLater(() -> {
            playerIceCache.remove(event.getPlayer().getUniqueId());
        }, 60);```
upper hearth
#

Oh you need the plugin, forgot. Put your plugin instance before the lambda

frigid ember
#

Yea, i think it works but it doesnt flag even if i havent stepped on ice

upper hearth
#

You removed your ice in the if statement

#

You only have packed_ice

frigid ember
#

yea i am just testing with packed_ice

#
public class SpeedA extends Check {
    public SpeedA(String name, CheckType type, boolean enabled, boolean punishable, int max) {
        super(name, type, enabled, punishable, max);
    }

    private Map<UUID, String> playerIceCache;
    final FileConfiguration config = AntiCheat.getInstance().getConfig();

    @EventHandler
    public void onPlayerMove(PlayerMoveEvent event) {
        DataPlayer data = AntiCheat.getInstance().getDataManager().getDataPlayer(event.getPlayer());
        Entity p = (Entity) event.getPlayer();

        Material e = event.getFrom().clone().subtract(0, 1, 0).getBlock().getType();

        Vector velocity = p.getVelocity();

        //1.9 check for player.isGliding and in 1.13 check for player.isRiptiding().
        if (event.getPlayer().getAllowFlight()
                || event.getPlayer().isInsideVehicle()
                || data.isVelocityTaken()
                || playerIceCache.containsKey(event.getPlayer().getUniqueId())) {

            return;
        }

        if (event.getPlayer().getLocation().getBlock().getType() == Material.PACKED_ICE && !playerIceCache.containsKey(event.getPlayer().getUniqueId())) playerIceCache.put(event.getPlayer().getUniqueId(), event.getPlayer().getName());



        float threshold = p.isOnGround() ? 0.31f : .341f;

        float deltaXZ = (float) Math.sqrt(Math.pow(event.getTo().getX() - event.getFrom().getX(), 2) + Math.pow(event.getTo().getZ() - event.getFrom().getZ(), 2)), deltaY = (float) (event.getTo().getY() - event.getFrom().getY());


#
  threshold += data.slimeTicks > 0 ? 0.07f : 0;
        threshold += PlayerUtils.getPotionEffectLevel(event.getPlayer(), PotionEffectType.SPEED) * (p.isOnGround() ? 0.06f : 0.045f);
        threshold *= data.onStairSlab ? 1.8f : 1.0;
        threshold *= data.iceTicks > 0 && data.groundTicks < 6 ? 2.5f : 1.0;
        threshold *= data.blockTicks > 0 && deltaY != 0 ? 2.0f : 1.0;

        if (deltaXZ > threshold) {
            if ((data.speedThreshold += 2) > 25) {
                flag(event.getPlayer(), deltaXZ + ">-" + threshold);
                data.speedThreshold = 0;
            }
        } else {
            data.speedThreshold = Math.max(0, data.speedThreshold - 1);
        }
        Bukkit.getScheduler().runTaskLater(AntiCheat.getInstance(), () -> {
            playerIceCache.remove(event.getPlayer().getUniqueId());
        }, 60);
    }
}```
#

thats the whole class

upper hearth
#

The runTaskLater should be right after you put them into the Set

frigid ember
#

yea still errors

#
java.lang.NullPointerException
        at me.l3ilkojr.gamingphone.checks.movement.SpeedA.lambda$onPlayerMove$0(SpeedA.java:42) ~[?:?]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftTask.run(CraftTask.java:71) ~[server.jar:git-GenericSpigot-5728a59]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:341) [server.jar:git-GenericSpigot-5728a59]
        at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:707) [server.jar:git-GenericSpigot-5728a59]
        at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:309) [server.jar:git-GenericSpigot-5728a59]
        at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:650) [server.jar:git-GenericSpigot-5728a59]
        at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:555) [server.jar:git-GenericSpigot-5728a59]
        at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [server.jar:git-GenericSpigot-5728a59]```
upper hearth
#

What's line 42 in SpeedA

pearl pawn
#

hi guys i've been making a plugin theese couple days and after making the reload command and executing it it prompts an error, this is my code:

upper hearth
#

Whats the error

frigid ember
#
playerIceCache.remove(event.getPlayer().getUniqueId());```
pearl pawn
#

i don't know what's the problem on line 53

frigid ember
#

It seems like the String is null!

#

Make sure that "reloadMessage" isn't null

upper hearth
#

Yeah reloadMessage is probably null

pearl pawn
#

config.yml ^

#

i made a string

#

String reloadmessage = getConfig.getString("reload-message");

#

@verbal raptor sorry for the ping could you help me?

dusty topaz
#

congratulations on making a string

#

what is the issue

upper hearth
#

It's null, are you sure your config is generating?

pearl pawn
#

yes

dusty topaz
#

how are you saving it

#

show some code

#

saving / generating it

pearl pawn
#
@Override
    public void onEnable() {
        getCommand("switcher").setExecutor(new Switcher());
        File file = new File(getDataFolder(), "config.yml");
        if (!file.exists()) {
            //noinspection ResultOfMethodCallIgnored
            getDataFolder().mkdirs();
            saveResource("config.yml", false);
        }

        YamlConfiguration config = new YamlConfiguration();
        try {
            config.load(file);
        } catch (IOException | InvalidConfigurationException e) {
            e.printStackTrace();
        }

        this.config = config;
    }

    @Override
    public FileConfiguration getConfig() {
        return config;
    }```
dusty topaz
#
        if (!file.exists()) {
            //noinspection ResultOfMethodCallIgnored
            getDataFolder().mkdirs();
            saveResource("config.yml", false);
        }
#

the file already exists, so it's not saving anything

#

underneath that add

#

(undearneath this.config = config)

upper hearth
#

Shouldn't you just do saveDefaultConfig() ?

dusty topaz
#

he could, but isn't

pearl pawn
#

Shouldn't you just do saveDefaultConfig() ?
@upper hearth i want a custom config

dusty topaz
#

anyway, config.options().copyDefaults(true);

pearl pawn
#

that spigot does not just change

dusty topaz
#

spigot doesn't just change it

pearl pawn
#

yeah

dusty topaz
#

under the hood spigot is doing pretty much the same code

pearl pawn
#

it does remove " '

#

for no reason

dusty topaz
#

🀦

#

anyway add the line i gave

#

should fix it

pearl pawn
#

wich one :_:

#
        if (!file.exists()) {
            //noinspection ResultOfMethodCallIgnored
            getDataFolder().mkdirs();
            saveResource("config.yml", false);
        }

@dusty topaz this?

dusty topaz
#

just read ...

upper hearth
#

(undearneath this.config = config)

pearl pawn
#

im not english sorry i am italian

dusty topaz
#

does that affect your ability to read the code

pearl pawn
#

a bit

dusty topaz
#

because I put some code .-.

#

and you just ignored the line

pearl pawn
#

and you just ignored the line
i still don't understand

#

what i have to do

dusty topaz
#

Β―_(ツ)_/Β―

pearl pawn
#

where do i place it

#

oh ya got it

dusty topaz
#

:p

pearl pawn
#

there

#

am i right?

dusty topaz
#

why don't you try it

pearl pawn
#

ok

#

OOOOOOOOOOH thats why it gave error

#

its because i had the old config

#

i tought it would ovverride it if something had been changed

#

πŸ€¦β€β™‚οΈ for me

bleak osprey
#

hey guys,

iam using a Bungeesystem and its only pissible to connect to the Fallback (lobby)
i did the same on every server. in spigot and paper.yml bungge to true

pearl pawn
#

hmm im having other problem @dusty topaz

#

like i reload the config and when i get the snowball it does not change the lore

bleak osprey
frigid ember
#

@upper hearth you know why my flag isnt working?

lusty vortex
#

Anyone have experience with replacing NMS blocks? I've replaced a FenceGate with my own custom one, and replaced the Blocks static final, and the registery with my custom block. EVERYTHING works, but now the BlockPlaceEvent wont fire for that specific block... So I'm missed a registry somewhere most likely

crimson sandal
#

Not sure if I should be running BuildTools with a forked repo but CraftBukkit has no origin/patched branch so ./applyPatches.sh isn't working either

frozen cedar
#

Any idea how this happens?

inland meteor
#

well that's a new one for me

frozen cedar
#

Yeah, it's very weird

frigid ember
#

Ok, so i am trying to make a check for SPEED on my anticheat i want it to stop false flagging speed when someone jumps on ice and it speeds them up and they land on a different type of block anyone know a why to stop this?

#

Check for the block?

#

Hello

#

The discord server is not what i expected..

inland meteor
#

What were you expecting? lol

frigid ember
#

Something bigger and sufficient

#

There is literally TextChannels and Voice Channels thats it

#

Anyway

pastel basin
#

usually discord servers have text channels and voice channels

frigid ember
#

Its fine

hollow crystal
#

some staff i need help

#

im trying to verify my spigot account but an mail is not sends

#

@atomic rapids

#

plz help

#

i cant download plotsquared ^^

#

v.5

frigid ember
#

giving them the bungeecord perm

#

yes

inland meteor
#

give them it on the bungeecord side of things, not spigot server side ^^

#

just wanted to clarify

#

as /server is a bungeecord permission

#

it needs to be given on bungeecord

crimson sandal
#

I feel like im going insane my CraftBukkit repo doesn't have an 'origin/patched' branch and I'm getting this error when running ./applyPatches.sh in the Spigot module

#

And getting this error

#
fatal: ambiguous argument 'origin/patched': unknown revision or path not in the working tree.
#

Anyone got any ideas?

frigid ember
#

do u get any errors in your code?

crimson sandal
#

Nope

#

What is supposed to create the patched branch in the CraftBukkit repo?

frigid ember
#

idk :/

#

Is it possible to "reload" an Async scheduled task? I have it reading from a config file, and when I reload the config, the task doesn't reload its versions of the data

wanton delta
#

Is there a permission for copy NBT data?

hollow crystal
#

i got plotsquared !!!! i dont think its gonna work but it does

civic mica
#

does spigot have a support email

sturdy oar
#

I have one question about singletons and lazy initialization getInstance() method, which of the two styles is preferred usually?

//First way
public static Class getInstance(){
if (instance == null) {
instance = new Class();
}
return instance;
}
// Second way
public static Class getInstance() {
      instance = instance == null ? new Class() : instance;
      return instance;
   }
sleek crystal
#

Does anyone know a sign chest shop plugin for 1.12?

marsh nova
#

@frigid ember store the task as a BukkitFuture, when you need to "reload" it, cancel the old task and make a new one

dusky herald
#

@sturdy oar Why would you need to check if it's null? It should already be created? The point in a singleton is you intialized it already and you only want one instance of that class.

marsh nova
#

It's a lazy singleton

#

It really doesn't matter which method you use. I prefer the first one, although with the addition of synchronized double-checked locking and a volatile reference, for thread safety purposes.

sturdy oar
#

it's lazy instantiation exactly

#

I don't need to instantiate this specific class until someone needs it, eager instantiation would not make sense in my case

lean meadow
#

Hi

#

is it possible to get some support for ultra permissions here?

#

i have some "broken" ranks on my server that i cant click on

paper compass
#

Does anyone have a minigame framework that I can use?

fading owl
#

@sturdy oar Don't lazily instantiate

#

It's definitely unlikely that the object is so heavy that you need to lazily instantiate.

sturdy oar
#

that's not the reason, it's not heavy at all

fading owl
#

My apologies

#

I presumed based off of one of your later statements.

#

Why would you not created it until needed?

#

A good rule of thumb is to define everything as effectively final unless you absolutely need to.

sturdy oar
#

oh to be fair I'm not making a plugin, it was just a general Java question

fading owl
#

Yeah

#

I'm talking about Java.

#

Not specifically in regards to plugin development.

#

Unrelated, does anyone know if it's possible to expose the underlying ExecutorService that BukkitSceduler uses?

sturdy oar
#

I was making this class which represents a connection manager, and I don't feel like it should be loaded if no connections are being made

#

that's why i choose lazy

fading owl
#

Does it manage a single connection or multiple

sturdy oar
#

many

fading owl
#

Then you should use a connection pooling library

#

like c3p0

#

or hikari

sturdy oar
#

not talking about sql

fading owl
#

Apologies

#

What type of connections are you making

sturdy oar
#

Minecraft clients connections πŸ˜‚

fading owl
#

Gotcha

sturdy oar
#

I'm trying to learn how to move / make bots interact inside a server using packets

#

it's a fun project

fading owl
#

Sounds like fun

#

Gl eh

#

Definitely try and stay away from lazy instantiation where possible.

#

If you can't, look into some cool things like Dependency Injection/Service pattern

sturdy oar
fading owl
#

Haven't used it yet

#

Heard a lot of good things htough

sturdy oar
#

It has basically no documentation, but it's better than having to do all the packets by yourself

fading owl
#

yeah of course

#

even implements RSA it looks like

#

Looks fairly actively maintained too

sturdy oar
#

it also works for server 😁

dusty topaz
#

Does World#spawnEntity call EntitySpawnEvent?

sturdy oar
#

I think so

dusty topaz
#

Any way to bypass this?

#

I want to force spawn an entity

sturdy oar
#

wdym

#

you don't want it to trigger EntitySpawnEvent?

dusty topaz
#

Event is seemingly being cancelled

#

ya lol

inland depot
#

I'm trying to make an easy way to create custom enchants.

I'm extending the Enchantment class but I want to add new methods to each of the custom enchants by default. How should I go about this?

dusty topaz
#

add new methods by default?

sturdy oar
#

i mean

dusty topaz
#

show your enchantment class and name the methods you mean

sturdy oar
#

you could technically check the entity UID and ignore the event if it's the same one being summoned

#

not the best idea prob. tho

fading owl
#

avro couldnt you just change event prio?

dusty topaz
#

uhh, no?

fading owl
#

okay

inland depot
#

    public TestEnchant(@NotNull NamespacedKey key) {
        super(key);
        // TODO Auto-generated constructor stub
    }

    @Override
    public @NotNull String getName() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public int getMaxLevel() {
        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public int getStartLevel() {
        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public @NotNull EnchantmentTarget getItemTarget() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public boolean isTreasure() {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isCursed() {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean conflictsWith(@NotNull Enchantment other) {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean canEnchantItem(@NotNull ItemStack item) {
        // TODO Auto-generated method stub
        return false;
    }

}

These are all the methods that are automatically added to the class when you extend Enchantment. How can I add more methods to this?

sturdy oar
#

you write them?

dusty topaz
#

add abstract methods to Enchantment class

inland depot
#

is there a way to automatically add them whenever i extend Enchantment in a class?

dusty topaz
#

looking at source (though it's paper source), I can't see world#spawnEntity calling an event

inland depot
#

actually no i think i got it

#

thanks for the help πŸ™‚

dusty topaz
#

nope, I found it

#

it does call event

#
            if (!CraftEventFactory.doEntityAddEventCalling(this, entity, spawnReason)) {
                return false;
            }
inland depot
#

nvm i didnt solve it.

I want to be able to have methods automatically added just like all the other methods that are added whenever I extend Enchantment. Anyone have any idea how to do this? (and no i dont mean just write them)

dusty topaz
#

.. add abstract methods

#

to enchantment class ..

inland depot
#

i cant edit the enchantment class tho

dusty topaz
#

then make another abstract class that extends Enchantment

#

add methods to that

#

and then extend that one instead

inland depot
#

i'll try that, thanks

gray plume
#

Is there a way to disable NametagEdit in certain worlds?

dusty topaz
#

not that i know of

#

could write a plugin for it though

#

api would allow for something like that

gray plume
#

The only reason why I'm asking is because it overrides a skywars plugin I use, which gives team colors in the tablist.

dusty topaz
#

ah, in that case probably not

#
    @EventHandler(priority = EventPriority.HIGHEST)
    public void onSpawnEvent(SpawnerSpawnEvent event) {
        int spawnerAmount = spawnerManager.getAmount(event.getSpawner().getLocation());
        event.setCancelled(true);
        Location location = event.getEntity().getLocation();
        for (int i = 0; i < spawnerAmount; i++) {
            for (int j = 0; j < ThreadLocalRandom.current().nextInt(3) + 1; j++) {
                Bukkit.broadcastMessage("Spawning an entity of type: " + event.getEntityType());
                spawn.add(location.getWorld().spawnEntity(location, event.getEntityType()).getUniqueId());
            }
        }
    }

    @EventHandler(priority = EventPriority.HIGHEST)
    public void onEntitySpawn(EntitySpawnEvent event) {
        if (spawn.contains(event.getEntity().getUniqueId())) {
            event.setCancelled(false);
        }
    }
#

that doesn't even work whaaattt

fading owl
#

how doesnt it work

frigid ember
#

On my spigot server, the server is returning true for player.isFlying() when they're not and they're on the ground

dusty topaz
#

hmm, so the entityspawnevent isn't called

#

@frigid ember does player.isOnGround() return true

frigid ember
#

yes

dusty topaz
#

pretty sure player.isFlying() isn't related to it anyway

#

i think it's only set to false if they double tab space again

#

though not sure - actually i think im wrong with that

frigid ember
#

I'll admit its 1.8.8 and 1,906 versions behind

dusty topaz
#

no clue why tbh

frigid ember
dusty topaz
#

it claims to be spawning

frigid ember
#

i'll just make a scheduler that'll set flying false if they're on ground both from their packet and util Β―_(ツ)_/Β―

#

hey! a player says he keeps crashing and gets this error. could this be my server or the players client?

#

Client

#

Looks like they don't have enough ram allocated

frozen cedar
#

Running out of graphic card memory?

frigid ember
#

so running out of gpu memory? any ways this player could fix it?

fleet crane
#

Is his gpu above the minecraft minimum specs

vernal spruce
#

hes most likely running one of those

#

intel integrated graphics

fleet crane
#

Given it looks to be an older igpu it probably isn’t

tidal pulsar
#

We are 2020 and people still have memory problems :d

vernal spruce
#

There are always unfortunate ones

#

who cant afford

tiny dagger
#

well because software feels like they have too much and they can extend over the actual needed memory

tidal pulsar
#

My intel platinum with 4gb could even run mc at 15 fps

vital copper
#

I remember back in 2016 when I had a crappy laptop, and Optifine would boost my frames from 20 to 25. The good days.

severe hemlock
#

hi

#

so i run a server.

#

I keep editing the MOTD and Resource Pack sections (hosting using MinePack and I changed the 'resource-pack-sha1' hash value as well)

#

but nothing changes.

tidal pulsar
#

Wdym?

severe hemlock
#

my motd is stuck to "in Lobby" in green

#

i can';t change it for some reason

#

but if I boot my server using the "Minecraft 1_15_2" jar file which is Mojang;s official build then everything works fine

#

thats why im here

#

i think its either Spigot or one of the plugins.

tidal pulsar
#

MOTD of the Resource Pack keeps being "in Lobby" in green?

severe hemlock
#

i'm not getting errors though

#

no

#

the motd shown under the server if I add it

dusty topaz
#

How would you allow a spawner to spawn mobs at all times of day (ie it cannot spawn enderman or zombies during the day)

#

(Programmatically)

severe hemlock
#

the Resource Pack doesn't load

tidal pulsar
#

Provide screens if possible and what you are trying to proceed cuz I've no idea what you are doing

severe hemlock
#

ok

#

so

#

here

keen moth
#

@dusty topaz Listen for CreatureSpawnEvent, check if the SpawnReason is SPAWNER then check for the world's time of day

severe hemlock
#

I boot server here:

#

this is my server.properties file:

dusty topaz
#

is creasture spawn event cancelled automatically?

severe hemlock
#

#Minecraft server properties
#Thu Apr 30 15:28:02 PDT 2020
spawn-protection=16
max-tick-time=60000
query.port=25565
generator-settings=
force-gamemode=false
allow-nether=true
enforce-whitelist=false
gamemode=survival
broadcast-console-to-ops=true
enable-query=false
player-idle-timeout=0
difficulty=hard
spawn-monsters=true
broadcast-rcon-to-ops=true
op-permission-level=4
pvp=true
snooper-enabled=true
level-type=default
hardcore=false
enable-command-block=true
max-players=64
network-compression-threshold=256
resource-pack-sha1=36ba223b364d6bdb60a8bef108fa836baba4d7aa
max-world-size=29999984
function-permission-level=2
rcon.port=25575
server-port=25565
debug=false
server-ip=192.168.0.102
spawn-npcs=true
allow-flight=true
level-name=spawn
view-distance=10
resource-pack=https://download.mc-packs.net/pack/36ba223b364d6bdb60a8bef108fa836baba4d7aa.zip
spawn-animals=true
white-list=false
rcon.password=
generate-structures=true
online-mode=false
max-build-height=256
level-seed=
use-native-transport=true
prevent-proxy-connections=false
motd=PMC87881caf0a6d8e05b8d1469413ca38e0
enable-rcon=false

dusty topaz
#

jesus...

keen moth
#

What do you mean cancelled automatically? No event is cancelled automatically unless manually called.

#

@severe hemlock Use a paste site next time, please.

#

?paste

worldly heathBOT
dusty topaz
#

then how would that solve spawning zombies from spawners during the daytime

severe hemlock
#

sorry

#

usually for long messages discord sends a .txt file instead

#

thats why

keen moth
#

You would need to cancel it yourself.

dusty topaz
#

i don't want to cancel it

#

i want night mobs to be able to spawn during the day πŸ˜…

#

(and night)

#

(all mobs spawning anytime)

dusky herald
#

I mean, it wouldn't really be too big of a problem to paste it into discord either, it's just a lot easier on the eyes if you use the `(``) tags (without the ( ))

#

<stuff here>

severe hemlock
#

like this?

dusky herald
#

yes

#

but with 3 of them for larger blocks

severe hemlock
#

or this?

#

or like this

dusky herald
#

like that

#

^

severe hemlock
#

ok

#

so my mc server still doesnt work

dusky herald
#

What's wrong with ti

severe hemlock
#

well it works

#

but i can't change the MOTD

#

and I can't change the Resource Pack

dusky herald
#

I mean, they should just work.

#

I really think the problem is you just aren't running Spigot.

#

If you're running Minecraft's server jar, you aren't using Spigot.

#

You run one or the other.

severe hemlock
#

the plugins I use are:

AlwaysSpawn
BuildMoney v3.9
CKits v1.06
CrazyEnchantments v1.8-0
CustomItems
DeadChest-3.2
Dynmap-3.0-beta
EssentialsX
Dynmap-GriefProtection
Dynmap-WorldGuard-1.2
Dynmap-Essentials-0.9.1
EssentialsX
FogusCore
GoldenEnchants
GriefProtection
GWarp
InvSort 1.1.0
ItemEdit
KnokkoCore
LuckPerms-Bukkit-5.0.72
MoreArmors
Multiverse-Core-4.1.0
Multiverse-NetherPortals
Multiverse Portals
OpenInv
Parties 2.6.14
PetMaster
QuickShop 3.1.4.31
Shopkeepers 2.9.3
TrollBoss_v6.2
UHCRun-1.2
Vault
VeinMiner-1.15.0
WildTP
WorldEdit
WorldEdit SUI
WorldGuard
#

All of my plugins work

paper compass
#

jesus

severe hemlock
#

i am running the 'Spigot.jar' file

paper compass
#

Whats the problem with doing:
ArrayList<UUID> players?

instead of:
List<UUID> players?

dusky herald
#

Nothing.

paper compass
#

Why do people always say use List

tiny dagger
#

is that alwaysspawn made by me? :p

dusky herald
#

It's an interface

#

You may get more expanded uses out of using it

severe hemlock
#

if i run the minecraft_1.15.2.jar file then the Resource Pack works

dusky herald
#

other than that there shouldnt really be any difference.

severe hemlock
#

and @tiny dagger pretty sure it is

tiny dagger
#

:d

dusky herald
#

I personally use List<X> list = new ArrayList(); but I dont really see a reason not to go the other way around, unless you dont want to refer to array lists later on

#

So, you could theoretically create your own List class that implements List

#

and that could be a reason why you would want to use List over ArrayList, since ArrayList is just another class that interfaces off of List

paper compass
#

How do I make a vargs? I forgot

dusty topaz
#

Object ... args

paper compass
#

Ah

#

I forgot an extra .

#

ty

dusky herald
#

So really, with that said; it's good practice to use List<UUID> list = new ArrayList(); over ArrayList<UUID> list = new ArrayList();

#

same vice versa, like Map<String, UUID> players = new HashMap();

#

Other than that, there's not really a difference, besides making your code better for future changes

paper compass
#
        this.spawn = spawn;
        this.name = name;
        for (Location checkpoint : checkpoints) {
            this.checkpoints.add(checkpoint);
        }
    }```
dusky herald
#

It's just good to use the supertype.

paper compass
#

Should I do that

boreal tiger
#

also for players you should use a Set if possible as it is faster

paper compass
#

Aight

boreal tiger
#

and the same principle @dusky herald mentioned applies:
e.g. Set<UUID> players = new HashSet<>();
You should do this instead of
HashSet<UUID> players = new HashSet<>();
this is the liskov substitution principle

paper compass
#

I did that

boreal tiger
#

ah right

paper compass
#

I always wondered what people meant by LSP

boreal tiger
#

now you know πŸ˜› xD

paper compass
#

lmao

agile rock
#

How do I make my plugin not lag the server?

tiny dagger
#

you're running the code at least as possible caching stuff that can be reused

agile rock
#

So the more calls i make to my database the more it lags?

#

and/or api

dusky herald
#

You should be making calls to the Database Async anyways

#

But, whatever data you plan on using the most, and most frequently that probably doesnt ever change much should be cached when the plugin loads.

agile rock
#

But what if its data that needs to be updated immediately, such as a players balance?

zenith siren
#

How do make a alias to a bungeecord command?

#

Nvm I got it

severe hemlock
#

when I set my Resource Pack it doesn't work

#

on my server's server.properties file

#

MOTD doesn't work either

rich elk
#

How do I change config to work with beds in Eggwars X? I have BED set in config I look at a bed and it just says you must look at a BED to set a teams bed no error is logs either. I would really appreciate your support on this.

#

this is the plugin

severe hemlock
#

HELP

#

please

boreal tiger
#

?ask

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.

agile rock
#

So does async mean thats its not running on the current server thread

#

?

dusty topaz
#

it's not running on the main thread

frigid ember
#

anyone know how to fix the ENTITY_LIGHTNING sound effect for 1.8.9 clients on spigot 1.15.2 servers using protocolsupport? im custom coding a plugin and im not sure how to convert the newer sounds to the legacy sound

#

I know its possible with protocollib but idk where to start

dusky herald
#

@agile rock You load that information in when the player logs in, and cache it after they log in.

#

Keep it all Async, and just plan out when you load the data, so that its easily accessible later (so you arent waiting on database delays)

#

You can cache the data for players who are online and unload it when they log off.

#

and save their data on the fly

agile rock
#

So save bal info every x minutes? Since if the servers crashes all the info is lost

dusky herald
#

You can save balance whenever it changes

#

Loading is just different because you may be relying on the delay, so you want it to happen ASAP, then there's no reason to load more data between then (for most purposes)

#

as for saving, keep it Async, and you can save data as you go

#

Rather than every X minutes, you can save when a player performs an action, the server won't be relying on data to return

frigid ember
#

any ideas?

#

My problem is 1.8.9 clients can't hear lightning sounds on 1.15.2 servers

dusky herald
#

@frigid ember Sorry, no clue bud.

frigid ember
#

mmm this is a toughy

#

might have to look into protocol lib and modify packets right on the spot

#

but even then that might not work

boreal tiger
#

should probably just stop using 1.8 πŸ˜‚

frigid ember
#

lol the problem is a lot of people still use 1.8

#

look at hypixel, almost all the youtubers use 1.8.9 to pvp

#

and i cant miss out on that 30-40% of players who still use it (just a guess off the top of my head)

agile rock
#

Ok, so what should I make async? @dusky herald

sturdy oar
#

update your server πŸ‘

#

1.8 is real bad

frigid ember
#

....

rich elk
frigid ember
#

1.7, 1.8 has better pvp than 1.9x

#

my server isnt running 1.8, its running 1.15.2 with protocolsupport. but the nabs who still use 1.8 can't hear lightning sound effects, which is a big problem

#

and i cant force people to update

sturdy oar
#

Oh ok,

dusky herald
#

@agile rock Make everything that handles the database Async, lol

strange grove
#

hey

#

does anyone here know how to make a custom map that combines

#

together

#

to form one large singular image?

#

using spigot of course...

#

hello?

#

@anyone

#

plz help

unreal hedge
#

@strange grove use ImageOnMap's API?

frigid ember
#

plugin.getConfig().getList("some-list")

How can I make some-list into a string with newlines?

marsh hawk
#

@frigid ember what do you mean by newlines?

frigid ember
#

list item 1
list item 2

marsh hawk
#

So you want to put all items from a String list into a string?

frigid ember
#

nvm figured it out πŸ™‚

wanton delta
#

anyone happen to know where i can find the 1.13 version of this?