#help-archived

1 messages · Page 163 of 1

zealous lynx
#

try getPotion() instead maybe?

#

nvm, zzz im derping, need to go to bed before i say anything else dumb

lone fog
#

@frigid ember you can’t have it change until you click done because it isn’t sent to the server until then

green cedar
#

FYI, both get ent shooter and pot shooter return null.

#

Test results FullPotato ?

granite kiln
#

Hey, if i use setworldspawn in each dimensions, is it going to set a worldspawn per dimension or it's going to be like vanilla, move the spawn for every dimension to those coordinates?

green cedar
#

If im understanding you correctly... A World is a map is a dimension.

#

Or is multiple dimensions on a single map?

granite kiln
#

somehow you completely lost me there that was too deep 😂

green cedar
#

The server (spigot) sees a map a world. Like overworld is one map, nether is one map, the end world is one map.

#

Is that what you mean by dimensions?

granite kiln
#

When i say dimension i mean overworld/nether/the_end

green cedar
#

Yes, each one of those is a world (aka map) so each has its own spawn which can be set with .setWorldSpawn()

#

They are independent of each other.

granite kiln
#

okay 🙂 Thanks! Asking because in vanilla using the in game command setworldspawn would move the coordinates for all of them

green cedar
#

Don't know, never used vanilla. But if you using spigot API then setting it per world they are independent.

frigid ember
#

@lone fog check the imgur link i sent

#

how do i make it liket aht

#

*that

#

finally got around to doing it

#

@green cedar

#

mines null too

#

i tried it with a EntityShootBowEvent

granite kiln
#

@green cedar it worked like a charm! Thank you

frigid ember
#

id post something on JIRA but ive never done so before

#

i dunno how to format my post

#

ah theres bug report guidelines

stark oxide
#

I have a little problem. First, I am calling Player.setBedSpawnLocation(World.getSpawnLocation()) and right below I call System.out.println(Player.getBedSpawnLocation()) and it prints null. World.getSpawnLocation(), however, is not null, as I also print it and it does not print null.

#

What am I doing wrong?

#

I solved it by calling Player.setBedSpawnLocation(World.getSpawnLocation(), true)

peak glade
#

he

cerulean musk
bright forge
#

@cerulean musk Plugins lagging: Citizens, KitPvP

#

Try removing/replacing that plugins

inland oxide
#

on a hippie trail head full of zombie...

peak glade
#

hello

#

i want unknown command

inland oxide
#

ok, I send you

peak glade
#

ok

#

hello anyone ?

#

hello ?

inland oxide
#

sorry.

#

أتمنى أن تكون على ما يرام.

peak glade
#

ok 😦

inland oxide
#

still here

#

got any log message?

frigid ember
karmic island
#

Is there a webhook with which I get a message in Discord when someone is having a discussion,

frigid ember
#

poop

peak glade
#

name ?

kind dawn
#

Hi, I have a problem. Because my colleague cannot join my server, but he can play on other servers. My server works the most, I have the latest build engine on 1.15.2. My server was working before (about a week ago), then not anymore. What is displayed to him: "Internal Exception: io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: Invalid key. Must be [a-z0-9 /._-]:" link to the screen of this: https://imgur.com/a/9Gmouf2

peak glade
#

hello anyone ?

undone narwhal
#

@peak glade ???

#

Hi there, I have a start.sh file in /home/coolfolder

peak glade
undone narwhal
#

How can I start a screen with a name without attaching to it and running a command inside ?

peak glade
#

hmmm

inland oxide
#

omg, that's so good, wait, i need to get another drink...

frigid ember
#

I am trying to make a minigame plugin and want to save and restore words. ingrim4 said in the forums that unloading the world should be the easiest solution: https://www.spigotmc.org/threads/reset-arena-world-after-game-ended.133551/ Can someone explain me how exactly unloading a world works and do i need to load it again?

#

What is unloading a world exactly?

#

Can i still go in the world after unloading it?

undone narwhal
#

@frigid ember The best way I would suggest you is to use SlimeWorldManager. Load your world in readOnly(true) and after the game unload it and reload it!

frigid ember
#

i have a question, simple one. where can i find 1.16.1 plugins cause i think lower versions dont work on 1.16.1

#

@frigid ember On the spigot resources page

#

after that

#

i need 1.16.1 filter

#

damn

#

1.16.1 has barely any plugins that im looking for

#

thanks for the help

#

@frigid ember The best way I would suggest you is to use SlimeWorldManager. Load your world in readOnly(true) and after the game unload it and reload it!
@undone narwhal Do i need to have that plugin installed too? I want to keep it standalone.

undone narwhal
#

Yep... The other way is save your world in another file. Copy the directory, load the copied directory -> Play on it and once it's done, unload the world, remove the directory and restart from beginning

frigid ember
#

ok

#

Do 1.16 plugins work on 1.16.1

#

yes

#

ok bet

fossil shoal
#

There are no 1.16 plugins

#

As there is no 1.16 spigot

neat oxide
#

Yeah we kinda skipped 1.16

#

xD

frigid ember
#

@undone narwhal hm would maybe setting a worlds auto save to false -> unloading the world on game end -> loading the world via creating work?

undone narwhal
#

If you can disable saving it will work

frigid ember
#

#setAutoSave(false)

#

ok i will try it with this way

#

And i should activate world saving on loading it again because some builder might want to improve it.

undone narwhal
#

Wym ?

frigid ember
#

Maybe some builder goes into the world when no game is running and want to build some stuff. If the server doesn't save it the stuff might get lost.

undone narwhal
#

I think that /save-all command overrides the disabled autosaving

#

But it is preferable to build the map outside of the game server

frigid ember
#

Yeah, but i think some builder forgets to run this command after building.

#

Its just a small thing that can help.

undone narwhal
#

Yeah sure

granite spade
#

Finally, I can breathe

#

Hi, is there a way to write plugins with nodejs for spigot?

#

I'm looking forward to combining my Discord game bot into Minecraft for interactive play

#

So they can bridge ingame experiences

frigid ember
#

@granite spade I think your Bot doesn't need to be in JS

granite spade
#

I mean, the entire bot is made on NodeJS

#

So I want to be able to extend protocols like character steps

#

I saw something called node-spigot

undone narwhal
#

Just found that

granite spade
#

But I have a tough time wanting to trustit

#

Unless it's proven to work on the latest version

undone narwhal
#

I would recommend you working with a pub/sub service between a java plugin and your bot

#

This is safer and more stable

#

Use a service like Redis

granite spade
#

HTTP protocol based?

#

It's possible but I've never worked on Java before

#

I'll try to get node-spigot up and see if it does anything

undone narwhal
#

Not HTTP, but with Redis connection (simple as baking pastas)

granite spade
#

If that doesn't work out, Java it is

#

Ah

#

I see

#

I'll research on it now

#

I don't know how to prepare pasta

undone narwhal
#

It's impossible man

#

Just put water salt and boil it

#

Put the pasta on it

#

Read the time and take the pasta

neat oxide
#

Really you dont know how to cook pasta?!

visual berry
#

what I've just heard

#

I'm italian guys

#

I don't know how to prepare pasta
@granite spade you should really learn

granite spade
#

Yes sir ;w;

#

I can bake cakes, make shawarmas, and do anything to give fat

#

Just never made pasta before

visual berry
#

yep

peak glade
#

hello how turn off pvp please ?

#

can help

neat oxide
#

....server.properties - pvp=false

#

@peak glade

peak glade
#

hmm

#

so pvp map

neat oxide
#

?!

peak glade
#

i want is spawn off pvp

neat oxide
#

use worldguard region flags for that

peak glade
#

yes i have

neat oxide
#

Then it should work

#

otherwise contact enginehub for support

#

this is for spigot support

peak glade
#

hmmm ?

#

so that support anything ?

neat oxide
#

We dont provide support for plugins only for spigot to get support for plugins contact the authors of the plugin

naive goblet
#

@peak glade I can help

#

I’d say this channel is for plugins support as well. But certainly not as good as the development support.

peak glade
#

oh ok

naive goblet
#

You want to turn on or off pvp?

unkempt dock
naive goblet
#

You’d have to create a region with world edit in either ways and then if you have worldguard simply type /rg flag <region> pvp <deny/allow>

unkempt dock
#

always returns false, but the location is the same

naive goblet
#

Obviously

unkempt dock
#

oh .equals

naive goblet
#

Use .equals

unkempt dock
#

hah i'm dumb

sturdy oar
#

I have one stupid question, when you're publishing a spigot plugin on GitHub, is there any benefit from not excluding ".iml" files?

unkempt dock
#

gitignore

sturdy oar
#

?

unkempt dock
#

add this file to your project

#

and change stuff inside

sturdy oar
#

that's not what i asked lol

unkempt dock
#

ah

#

sorry lmao :d

sturdy oar
naive goblet
#

Fendi I mean often people do it because no one needs to see your .iml files. But I wouldn’t say there is no really benefit doing so.

sturdy oar
#

I'll put it in, it doesn't hurt

#

it should make life easier for other people contributing with IntelliJ IDEA

naive goblet
#

Yeah sure. If the iml files have some sort of impact on the project entirely you might want to include those.

torpid field
#

might seem like a dumb question but how do i translate the direction a player is facing to coords like: if player is facing ?? go to to x:? y:? z:? and create an explotion

#

sorry i dont understand you can you try to explain more?

naive goblet
#

I mean use getFacing()

#

Then you’d have to call getDirection() which probably gives you a vector that you then can use to teleport the player to

torpid field
#

ima look into everything u said im just a bit slow

#

what if the player isnt looking at a block?

fervent ridge
#

are offline players not recognized as player in bungeecord?

#

i have a friend who joins my server without a minecraft account and i cant send him to other servers or see him in /glist

#

it just says that player is not online

#

but hes indeed online

pastel arrow
#

Is he joining through the bungee IP or the servers direct IP?

fervent ridge
#

bungee

#

wait

pastel arrow
#

I'd make sure about that

fervent ridge
#

i just asked and he said he used the direct ip

#

bruh

#

ok thx

torpid field
#

How can i make a raycast?

sleek lake
#

what is the difference between plotsquared core and plotsquared bukkit?

tiny dagger
#

the core contains general code

#

whilile bukkit has the bukkit specific one

glacial rock
#

What event gets fired when a crossbow gets loaded?

#

it consumes the arrow before firing

torpid field
#

how can i make a loop that will run for 10 seconds?

neat oxide
#

20*10 = 10 seconds

#

just start a bukkit task with that

torpid field
#

ok ty

#

can u link me the bukkit task docs?

inland oxide
#

ok i managed to scare them all away

torpid field
#

what lol?

kind dawn
#

Hi, I have a problem. Because my colleague cannot join my server, but he can play on other servers. My server works the most, I have the latest build engine on 1.15.2. My server was working before (about a week ago), then not anymore. What is displayed to him: "Internal Exception: io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: Invalid key. Must be [a-z0-9 /._-]:" link to the screen of this: https://imgur.com/a/9Gmouf2

grim halo
#

Try deleting his playerdata

#

If its not important

wise spoke
#

i am really confused by PerWorldInventory. i have some worlds split into groups. my hub island is ran by deluxehub. when i go back to the world in the other group the inventory is gone.

Config: (worlds.yml)

groups:
default:
worlds:
- world
- party
default-gamemode: SURVIVAL
creative:
worlds:
- superflatcreative
- normalcreative
- creativehub
default-gamemode: CREATIVE
respawnWorld: world

frigid ember
#

how to check if a boolean in the config.yml is set to true in path woodgilde.lvl1

grim halo
#

@wise spoke You are better off asking the plugin dev for help.
@frigid ember DO you want to check a boolean in your config.yml that lays in the path "woodgilde/lvl1/" ?

frigid ember
#

yes

#

so it can either be true/false in config in path
woodgilde
lvl1: boolean

grim halo
#

Do you know how to get the FileConfiguration instance?

#

So

  1. JavaPlugin#getConfig() that returns a FileConfiguration
  2. FileConfiguration#getBoolean("woodgilde.lvl1") returns the boolean
wise spoke
#

i have checked the github and it says a legacy version might help. i am running mc 1.8.9 spigot and the latest version of pwi. strange stuff

grim halo
#

In the latest version it clearly says:
Native Minecraft Version: 1.13
Tested Minecraft Versions: 1.13 1.14 1.15

#

so everythin below 1.13 should not work

wise spoke
#

you talking to me?

grim halo
#

Yes

#

So get an old version that supports 1.8

wise spoke
#

yep

#

sorted

#

running version 2.0.0kt now

#

works good

grim halo
torpid field
#

how can i see if an arrow has hit a wall or the ground?

grim halo
#

Or do you want to differentiate between walls and the ground?

torpid field
#

no just if its still in the air or it has hit something

#

i might have found a solution

#

check if the arrows velocity is 0 or less

grim halo
#

Thats not save. If you get an arrow that is no longer affected by gravity from some other plugin then you get arrows with a velocity of 0 that just floats somewhere

torpid field
#

oh didnt think of that

grim halo
#

@torpid field What kind of arrows do you want to track?

torpid field
#

kind of arrow?

grim halo
#

Like... do you only need to track arrows a player has shot?

gleaming gate
#

Can you just use a ProjectileHitEvent lerdyr?

torpid field
#

ive done Arrow a = p.launchProjectile(Arrow.class); with p being the player

grim halo
#

Ah. Ok. What version?

torpid field
#

1.8

grim halo
#

uh...

#

Ok.
On launch -> get scoreboard tags of arrow and add "IN_AIR" or something
On ProjectileHitEvent -> get get scoreboard tags of arrow and remove "IN_AIR"
Now you can check if an arrow is still in air. This method even persists over Server restarts.
So if you shoot an arrow in the air -> restart the server -> the arrow still has the tag

wise spoke
#

already got it downloaded

#

thanks for help @grim halo

grand lotus
#

hey guys, is there a bug with villager trading on bungeecord 1.16.1? im running R0.1 spigot as the server. no gui pops up when right clicking, although if i connect to the spigot server directly it works fine

#

appreciate the help :))

torpid field
#

oh thats well thought out i must say tysm @grim halo

lone fog
#

Pretty sure you can just check !arrow.isInGround

dire trail
#

@sturdy oar u said it was impossible to get good performance out of free hosts. I did the optimizations i linked and now my Aternos runs very well. 21 ticks per second

sturdy oar
#

damn son

#

i optimized on my MOS 6502 and i have 30TPS

grim halo
#

I changed the TPS field in minecraft to 200 now i got 200 TPS

queen loom
#

where can I get the Spigot 1.8.9 source code?

grim halo
#

@frigid ember I dont think there is a way to check if a player click comes from a single mouse press. I would go with a time limitation.
[0ms] click -> allow
[50ms] click -> deny
[100ms] click -> deny
[150ms] click -> deny
...
[1000ms] click -> allow

tiny dagger
#

@queen loom use build tools

queen loom
#

@queen loom use build tools
@tiny dagger what is that? And how does it work

wise spoke
#

how would i stop people with a certain rank accessing a world on multiverse core? example people with the uncommon role can access but the default role cannot

#

*rank

crisp widget
#

multiverse.access.WORLDNAME

wild token
#

im pretty sure this question has been asked before but why dosn't bungeecord use gradle for its build process?

crisp widget
wise spoke
#

thanks

#

so if i gave one rank .access.world then it auto blocks every other rank unless given perm?

frigid ember
#

about the armorstand plugin, what button should i press on the menu, using the left or right mousse button it doesnt register, at this point commands were the only thing to work for me

kind dawn
#

Try deleting his playerdata
@grim halo it did nothing

kind dawn
#

Hi, I have a problem. Because my colleague cannot join my server, but he can play on other servers. My server works the most, I have the latest build engine on 1.15.2. My server was working before (about a week ago), then not anymore. What is displayed to him: "Internal Exception: io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: Invalid key. Must be [a-z0-9 /._-]:" link to the screen of this: https://imgur.com/a/9Gmouf2

undone narwhal
#

Do you have a proxy?

#

Like bungee or velocity ?

robust night
#

Hello,

I have an issue I tried to fix but nothing has worked ! When starting my server, I got some java.util.zip.ZipError: zip END header not found in plugins while enabling. I got the issue with Spigot and Crafbukkit (and Paper if that's worth mentioning).
The issue does not seems to come from a specific plugin as each plugin, alone, are working fine. Just the conbination of them is causing this (and not always the same conbination)

[Minecraft version: 1.15.2]

LuckPerms full stacktrace :

[17:32:05] [Server thread/ERROR]: Error occurred while enabling LuckPerms v5.1.55 (Is it up to date?)
java.util.zip.ZipError: zip END header not found
        at com.sun.nio.zipfs.ZipFileSystem.zerror(ZipFileSystem.java:1624) ~[zipfs.jar:1.8.0_252]
        at com.sun.nio.zipfs.ZipFileSystem.findEND(ZipFileSystem.java:1040) ~[zipfs.jar:1.8.0_252]
        at com.sun.nio.zipfs.ZipFileSystem.initCEN(ZipFileSystem.java:1049) ~[zipfs.jar:1.8.0_252]
        at com.sun.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:130) ~[zipfs.jar:1.8.0_252]
        at com.sun.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:139) ~[zipfs.jar:1.8.0_252]
        at java.nio.file.FileSystems.newFileSystem(FileSystems.java:390) ~[?:1.8.0_252]
        at me.lucko.luckperms.bukkit.LPBukkitBootstrapL10.a(Unknown Source) ~[?:?]
        at me.lucko.luckperms.bukkit.LPBukkitBootstrap.onEnable(LPBukkitBootstrap.java) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[craftbukkit-1.15.2.jar:git-Bukkit-be6aaf0]
        and 8 others...```
cerulean musk
#

Guys how can i disable drop items on death? İs there a plugin ?

robust night
#

If someone has any idea of how to proceed, I'd be glad to know !

rare prairie
#

@robust night

        at me.lucko.luckperms.bukkit.LPBukkitBootstrapL10.a(Unknown Source) ~[?:?]
        at me.lucko.luckperms.bukkit.LPBukkitBootstrap.onEnable(LPBukkitBootstrap.java) ~[?:?]

this should be reported to luckperms

#

@cerulean musk /gamerule

robust night
#

No, because LuckPerms on its own (exact same jar file) is working

#

And (same server instance of the LuckPerms stacktrace):

[17:32:07] [Server thread/ERROR]: Error occurred while enabling ore-control v2020.04.19 (Is it up to date?)
java.util.zip.ZipError: zip END header not found
        at com.sun.nio.zipfs.ZipFileSystem.zerror(ZipFileSystem.java:1624) ~[zipfs.jar:1.8.0_252]
        at com.sun.nio.zipfs.ZipFileSystem.findEND(ZipFileSystem.java:1040) ~[zipfs.jar:1.8.0_252]
        at com.sun.nio.zipfs.ZipFileSystem.initCEN(ZipFileSystem.java:1049) ~[zipfs.jar:1.8.0_252]
        at com.sun.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:130) ~[zipfs.jar:1.8.0_252]
        at com.sun.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:139) ~[zipfs.jar:1.8.0_252]
        at java.nio.file.FileSystems.newFileSystem(FileSystems.java:390) ~[?:1.8.0_252]
        at de.derfrzocker.ore.control.OreControlL10.a(Unknown Source) ~[?:?]
        at de.derfrzocker.ore.control.OreControl.onEnable(OreControl.java) ~[?:?]```
#

With many other plugins

undone narwhal
#

What's your OS? Did you run the server with the correct permissions?

robust night
#

OS:
Linux ****** 4.9.0-12-amd64 #1 SMP Debian 4.9.210-1+deb9u1 (2020-06-07) x86_64 GNU/Linux

wind dock
#

anyone here know any good score tracking plugins with preferably placeholders and such :/

#

Like point tracking

robust night
#

Java:

openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1~deb9u1-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)```
#

And for the permissions, all is fine, I tried running the server as root, using the pterodactyl panel, creting folders and all from scratch, always the same issue

frigid ember
#

I wanna add 1 to my hashmap each time a player advances 10 levels
which event should I use

robust night
frigid ember
#

perfect thanks

torpid field
#

im running 1.8 and somehow this dosnt run? ```public class playerInteract implements Listener

{

@EventHandler
public void PlayerInteract(PlayerInteractEvent e)
{
    Player p = e.getPlayer();


            
    if (p.getItemInHand().getType() == Material.STICK) 
    {
    
        if(e.getAction() == Action.LEFT_CLICK_AIR || e.getAction() == Action.LEFT_CLICK_BLOCK) 
        {
            
            Arrow a = p.launchProjectile(Arrow.class);
                
            while ( a.isOnGround() != true) 
            {
                
                for (Entity entity: a.getNearbyEntities(3, 3, 3)) 
                {
                
                    if (entity instanceof LivingEntity) 
                    {
                        
                        ((LivingEntity) entity).setFireTicks(100);
                        ((LivingEntity) entity).setHealth(0.5);
                    }
                }
                
            }
        }
            }
        }
    
}
grim halo
#

@robust night This can happen if you overwrite a plugin while the server is running or the plugin is corrupted.
Try downloading a clean version from the plugin, stop the server, upload the plugin, start the server and see if the problem persists.

#

@torpid field show us the line where you register the listener pls

torpid field
#

ok

robust night
#

Thanks, I'll try that, I'll come back if it doesn't goes right

torpid field
#

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

grim halo
#

Ok thats fine. Just a tipp: its a convention to use camelcasing when naming classes
Like: PlayerInteract
Better would be
PlayerInteractListener
You can usually rightclick -> refactor -> rename
the class in your ide

torpid field
#

ohhh ok

#

but is there anything wrong or is it just not working?

gusty comet
#

I can't get those BungeeCord Messaging Channels to work 😦

#
player.sendPluginMessage(Main.getInstance(), "lobby:bungeecord", byteArrayOutputStream.toByteArray());
#

Basically the Spigot plugin is called lobby and the bungee plugin is called System. Which channel should i use?

grim halo
#

@torpid field
Ok here is your problem:
The while loop blocks your server.
Spigot works like this:
Every 50ms a new tick starts where everything is run
|-----50ms-----|-----50ms-----|-----50ms-----| and so on. Every Block is a tick.
Every tick looks a bit like this:
[START] -> net.minecraft code -> bukkit/spigot code -> plugin code [END] | [START] -> net.minecraft code -> bukkit/spigot code -> plugin code [END] | .... and so on

So if your code uses a while loop it blocks the server from starting the next tick.
This results in EVERYTHING stopping. Player connections, Mobs on the server everything.
So you cant just run a while loop and wait for something to happen. You have 2 options:

  1. Check every tick if the arrow has landed.
  2. Use an event to check when the arrow has landed and react to it.
    Latter is prefered.
torpid field
#

wow ok thank you for helping me

#

i was stuck on this for an hour xD

#

im shit at programming

subtle blade
#

Everyone starts somewhere

torpid field
#

true

wheat mirage
#

Getting this error loading another plugin I don't have the source to

#

I've compiled the version of factions myself, and the class does exist in the jar in the plugins folder

#

The dependency is in plugin.yml and works fine

#

But this error is still occuring

#

Very confused

#

There are also other classes used in the plugin from factions, but I can't test whether those work as the plugin never enables

#

Any ideas?

grim halo
#

@wheat mirage look into your compiled jar and check if the class exists !with the same path!

wheat mirage
#

As I said, I've looked and it does

grim halo
#

And you made sure this version of factions did actually load?

wheat mirage
#

What?

ember heart
#

Did it load properly when you started your server

#

Is what he means

#

If an exception/error happend causing the dependency to disable that'll explain your problem

wheat mirage
#

That's a good idea

#

I'll check that out

ember heart
#

@torpid field your name means clay animal in danish ❤️

torpid field
#

aha

#

yes

#

donkeys say "ier" or something like that

#

How would i go about making a line infront of the player that gets longer until it hits 10 blocks and setting fire to the entitys around that line?

#

im stuck D:

grim halo
#

You would use a RayTraceResult. Im not sure if it is exposed in 1.8

#

Oh wait. If you dont want to get the first hit block/entity you can just solve that problem with vectors

#

Wait a min ill write you an example

frigid ember
#

How to get this character in minecraft |

torpid field
#

copy paste?

frigid ember
#

I i copy its looks likes this

grim halo
#

Wait...

#

i cant send screenshots...

#
  public void igniteAtDistance(final Player shooter, final double distance, final double radius, final int fireTime) {
    // Get head location of player
    final Location eyeLocation = shooter.getEyeLocation();

    // Get direction the player is looking it (always has the length 1)
    final Vector direction = eyeLocation.getDirection();

    // Multiply the vector by a fixed amount
    direction.multiply(distance);

    // Add this offset (Vector is basically just x, y, z) to the location
    final Location hitLocation = eyeLocation.add(direction);

    // Get entities nearby
    final Collection<Entity> entities = hitLocation.getNearbyEntities(radius, radius, radius);

    // Ignite them if they are living
    for (final Entity hit : entities) {
      if (hit instanceof LivingEntity) {
        hit.setFireTicks(fireTime);
      }
    }
  }
#

@frigid ember | <- this looks a bit like -> : in minecraft because of the font that minecraft uses.

torpid field
#

oml tysm!

#

I dont think you can do hitLocation.getNearbyEntities() because hitLocation isnt a entity (or have i just gotten getNearbyEntities() wrong?)

frigid ember
#

maybe u can get World from Location and use World#getNearbyEntities

grim halo
#

Oh i did this in my 1.16 project.
Maybe you have to get player#getWorld() and call getNearbyEntities as Potato said

frigid ember
#

wait did 1.16 add Location#getNearbyEntities?

torpid field
#

yea that probably works

grim halo
#

It got proably added in 1.12 or even earlier

#

Oh... or its because im using Paper...

kind dawn
#

Hi,
I have a problem with my server.
Because my colleague cannot join him, I already can.
A colleague could join earlier on the server that I cleaned, but after uploading 2 worlds - it can't.
I can play on the server the most.
Here are the logs from the console as it joins:
** [18:42:17] [User Authenticator # 1 / INFO]: UUID of player oli320 is 806d43bc-9117-31f7-b999-7040c8081465
[18:42:18] [Server thread / INFO]: oli320 [/178.235.181.134:30873] logged in with entity id 123 at ([world] 701.2347815397266, 8.0, 439.76412301045264)
[18:42:35] [Netty Epoll Server IO # 3 / ERROR]: java.lang.IllegalArgumentException: Invalid key. Must be [a-z0-9 /.-]:
[18:42:35] [Netty Epoll Server IO # 3 / ERROR]: java.lang.IllegalArgumentException: Invalid key. Must be [a-z0-9 /.
-]:
[18:42:35] [Server thread / INFO]: oli320 lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: Invalid key. Must be [a-z0-9 /.-]:
[18:42:36] [Server thread / INFO]: oli320 left the game
[18:42:44] [User Authenticator # 2 / INFO]: UUID of player oli320 is 806d43bc-9117-31f7-b999-7040c8081465
[18:42:45] [Netty Epoll Server IO # 3 / ERROR]: java.lang.IllegalArgumentException: Invalid key. Must be [a-z0-9 /.
-]:
[18:42:45] [Server thread / INFO]: oli320 [/178.235.181.134:2945] logged in with entity id 209 at ([world] 701.2347815397266, 8.0, 439.76412301045264)
[18:42:45] [Netty Epoll Server IO # 3 / ERROR]: java.lang.IllegalArgumentException: Invalid key. Must be [a-z0-9 /.-]:
[18:42:45] [Server thread / INFO]: oli320 lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: Invalid key. Must be [a-z0-9 /.
-]:
[18:42:45] [Server thread / INFO]: oli320 left the game **

worldly heathBOT
torpid field
#

ooc: it rlly sucks that 1.13 + is shit at handeling many players

frigid ember
#
oresMined.put(player.getUniqueId(),oresMined.containsKey(player.getUniqueId()) ? oresMined.get(player.getUniqueId())+1  : 1);```
grim halo
#

I think 1.15 is fine. 1.14 has the most problems regarding performance. 1.12 is really stable.

#

@Lazinq what? Pls give us some context and use 3x ` to post code

frigid ember
#

hash is saving each first time you mine the blocks in the EnumSet 'oresMined'
but when you do it again after it reloads it doesnt add anymore @grim halo

#

the data is saved though

grim halo
#

When you reload you have to repopulate the map.

#

Dont reload. Its bad practice and not supported by anyone.

frigid ember
#

its saved and loaded onDisable and onEnable

#

but after mining nothing is added

#

while the first x you do it it is added

#

if you get my unclear explanation

#
data:
  logsBroken: 15
  oresBroken: 12
  amountEnchanted: 0
kind dawn
#

can anyone help me? ^

frigid ember
#

So this is the location of my saved hashmaps

kind dawn
#

hey?

grim halo
#

This is more readable and faster.

    UUID playerID = player.getUniqueId();
    Integer amount = oresMined.get(playerID);
    oresMined.put(playerID, amount == null ? 1 : amount + 1);

Better would be using MutableInt from apache.commons in your hashMap.
Now pls try to explain your problem again.

frigid ember
#

made something else already but thanks xd

kind dawn
#

was it to me? xd

frigid ember
#
    public void saveEnchantments(UUID uuid, int amount) {
        if (!amountEnchanted.containsKey(uuid)){
            amountEnchanted.put(uuid, amount);
             return;
 }
        amountEnchanted.put(uuid, amountEnchanted.get(uuid)+amount);
}```
#

made this method

grim halo
#

@kind dawn Are you using a proxy? What version of minecraft do you use?

kind dawn
#

1.15.2

#

Proxy - I don't know. I'm using hosting

grim halo
#

So like... BungeeCord, Waterfall?
All i can recommend is deleting his player data from the world file.

kind dawn
#

Spigot. Can you help me delete it?

grim halo
#

Do you have an FTP access?

kind dawn
#

Yes

trail basalt
#

Hey!

I was told by a member I was capable of allowing trusted friends to download my Spigot Server folder, in which they could run the server while my machine was offline, meaning if several people had control over said files, it could possibly stay on 24/7.

However, my friend turned on the server, though it showed that it was still offline for me. He couldn't access the server either through using the IP given, and had to use his instead. I think it's because since he has said files, it's like a pre-made server that's running off of his machine and IP instead.

Is there a way to fix this? Or is it impossible? I'm thinking that creating a domain and converting the IP to that might fix it.

gleaming crane
#

my servers end and nether difficulty are locked to peaceful

#

overworld difficulty is hard

wheat mirage
#

@trail basalt That's not how networking works at all

gleaming crane
#

cannot change the end/nether difficulty with commands or from server.properties

wheat mirage
#

@grim halo holy fuck too many images use links for that many

grim halo
#

Use the world that is specified in your properties

wheat mirage
#

Does anyone know how to prevent the sound from an explosion happening if EntityExplodeEvent is cancelled?

#

This is spigot 1.8

grim halo
#

@wheat mirage You might have to intercept the sound package

left plover
#

is there a way to damage an anvil without just replacing it?

kind dawn
#

Omg thank you very much!! It works! I was nervous about it for a few days !! @grim halo THANK YOU VERY MUCH

trail basalt
#

@wheat mirage Ah.

Short and sweet.

It's a no then lol?

wheat mirage
#

@trail basalt Very simply: Each machine on the internet has an IP. You can't use someone else's IP. Domains can be used to work around this but even most DNS providers won't let you redirect a domain dynamically to different IPs, but it's possible

grim halo
#

The server runs on the machine it is executed on.
So if a different machine starts the same server the IP changes.

tiny dagger
#

hypixel did it think

#

or some clever proxy trick

royal pumice
#

i just realized i'm the first with 7 in name so i got accidentally @'d

tiny dagger
#

oh yeah

wheat mirage
#

@royal pumice could you not.

tiny dagger
#

you're in my to

#

lol

#

nvm then

wheat mirage
#

@tiny dagger Dynamic DNS is possible, but nameservers provided by the big registrars don't generrally supporti t

#

It's called load balancing if you want to look it up

grim halo
#

@trail basalt I would recommend just getting a cheap server from a host. If you only want to have a simple server
with some of your friends and no fancy plugins you can get one for a hand full of bucks per month.

#

And i mean literally less than 5

trail basalt
#

A few problems there due to personal things

I do plan on buying a host in the near future, though I recently spent 700$ dollars in total on

  1. New laptop
  2. Minibike

So I could have something to host a server on.

However, I plan to head within the direction of Aternos [An amazing server host, though I did talk shit about it within the past. All you gotta do is at least have one person on, and you're able to install software, etc] or purchasing a domain.

@wheat mirage So, I'm able to get a domain, meaning people can still run the server without having to use their IP?

#

Apologies for sounding like an idiot when it comes to laptops/computers. I'm truly not, though after receiving some weird information, my mind got jumbled.

wheat mirage
#

@trail basalt You'd have to dynamically change the dns, which isnt worth it for your acenaroo

#

situation***

#

I would just get a host

trail basalt
#

I'm kinda 15 lmao, so I don't want to rely on my parents for this stuff

grim halo
#

Like... you have layers like this | domain | some proxy | several servers |
And the proxy would have to redirect to the IP the server is currently running on.
Also there is the problem with data sharing... what if one currently runs the server and another starts with old data

trail basalt
#

😔

wheat mirage
#

@grim halo Thats not exactly right but close enough

trail basalt
#

Okay.

Let me try dumbifying this for my brain [I'm learning this stuff, so please don't get pissed at me for this]

grim halo
#

With 15 you can deliver newspaper or something for a month and then buy a server for a whole year.

#

Or just stick with one person running the server on his local machine

#

Maybe one of you got a spare laptop and parents that dont mind it running all the time.
You dont need that strong of a machine to run a server. (I even tried using a RaspberyPi 4 and it worked ok)

trail basalt
#

The data sharing is a possible problem, though I'll resolve it when I cross that bridge or problems are created.

So, can you dumbify steps I need to take if I want to utilize the technique mentioned prior? If I'm unable to do that [I'm kinda confused, as I've been told separate information beforehand]

#

Imma go offline rq to go grab a drink for my dad

grim halo
#

You would have to dynamically redirect connections.
Maybe you can write a plugin for BungeeCord/Waterfall... but even this one would have to run on some server.
Just dont. It would take some serious dedication and expertise.

rustic glade
#

I think they offer a paid service where you can have a fixed name + port

#

if you were to share the account with friends, yall could keep the same connection ip

green cedar
#

For clearing an inventory slot, is it better to set NULL or set Material.AIR ?

rustic glade
peak marten
#

Hey everyone, quick question. I need a way to check if a given entity type (string) is actually a living entity. What would be the best way to do it? Example, the method should return true if the string is ZOMBIE, but false if it is not a mob

#
   @Override
    public boolean isValidEntityType(String entityType) {

        try {
            EntityType type = EntityType.valueOf(entityType);

            //check if mob is living entity mob-creation-fix 06/07/2020
            //logic will go here to check if it is a living entity type
            return true;

        } catch (Exception exception) {
            return false;
        }

    }
dark shuttle
#

There is EntityType#isAlive

peak marten
#

thank you!

#

That's exactly what I needed

green cedar
#

if (Entity instanceof LivingEntity) { }

dark shuttle
#

It doesnt have explanation apparently

peak marten
#

@green cedar , that would not work. @dark shuttle , what you gave was the answer, thank you

hardy cedar
#
            Bukkit.ban(player):cheating```
#

Anti cheat

#

100%

dark shuttle
#

Good meme developer,
Now go #general

peak marten
#
    @Override
    public boolean isValidEntityType(String entityType) {

        try {
            EntityType type = EntityType.valueOf(entityType);
            
            //check if mob is living entity mob-creation-fix 06/07/2020
            return type.isAlive();

        } catch (Exception exception) {
            return false;
        }

    }
``` that's what I got now. That should do the trick. Thank you
hardy cedar
#

.___. @dark shuttle

rare prairie
#

also do a null check type != null && to make sure that entity is exists

green cedar
#

It does work. True it is not the only way. You can also use
if (Entity.getType().isAlive() { }

frigid ember
#

no but he does not have an Entity object

green cedar
#

But when you use instanceof it is null safe

frigid ember
#

he only has EntityType

green cedar
#

Oh? Ive never had a situation where i would have type but not the entity. I have to have the entity to get the type from it. 🙂

frigid ember
#

his sample code gets entitytype from string

#

its most likely some command

green cedar
#

Might be a better way to build that mouse trap to not use string. They have enums for that purpose.

peak marten
#

@frigid ember , Indeed. the null check will be required. @green cedar , instanceof will not work here. An EntityType cannot be cast to LivingEntity. The null check will do

#

And indeed, it is a command to create custom mobs.

green cedar
#

Understood.

#

Cleaner

tiny dagger
#

not that clean imo

rare prairie
#

please use new lines for readability

#

yepn't

dark shuttle
#

Enum.values will allocate new array, so, i would suggest Enum.valueOf

#

For ignore case thing, transform the string to uppercase, that should work

green cedar
#

Yes, that code is in use. Its been tested to work.

#

That way you dont have to force the user to type in upper or lower case.

fringe cairn
#

I'm having some trouble setting up a bungeecord project, It can't find the latest bungeecord api

#

is there a repository with bungeecord-api1.16-SNAPSHOT?

dark shuttle
#

EntityType.valueOf(input.toUpperCase()) is cheaper than the above code

rare prairie
#
        <dependency>
            <groupId>net.md-5</groupId>
            <artifactId>bungeecord-api</artifactId>
            <version>1.16-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>

@fringe cairn

#

dont forget the repo

grim halo
#

I mean apache commons lang has

 EnumUtils.isValidEnum(MyEnum.class, myValue)
fringe cairn
#

I'm using gradle, but what im using rn is compileOnly 'net.md-5:bungeecord-api:1.16-SNAPSHOT'

grim halo
#

But its pretty much the try catch valueOf stuff

fringe cairn
#

and maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }

trail basalt
#

@rustic glade May I speak to you within DMs? You offered some good information, and I don't want to clog up this channel asking questions [If you're fine with that]

rare prairie
#

Player#getScoreboard#getTeam

fringe cairn
#

So I assume I need compileOnly 'net.md-5:bungeecord-api:1.16-R0.1-SNAPSHOT'

rare prairie
#

error log?

grim halo
#

Yes... just @SupressWarnings. And we wont have any errors anymore XD
Dont suppress your warnings unless you are doing some internal casting of raw types (while exactly knowing what you are doing).

graceful sentinel
tiny dagger
#

entities

frigid ember
#

probably team name?

#

o

#

is spigotmc down?

molten wedge
#

yeah

grim halo
#

@frigid ember As a last resort: Iterate over the teams and find the player.

fringe cairn
#

it seems like I can no longer use net.md_5.bungee.connection.InitialHandler?

rare prairie
#

Player#getScoreboard#getTeams

dry epoch
green cedar
#

Did the link for the API docs change?

rare prairie
#

see Hub

green cedar
#

Okay, thanks. Same link i have. How come the frames dont load anymore?

fringe cairn
#

how do I use net.md_5.bungee.connection.InitialHandler

#

It won't let me import it, what dependancy am I missing?

zealous lynx
#

@green cedar some things were acting funny on the docs for me yesterday, im not sure why but it's fine now. maybe try clearing your cache or something

green cedar
#

Yeah, im still just getting a single page. No more side nav frame.

subtle blade
#

Frames never loaded by default as of Java 9

#

They were defaulted to off

stark oxide
#

How am I supposed to debug an error like this: 06.07 20:56:52 [Server] Server thread/ERROR Could not pass event PlayerDeathEvent to <my_plugin_name> 06.07 20:56:52 [Server] INFO org.bukkit.event.EventException: null etc etc when there is no reference to my code in the error message?

subtle blade
#

We build the docs using... I think Java 13 now? Pretty sure that's what md settled on last night

dry epoch
#

cool my issue doesn't matter

keen compass
#

it means you have an NPE in your event handler for PlayerDeathEvent @stark oxide

subtle blade
#

Cool, I was answering something else. Patience is key

#

We can't change what resources you have access to. If you do not have access to the resource within 24 hours, contact the author

green cedar
#

So how can i have the frames load?

dry epoch
#

Yeah my issue came first from what I see

subtle blade
#
javadoc: warning - You have specified to generate frames, by using the --frames option.
The default is currently to not generate frames and the support for
frames will be removed in a future release.```
#

That is from the Java 11 javadoc tool

#

It's very possible that frames have been removed in 13

keen compass
#

to answer why they changed it, they are moving to be completely html5 compatible. IFrames support is not as great in html5 as it is in html4

subtle blade
#

That being said, Java 9 docs have a search bar... the need for frames is long gone

#

Else you have the tree view

green cedar
#

but i liked frames, it was much easier to navigate. 🙂

subtle blade
#

Sure. I'm sure a lot of people did

#

Nothing is forever. Have to move forward eventually

green cedar
#

Including java? 😉

subtle blade
#

Yes 🙂

fair escarp
#

Hey, is there a way to set the villager zombie curing rate to a specific percentage?

keen compass
#

good news is that this will probably allow custom javadoc generators to more easily create better javadoc sites 😉

fringe cairn
#

How do I add the bungeecord non api as a dependency?

#

I just built bungeecord

keen compass
#

well, wasn't exactly necessary to build it to use it as a dependency unless you are not using maven or gradle

#

could have just specified the repo to pull it from 😛

fringe cairn
#

What repo?

keen compass
#

spigot repo

subtle blade
#

Or even better, the Bungee Chat module is on central

fringe cairn
#

is that is?

fringe cairn
#

Okay thanks, then what would I want to add as a dependency?

subtle blade
#

Ehm- unless bungee builds on that sonatype repository. I'm not 100% sure

fringe cairn
#

for the bungee api I have <groupId>net.md-5</groupId> <artifactId>bungeecord-api</artifactId> <version>1.16-R0.2-SNAPSHOT</version> <scope>provided</scope>

stark oxide
#

if I listen to the event EntityDamageEvent is event.getEntity().getHealth() the health after or before the damage gets dealt?

subtle blade
#

Yeah, thanks

#

Before, steeric

#

Damage hasn't yet been applied

stark oxide
#

okay, thanks

keen compass
#

also have to cancel the event to change the health

#

otherwise the server won't accept your changes

#

some of these events are weird like that lol

green cedar
#

You sure? You can setDamage()

fringe cairn
#

so what would the dependency be for bungeecord proxy?

#

once I've added the repository

keen compass
#

doesn't mean it will apply it if you don't cancel the event first @green cedar

grim halo
#

Yes it will. If you set the damage in the event then bukkit will get this value and apply it instead of the damage that would have been applied

#

This damage is pre reduction calculation. So armor will still reduce the damage afterwards

keen compass
#

I am going to have to double check that, last I checked you needed to cancel the event first

green cedar
#

@keen compass i use event.setDamage(0d); without canceling the event and that seems to work fine.

keen compass
#

Then its probably not that event that is weird

grim halo
#

Its sad that "setFinalDamage()" is gone.

keen compass
#

there is some events you need to cancel first

#

otherwise server doesn't take your changes

green cedar
#

So.. what is the simplest method for removing just one of an item from inventory? Inventory.remove(Material) will remove ALL of the matching items. I just want to remove one without searching slots, getting quantity, minus one, checking if 0 to set air or change quantity, etc. Isn't there an easier way?

keen compass
#

there is a method for that

green cedar
subtle blade
#

remove(ItemStack)

#

Or removeItems. Whatever one takes an ItemStack lol

green cedar
#

That removes all. Not just one.

subtle blade
#

The amount of the ItemStack is how much it will try to remove

#

It does not

green cedar
#

Is that expected behavior or bug?

grim halo
#

It removes the whole stack but i think he just wants to reduce its quantity

green cedar
#

I just want to remove one item. Regardless if the player has many stacks of one each, or one stack of many items.

grim halo
#

so the approach would be Inventory#first(Material)
Then check if null.
Then reduce or if quantity is allready at one -> delete from inv

green cedar
#

As in, say i want to just take away ONE diamond from you.

subtle blade
#

No... use removeItem()...

#

It does literally what you just described...

keen compass
#

removeItem() does what you are wanting

green cedar
#

Not all diamond, not a whole stack. Just ONE in quantity.

subtle blade
#

THAT IS WHAT IT DOES

#

lol

green cedar
#

Are you sure? I thought .removeItem will remove matching stacks? So if they have a stack of two diamonds, no match.

subtle blade
#

It will remove the amount of the ItemStack supplied

keen compass
#

it removes matching Items

subtle blade
#

If you pass an ItemStack with an amount of 5, it will try to remove 5 of that item stack

keen compass
#

keyword here is Item

grim halo
#

But it has to be isSimilar() conform

keen compass
#

Item is not the same as ItemStack

green cedar
#

Okay, i will give it another try. Thank you.

subtle blade
#

isSimilar() and equals() for ItemStack are identical, only equals() ensures amount is the same whereas isSimilar() does not

#

Basically, equals() = isSimilar() && amount == other.amount

keen compass
#

if it for whatever reason removeItem() doesn't work for you, the next best alternative is to use getStorageContents(), alter the itemstack that has your item, and then use setStorageContents().

subtle blade
#

It does work. I'm using it in 1.16.1 just fine and it works as intended ;P

keen compass
#

I know it works

#

I remember a time when such methods didn't exist 😛

subtle blade
#

So if it doesn't work, it's not the fault of the API lol

grim halo
#

Right. But if you have 3 stacks of differently named diamonds in your inventory.
And try to remove one with Inventory#remove(new ItemStack(Material.DIAMOND)) it wont remove any

subtle blade
#

Correct

grim halo
#

So thats why i suggested the Inventory#first(Material) approach

keen compass
#

Some of these new users of the API are quite fortunate that some of these nifty methods exist XD

#

well you are talking about something completely different lol

#

but yes, same concept I suppose

subtle blade
#

should always be using latest anyways sadgery Yay for new features! 😄

torpid field
#

How do I spawn/make particle effects?

cold juniper
#

with the bedwars plugin how do you create custom shops\

subtle blade
#

@torpid field World/Player have spawnParticle() methods

#

World shows to all nearby players, Player shows to... well... just that player

crisp widget
#

Choco, any chance of Spigot adding support for RGB in team colors? 👀

#

I asked in the Minecraft Discord and they said only Bedrock supports it

subtle blade
#

As in the Java client doesn't? lol

crisp widget
#

Could be client could be server I meaaaaaaan

#

👀

subtle blade
#

Doubt Spigot should really be adding that

#

If Mojang chooses to add it in the future, will break compat or end up breaking something

crisp widget
#

Alls I know is setting the color for a team using the API only allows bukkit api

#

I'll just have to beg in the MC discord lmao

torpid field
#

we need minecraft java edition+ for only 60.99 you can get RBG support for your server and client get all players passwords and their bank accounts that logs onyo ur server

frigid ember
#

Hey,
Does anyone knows how ProtocolLib sends a PacketPlayOutPlayerInfo packet with a custom gamemode?

I don't really want to depend on protocollib, but want to send a fake-spectator to other players
Still nobody that wants to help me? 😛

grim halo
spare tiger
#

hahaha

#

welp its the right answer

#

I have a more general java question if anyone feels like answering it

#

here it is

keen compass
#

We probably have a more general answer for that

spare tiger
#

Say I have a ArrayList containing object CoolThing. So ArrayList<CoolThing>. CoolThing contains the field public UUID id. How could I index the ArrayList for a CoolThing who's id field matches a certain UUID

grim halo
#

Use a HashMap<UUID, CoolThing> ?

spare tiger
#

thank you

#

I feel so stupid

tiny dagger
#

maps are amazing

spare tiger
#

I've been doing Unity C# for a while where I haven't needed to use that type of thing, and now I've come back to spigot development and I forget everything

tiny dagger
#

i had 2 years pause and i still got it, i guess you haven't got that muscle memory yet

#

👀

spare tiger
#

bruh I am literally in grade school

keen compass
#

that explains it

tiny dagger
#

yeah

keen compass
#

you were no longer interested in Java

#

and thus forgot it 😉

frigid ember
#

@frigid ember https://wiki.vg/Protocol
That's not really telling me how to manipulate the packets, only a good description of the packets

spare tiger
#

you were no longer interested in Java
nah I just wanted to mess with other stuff

and thus forgot it 😉
yep

keen compass
#

you need to use reflection @frigid ember and you will need that site to know what the packet structure needs to have and what it doesn't need

spare tiger
#

yes so use the description and then manipulate the packets

grim halo
#

Hm not sure about the reflection part. I think you got a better shot with NMS.

wheat mirage
#

Hey could anyone tell me what velocity is measured in?

#

i.e. blocks/second

keen compass
#

meters/s

grim halo
#

Ah maybe the package has some hidden field. Eh maybe you would need reflections after all

keen compass
#

1 block = 1 meter

pastel condor
#

It can’t be that big

#

No way

spare tiger
#

yes

pastel condor
#

Minecraft people are like 2 ft tall

subtle blade
#

If you're working with packets, opt for ProtocolLib. It's practically standard and has some nice packet wrappers for you

spare tiger
#

1 block = 1 meter

#

Making vivecraft even weirder

#

blocks are very large

keen compass
#

Minecraft people in the game are actually quite tall

spare tiger
#

yes they are but everything else is just as tall

subtle blade
#

Aren't they 1.85 blocks tall? So 1.85m? Which is ~6ft 1"?

pastel condor
#

Wow endermen must be super tall

keen compass
#

2.5 meters tall

grim halo
#

And almost every server has ProtocolLib anyways.
I just worked on a server that had only 2 Plugins.
ProtocolLib and on huge plugin that managed everything else.

tiny dagger
#

i still need to add my protocollib implementation just in case i don't update my plugins 👀

keen compass
#

2.5 is around 6ft

frigid ember
#

you need to use reflection @frigid ember and you will need that site to know what the packet structure needs to have and what it doesn't need
That's what I already thought, but I need to manipulate that inner class to set the gamemode, I don't know how :/

subtle blade
#

That's what I mean with practically standard, smile 🙂

#

It and WorldEdit are generally must-includes for most servers

tiny dagger
#

I haven't used it myself because it's slower than going in myself

grim halo
#

Im not running WorldEdit on a production server.
Always a Build server and merge the maps.

urban fiber
twilit orchid
#

how do i make it so that vines dont grow. Is it tick speed?

torpid field
#

how do i create a heart particle object that i can use in spawnParticle()

twilit orchid
#

is there a world guard command?

keen compass
#

there is a gamerule for vines if I recall

#

nope there isn't one

subtle blade
#

Particle enum has constants for the different particle types, lerdyr

#

So, Particle.HEART or HEARTS or something

keen compass
#

Anyways, there is some plugins like worldguard that disable vine growth. I haven't looked at spigot.yml if there is a setting in there for that.

#

its in the config

true anvil
#

I have a config where i have 2 seperate guis made, I already load them etc, but i want to make a it change every 24h, so like GUI A is in for 24 hours then GUI B replaces GUI A how would i do that?

remote gyro
#

Hello, is there a way to change the name of my spigot account?

grim halo
#

@true anvil You could dig pretty deep with this question (Using Quartz for planned tasks etc). I think the easiest way is checkking the current unix time when a player opens the GUI and then decide what GUI to use.

true anvil
#

Ok. WHat im struggling with is actually switching the gui, this is how i make the gui:

main.getConfig().getConfigurationSection("markets").getKeys(false).forEach(keys -> {
                    main.getConfig().getConfigurationSection("markets.").getKeys(false).forEach(key -> {
                        int m = main.getConfig().getInt("markets." + keys + "." + key + ".material");
                        String d = main.getConfig().getString("markets." + keys + "." +  key + ".displayName");
                        int s = main.getConfig().getInt("markets." + keys + "." +key + ".slot");
                        int c = main.getConfig().getInt("markets." + keys + "." + key + ".price");
                        int a = main.getConfig().getInt("markets." + keys + "." + key + ".amount");
                        int dmg = main.getConfig().getInt("markets." + keys + "." + key + ".damage");

                        List<String> list = main.getConfig().getStringList("markets." + keys + "." + key + ".lore");
                        String[] array = list.toArray(new String[0]);

                        if(main.getConfig().getString("markets." + keys + "." + key + ".damage") == null) {
                            Utils.createItem(inv, m, a, s, d, array);
                        } else {
                            Utils.createItemByte(inv, m, dmg, a, s, d, array);
                        }
                    });
                });```
#

so could i just save what one was used last to a map and then instead of "keys" use that variable from the map?

grim halo
#

First of all. Cache your method results. Dont call a method again and again.
Not sure if main.getConfig() actually loads the File from your disk but if it does then you will freeze
the server every time this code runs.

so cache main.getConfig() in a variable.

#

Also i have no idea what you are doing here. All i see is that you get a bunch of variables from your config and then call
some magic function with those.
So no idea what of this code realates to any GUI

true anvil
#

so like File config = main.getConfig()

grim halo
#

Yes. Go one step further and cache your FileConfiguration

true anvil
#

the Utils.CreateItem is where the item gets created. it just pulls those variables from config then adds then to the gui

#

so FileConfiguration mainConfig = YamlConfiguration.loadConfiguration(config);

grim halo
#

You generally want to load your FileConfiguration once when starting the server.

gray plume
#

does anybody know any anti-world downloader plugin that is still being updated?

true anvil
#

Oh ok.

grim halo
#

Because it has to read from your hard drive. And that blocks the server until everything got read.

stark oxide
#

I am still getting NPEs in my event handlers, which is really weird, as I am basically checking for every value whether it is null. Could lag cause this?

trail basalt
#

Ay! What's the best, affordable minecraft server host?

grim halo
#

Lag could def not cause NPEs

stark oxide
#

okay

true anvil
#

Ay! What's the best, affordable minecraft server host?
I use AccurateNode, pretty cool guys over there

grim halo
#

Do you have a code sample and the full stack trace?

stark oxide
#

i can provide, wait a sec

trail basalt
#

@true anvil Am I capable of creating a custom domain and uploading plugins?

#

*subdomain

grim halo
#

AccurateNode only has servers in USA or Finland. So if you live far from both you could have lags

halcyon snow
#

@true anvil

Unrelated to your question, but:

Prefer the use of ConfigurationSection's over string concatenation. It's a lot easier to read and maintain.

example: https://paste.md-5.net/iyaqacekec.java

#

also avoids a lot of unneeded object creation iirc since every time you concatenate a string, a new one is created.

true anvil
#

Ok ty

stark oxide
true anvil
#

@true anvil Am I capable of creating a custom domain and uploading plugins?
@trail basalt Yes

torpid field
#

what do i need to import so that Particle.HEART can work (im on 1.8)

grim halo
#

Also their server hardware is absolutely trash for MC

true anvil
#

Iv ran server with a playerbase on their minecraft plan and vps plan just fine

keen compass
#

main config file already gets cached @grim halo

grim halo
#

Its fine if you have less than 25-30 ppl i guess

#

Thx @keen compass Didnt know that. Have always used custom configs only.

keen compass
#

custom configs are not obviously

#

unless you make it that way

stark oxide
#

7smile7 just let me know if you have time to take a look at my code

#

that would help

grim halo
#

Currently looking through

#

Weird stack trace...

stark oxide
#

okay, great, thank you

#

i agree, lol

grim halo
#

Isnt there some "caused by" line?
Do you fire the EntityDamageEvent yourself somewhere?

subtle blade
#

If so, please don't lol

stark oxide
#

i was looking for the "caused by" but did not find

#

and i am not firing it myself

torpid field
#

what do I need to import for Particle.HEART and spawnParticle() to work on 1.8

subtle blade
#

spawnParticle() is not present in 1.8. It was added in 1.9

torpid field
#

F*CK

#

How do i spawn particles in 1.8 then?

subtle blade
#

DarkBladee's particle library, EffectsLib, packets or just use a modern, not-5-year-old version of the game

stark oxide
#

@7smile7 found it

grim halo
#

What was the problem?

stark oxide
#

i am apparently trying to drop a null item

#

the "caused by" line was in .log

#

thanks anyway

#

i really dislike apex host's console

fringe cairn
#

is there a way to get a players last known server from a proxiedplayer object?

flint girder
#

anyone getting trouble getting the BuildTools to create the jars?

I've been building it for an hour now and im stuck at this now

Patching with WorldUpgrader.patch
0 [main] sh 533 child_info::sync: wait failed, pid 12532, Win32 error 0
388 [main] sh 533 dofork: child -1 - forked process 12532 died unexpectedly, retry 0, exit code 0x39343937, errno 11
applyPatches.sh: fork: retry: Resource temporarily unavailable
301024198 [main] sh 533 child_info::sync: wait failed, pid 1488, Win32 error 0
301024782 [main] sh 533 dofork: child -1 - forked process 1488 died unexpectedly, retry 0, exit code 0xFFFFFFF9, errno 11
applyPatches.sh: fork: retry: Resource temporarily unavailable
603036596 [main] sh 533 child_info::sync: wait failed, pid 9436, Win32 error 0
603037224 [main] sh 533 dofork: child -1 - forked process 9436 died unexpectedly, retry 0, exit code 0xFFFFFFF8, errno 11
applyPatches.sh: fork: retry: Resource temporarily unavailable
907055539 [main] sh 533 child_info::sync: wait failed, pid 11908, Win32 error 0
907056982 [main] sh 533 dofork: child -1 - forked process 11908 died unexpectedly, retry 0, exit code 0xFFFFFFF7, errno 11
applyPatches.sh: fork: retry: Resource temporarily unavailable
1215090105 [main] sh 533 child_info::sync: wait failed, pid 12824, Win32 error 0
1215090662 [main] sh 533 dofork: child -1 - forked process 12824 died unexpectedly, retry 0, exit code 0xFFFFFFF7, errno 11
applyPatches.sh: fork: Resource temporarily unavailable
Error compiling Spigot. Please check the wiki for FAQs.
If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.
java.lang.RuntimeException: Error running command, return status !=0: [sh, applyPatches.sh]
at org.spigotmc.builder.Builder.runProcess0(Builder.java:818)
at org.spigotmc.builder.Builder.runProcess(Builder.java:755)
at org.spigotmc.builder.Builder.main(Builder.java:617)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:34)

keen compass
#

are you trying to build in a onedrive directory? o.O

flint girder
#

ooh. i might be... my git is linked up with my school

#

im trying to build the BuildTools on my internal hard drive if that's what you're asking... idk if setting up my git with my school affects anything...

keen compass
#

no, onedrive or googledrive folders sync with microsoft or googles servers

#

issues arise when trying to build in such directories

spare tiger
#

you're saying that git is installed locally you just signed in with your school account

keen compass
#

if you are indeed not building in such directories then I recommend clearing out the buildtools directory, except for buildtools itself

spare tiger
#

right?

keen compass
#

and start fresh

#

git isn't the issue here if they made it to applyPatches

spare tiger
#

oh ok

flint girder
#

my buildtools is just in my downloads folder which is not synced to the cloud

keen compass
#

what java version are you using?

flint girder
#

just installed the latest yesterday... how do i double check?

keen compass
#

in command prompt type java -version

#

?pate

#

?paste

worldly heathBOT
keen compass
#

just paste your buildtools log

#

in contains the version in the log that it is using anyways

flint girder
#

Let me resart my computer. Whenever I try to run the buildtools, it breaks my computer... Chrome gets slow andtakes forever to load anything.

keen compass
#

just kill the java processes

flint girder
#

ohh, that's probably it. ill try that next time i rebuild it

keen compass
#

Buildtools takes a bit of resources to download, patch, build, patch and then build again 😛

#

Just paste your buildtools log though to that paste site

#

so we can see what might be the problem

flint girder
keen compass
#

well, you are not using latest java

#

as you stated

flint girder
#

okay. just downloaded

keen compass
#

either the issue is because you have spaces in the directory names

#

or the M: drive is a network drive

#

in which case that would be the issue

flint girder
#

what CMD gave me

java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)

my M: drive is my secondary HDD.

keen compass
#

if you look at the buildtools log

#

it tells me the java version 😛

#

anyways, java 8 is fine to use, just isn't latest is all

flint girder
#

oohh. okay. lol. didn't know if it was okay or not, so i just installed the latest anyways.

keen compass
#

Well if M: is an internal HDD, your issue is then due to spaces in the directory name

flint girder
#

kk, ill give that a try. how long is it supposed to take to build?

keen compass
#

create a directory in M:\

#

for buildtools

#

and then try it

#

Depends on what hardware you are running

#

you can always give buildtools a bit more ram to work with

#

Java -Xmx3G -Xms3G -jar Buildtools.jar

#

also if you are trying to build 1.16 need to specify --rev 1.16 at the end of the command

flint girder
keen compass
#

ok?

#

not sure what that has to do with what I stated

#

Java is java.

flint girder
#

well, im not sure why i would need the RAM thing yet.

keen compass
#

specifying ram limits for the JVM is not specific to running spigot or any other java application

#

BuildTools uses java to run

#

giving the JVM a bit more ram to work with helps buildtools build a bit faster

flint girder
#

ohh, i see what you mean. i just had to reread it lol

peak glade
#

Detected low TPS. Rescheduling in 30s ?

frigid ember
#

Amy1 knows how to solve?

keen compass
#

if there is no data there then it is still counted as being null

#

so...check that it is not null 😉

#

quite interesting that there is a sudden influx of people needing help resolving basic NPE's o.O

frigid ember
#

If there is data it'll do this
Data: {}
Uuid: hashdata

undone narwhal
#

@frigid ember "getConfig().getConfigurationSection("data.playerdata") is null, look at your yml file there is nothing

#

Add first a check to avoid it

keen compass
#

@undone narwhal basically what I said lol

frigid ember
#

Ok ty guys

peak glade
#

hello

#

Detected low TPS. Rescheduling in 30s

#

?

#

what os that

keen compass
#

It is rescheduling in 30seconds

#

😉

frigid ember
undone narwhal
#

@keen compass Sorry bro, half of my brain is used for other stuff I missed your messages

#

^^

keen compass
#

@peak glade I am assuming you use plotsquared?

#

if so, it is rescheduling it stuff till TPS improves

#

that is all

stark oxide
#

how can I remove fire from a player? <Player>.setFireTicks(0) does not work

woeful lark
#

is there not a bukkit api for 1.16.1 in the maven?

stark oxide
#

how can I remove fire from a player? <Player>.setFireTicks(0) does not work
@stark oxide is there any other way than to place water under the player?

keen compass
#

@frigid ember I don't see where it violates premium resource rules

#

however, if you still believe that it is, you are free to report it regardless

frigid ember
#

oops one sec

keen compass
#

1.16.1 was for realms @woeful lark therefore just use 1.16

#

@frigid ember read it, doesn't say a premium resource can't depend on another premium resource

woeful lark
#

@keen compass theres no bukkit api for that in the maven either

frigid ember
#

Those are the premium resource guidelines

keen compass
#

its under org/spigotmc

woeful lark
#

thats the spigot api aswell not just bukkit api?

keen compass
#

@frigid ember I haven't looked at the resource page, but if anything it should state that it depends on another premium resource. But otherwise nothing in the guidelines specifically prohibits that.

woeful lark
#

dw i found md_ post on it

#

thx

keen compass
#

@woeful lark Bukkit is no longer provided since spigot is pretty much bukkit

#

however you can build it yourself

woeful lark
#

👍

keen compass
#

@frigid ember ah I see the one line

#

welp, as I stated earlier you are free to report it 😉

#

but also note the author did state

#

it does depend on the other premium resource as it is an add-on

#

and I assume both are from the same author

frigid ember
#

They are, honestly I have no issue with it - I'd love to be able to have premium resources depend on other premium resources, so I'd love that rule to be clarified, because I could make use of that myself

keen compass
#

Well its possible that because both are from the same other, and one is just an addon. As well as the Author making that statement clear, that it falls in the exception to the rule category

undone narwhal
#

Rules are something difficult, they are mainly here to avoid any sh*t stuff or problem. But there are exceptions, and also variation of the rules

keen compass
#

But, it doesn't appear that the author is trying to scam people for more money though which is what that rule you are referring is to stop

subtle blade
#

afaik it's grandfathered

#

That rule was not retroactively enforced, else TokenEnchants would have been nuked

#

The guy has like... 150 resources that depend on TE

fervent bone
#

whats faster
entity.getType().equals(EntityType.PLAYER))
or
entity instance of Player?

subtle blade
#

I don't think the concern here is which is faster. It's about what you want

frigid ember
#

Ah, I see

#

Rule should just be clarified then 🤷‍♂️

subtle blade
#

It's as clear as it needs to be

fervent bone
#

im just checking if enity is player or no

frigid ember
#

I'm only mentioning it because I have a plugin that relies on a premium resource and I'd like to release it as premium

subtle blade
#

For instance, if (entity instanceof Skeleton) will return true for skeletons, wither skeletons and strays whereas if (entity.getType() == EntityType.SKELETON) will just be skeletons

fervent bone
#

okay.

#

oh and choco i have a problem with #verification since i linked my spigot to my old discord acc that got deleted now i can relink it to another acc?

keen compass
#

.equals() does an equality check on an objects values == does a reference check which means it checks if both point to the same memory address.

peak glade
#

xd

#

k

proper cairn
#

Player playerEffect = player.playEffect(new Location(Bukkit.getWorld("world"), player.getLocation(), Effect.BAT_TAKEOFF));




#

getting cant resolve constructor error

fervent bone
#

wat ta ,,.Ž
why making new location=??

proper cairn
#

Omg lmaoooooo whoooooops

fervent bone
#

and im not sure if you can play effect like that

subtle blade
#

What kind of effect are you trying to play

#

There are 3 different ones. Effects, entity effects and particle effects

proper cairn
#

Just Effects like

#

Bat noise for example

#

or an anvil noise

subtle blade
#

Anything wrong with playSound()?

#

Those effects & entity effects should really be used when you want to mimic an effect that vanilla makes use of such as breaking an item in your hand which plays both a particle dependent on the item in your hand as well as a sound

stark oxide
#

how can I remove fire from a player? <Player>.setFireTicks(0) does not work
@stark oxide anyone?

subtle blade
#

Or when a fox eats something in its mouth. Plays a sound and some particles based on what is in its mouth

#

That should work fine. Are you certain it's being called, Steeric?

stark oxide
#

yes

#

when a player is about to die in lava, i teleport them away, set fireticks to 0 and set health to 20

#

and they remain burning

subtle blade
#

Perhaps it's a client-sided issue. I'd just say try setting the fire ticks to 1 PES_SadShrug

stark oxide
#

let´s try it

#

doesn't work :/

#

i guess I have to do the water trick then lol

floral bay
#

Hi! In paper, there is a config option called allow-perm-block-break-exploits which re-enables bedrock and other non-removable blocks to be broken by vanilla glitches. Can I do this in Spigot somehow?

neat oxide
#

@floral bay nope and we don't intend to allow it either

floral bay
#

Is Craftbukkit closer to vanilla in this sense?

neat oxide
#

Yes craftbukkit is aimed at providing emergency exploit fixes apis and slightly better performance

weary gust
#

The server I am running shuts down when I use the Restart command, error says "Exception in server tick loop". Any suggestion.

chrome lark
#

spigot doesn't have those glitched patched, meaning that there is no option for them

subtle blade
#

The server I am running shuts down when I use the Restart command
Isn't... isn't that intentional...?

weary gust
#

no

floral bay
#

spigot doesn't have those glitched patched, meaning that there is no option for them
Maybe then I'm doing something wrong, but I tried in vanilla and it works, on my server it doesn't.
I mean the bedrock removing glitch

neat oxide
#

😂

quartz trench
#

How should I convert a component to legacy so that I can use setCustomName if md says its possible

weary gust
#

I have viaVersion, viaBackward, and ViaRewind, running

subtle blade
#

RGB is possible already using Spigot's ChatColor enum

#

ChatColor.of(Color)

#

You can append that to a String and it will "work" lol

quartz trench
#

Yeah, but I'm using minimessage

#

and I have kyori chat component

subtle blade
#

I mean... if you're using a third party library... 😛

quartz trench
#

which I can get a bungee component or ibasecomponent from

subtle blade
quartz trench
#

IBaseComponent is NMS and the bungee one is API

subtle blade
#

He may be considering it for font anyways

quartz trench
#

ok, I hope your right

tropic nacelle
#

Nobody

#

Good for you

neat oxide
#

@frigid ember This is for spigot support only please ask the authors for support

#

NP

proper cairn
#

Why are people so rude

#

???

frigid ember
#

Discord Staff, am I allowed to ask people to rate my plugin? 'cause i need feedback about what i did and If i need to do something essential more

fringe cairn
#

how can I either get the name of a players server on log out or get the players last server on log in with a bungeecord plugin?

neat oxide
#

@proper cairn ?

#

We're you talking about me?

frigid ember
#

mb you can do this: whenever player joins the server, u save the name of the server anywhere and then you get this information @fringe cairn

fair abyss
#

maybe but not in this channel @frigid ember

frigid ember
#

maybe but not in this channel @frigid ember
@fair abyss k, i asked about this chanell, so i assume i cant do that

fair abyss
#

@fringe cairn the server which player was logged out?

peak glade
#

you know ?

#

?

fair abyss
#

PlayerDisconnectEvent get player and get server info @fringe cairn

#

its json chat @peak glade

#

you can try torch chat it was free

#

and deluxechat it is paid

normal zinc
#

I Need Help I'm unable to use 1.16.1.jar As A Reference Library for JavaSE9-14. any reason why?

fair abyss
#

whats about java 8?

fringe cairn
#

and yes the server which the player was logged out

proper cairn
#

@neat oxide No... XAE 12 i was talking about

normal zinc
#

JavaSE-1.8 works fine.

fair abyss
#

so you should use java 8 for things which uses java 8

normal zinc
#

awwwww

#

fine.

fair abyss
#

did you read error

#

it should say something like

#

"dont use new versions or old

#

use java 8"

#

or "incompitable java version"

#

or "not same java version"

#

idk

normal zinc
#

it does not give me error it just does not import the 1.16.1.jar

#

i'll just use Java8 then.

fair abyss
#

using eclipse?

normal zinc
#

Yes.

fair abyss
#

dont use it

#

intellij is free

normal zinc
#

what should i use then.

fair abyss
#

and abs better

#

download intellij community edition

#

its free

#

more intelligent

#

and better

normal zinc
#

is it simpler to use?

neat oxide
#

@proper cairn Lax is always rude get used to it

fair abyss
#

a bit harder

#

but it will take 5 min to learn

normal zinc
#

ok cause i have 0-nonexistent coding experience.

fair abyss
#

changing ide and using ide dont require code experience, feel free 😄

normal zinc
#

i'm using eclipse ide.

fair abyss
#

the bigest different that you will notice is intellij doesnt have a button to "export jar directly"

#

you will have to tell what should be included in jar

#

you can search for artifacts

normal zinc
#

is it for windows?

fair abyss
#

yes

normal zinc
#

all i see is mac refreences.

#

king do you have coding experance?

fair abyss
#

yes i have

neat oxide
#

I love intellji

slim hemlock
#

Anyone happen to use the #addPassenger method and notice that it is / isn't working on 1.16?

normal zinc
#

i would love some help on somethings.

fair abyss
#

if then create ticket or look for opened tickets @slim hemlock

peak glade
#

😭 i like this

slim hemlock
#

a bit hard rn, I'm doing a dev livestream and I didn't want to go dig tickets up

fair abyss
#

@peak glade whats problem?

#

the json chat or instagram=?

normal zinc
#

i'm goint to reboot my pc rn brb.

neat oxide
#

@slim hemlock uhm yeah xD that's embarrassing

peak glade
#

yes

#

i want name or rank or day or instgram how to this ?

fair abyss
#

@slim hemlock i dont think anybody will know that

#

you know its preety new

#

@peak glade first u have to use json chat plugin

peak glade
#

how ?

fair abyss
#

like i said torchchat or deluxechat

neat oxide
#

@fair abyss not anymore is native to our api now

#

Your welcome btw

fair abyss
#

?

neat oxide
#

Those tooltips are now possible in spigot

fair abyss
#

which?

#

what you are tolkina obut