#help-archived

1 messages ยท Page 59 of 1

brisk mango
#

Huh @pure pasture

#

EntityDamageByEntityEvent

pure pasture
#

Oh ok thanks

agile rock
#

Um so something like this ```ScheduledExecutorService ses = Executors.newScheduledThreadPool(1);

    Runnable task = () -> System.out.println("Running task...");

ses.schedule(task, 5, TimeUnit.SECONDS);```?

frigid ember
#

Yes it is...

brisk mango
#

It's not needed in your case

#

Huh @frigid ember

#

How is it getting all instances when there's no paremeter in the constructor

frigid ember
brisk mango
#

BukkitRunnable is an useless class

frigid ember
#

That's like saying Lists are useless when you can use Sets, but Lists provide things that sets don't

brisk mango
#

Every method synchronized and throwing 5 exceptions

#

Get exerosis here to bully this guy @rigid nacelle LOL

frigid ember
#

No need, I'm not concerned about arguing all day

    public boolean connectedToCore(Chunk chunk) {
    return false;

    }

    private boolean searchAdjacentChunks(Kingdom k, Chunk v) {
    Set<Chunk> claims = k.getChunks();
    Set<Chunk> visited = new HashSet<Chunk>();
    Chunk core = k.getCore();

    for (Chunk c : getChunksAroundChunk(v)) {
        if (!claims.contains(c))
        continue;

        if (core == c) {
        return true;
        }

        if (!visited.contains(c)) {
        searchAdjacentChunks(k, v);
        visited.add(v);
        }
    }

    return false;
    }

    public Collection<Chunk> getChunksAroundChunk(Chunk c) {
    int[] offset = { -1, 0, 1 };

    World world = c.getWorld();
    int baseX = c.getX();
    int baseZ = c.getZ();

    Collection<Chunk> chunksAroundPlayer = new HashSet<>();
    for (int x : offset) {
        for (int z : offset) {
        Chunk chunk = world.getChunkAt(baseX + x, baseZ + z);
        chunksAroundPlayer.add(chunk);
        }
    }
    return chunksAroundPlayer;
    }

I need help on this though

brisk mango
#

What does BukkitRunnable provide more than BukkitScheduler @frigid ember

frigid ember
#

I don't know what to put in

   public boolean connectedToCore(Chunk chunk) {
    return false;
    
    }
brisk mango
#

Exactly, nothing

rigid nacelle
#

oof

frigid ember
#

I'm not going to argue it's not going to get either of us anywhere

remote sluice
#

[Server thread/ERROR]: [Essentials] You are running an unsupported server version! i have essentials reloaded 2.16.1.0.

patent monolith
#

I only use BukkitRunnable because I never used anything else lol

brisk mango
#

@remote sluice Your server version is outdated

#

I'd because scheduler API in bukkit sucks

remote sluice
#

1.12

patent monolith
#

@fleet crane I guess we need to remove bukkitrunnable from bukkit

#

lol /s

sturdy oar
#

wtf??'

brisk mango
#

yes, totally useless class

remote sluice
#

is it normal for this to happen to me? I see that it works properly

pure pasture
#

@brisk mango But how do you get what entity dealth damage?

brisk mango
#

Event#getDamager

pure pasture
#

Oh ok lol

brisk mango
#

because its an EntityDamageByEntityEvent

#

It gets called whenever an entity hits another entity

rigid nacelle
#

@fleet crane I guess we need to remove bukkitrunnable from bukkit
@patent monolith It's technically not necessary. I guess the only disadvantages in using your own executor service instance is that it will be running out of sync with the server, it coudl either go faster or slower. Aside from that I don't know what it is that BukkitScheduler "can't" do, a part from Consumer<BukkitTask> which was actually an addition in the newer versions.

#

I guess that's one reason I'm not that into BukkitRunnable.

patent monolith
#

/s

#

other than threads, I havent really used anything other than BukkitRunnable tbh

brisk mango
#

Another disvantange to BukkitRunnable is lambdas

rigid nacelle
#

One thing I also really love is lambda.

patent monolith
#

other methods are most likely better, so I will use them when it becomes necessary

rigid nacelle
#

yh~ :p

brisk mango
#

Add Consumer<BukkitTask> into 1.12.2 :p

rigid nacelle
#

I wish it was a feature back in the older versions.

brisk mango
#

However they still CAN update it @rigid nacelle if they'd wanted

patent monolith
#

something I always yearned for was:
plugin.runTask(task -> System.out.println("here is my task: " + task))

#

lol

rigid nacelle
#

They could, but I'm sure they won't be touching any old versions. :p

brisk mango
#

Also, newer versions are kinda unstable imo

#

in some things

sturdy oar
#

yeah olders version, are older version. Nobody has time to add new stuff in older versions

#

they already have so much to do for 1.15- 1.16

rigid nacelle
#

That is understandable and I won't disagree there.

boreal tiger
#

what do you mean unstable lol

#

stop being a dinosaur and using 1.8

brisk mango
#

I mean unstable.

#

I took a look at the newer versions, and they are

#

also so many bugs

patent monolith
#

Use protocolsupport and oldcombatmechanics on 1.15

boreal tiger
#

what bugs?

brisk mango
#

Well the server basically crashed when I spawned a few entities

#

or the tps went down

#

Tried the same thing on 1.12.2 latest build and nothing happened

#

So yes, it is unstable

boreal tiger
#

well if there's a bug you should report to spigot

#

I've never had any of those issues locally

brisk mango
#

It's not really a bug, it's just the version that it's basically shit both client side/server side

boreal tiger
#

It's not shit, its more resource intensive

brisk mango
#

It is

#

IMO

patent monolith
#

More features and support available in 1.15

brisk mango
#

yes, in the API

agile rock
#

mc servers are single-threaded right?

sturdy oar
#

mainly

patent monolith
#

For the main operations like block placing, killing mobs and interacting with them

#

Etc

agile rock
#

So when you create plugins, do they run on the same thread as the server? How does that work

patent monolith
#

I mean, its possible to run your code async

vernal spruce
#

most plugins yeah do run on same thread

#

however runnables can async

agile rock
#

So when you make things run async, they run on different threads?

vernal spruce
#

yeah it takes load off main thread

patent monolith
#

Yep

agile rock
#

Ok so any resource heavy tasks should be run async?

vernal spruce
#

however its not just do everything async.. they can still be bad if you pile em

patent monolith
#

I would say... database operations async?

vernal spruce
#

nms block changing..

agile rock
#

Hmm ok, what would you recommend making async for best optimization?

vernal spruce
#

dont expect 10mil blocks to be changed on main thread

frigid ember
patent monolith
#

Perhaps do the calculations on separate thread, but the actual block operations on the main thread. If needed, only do like 100 blocks per tick.

#

I would not recommend changing blocks async

sturdy oar
#

You can't avoid the long constructor , if you need that many elements

#

Kotlin may make things a little shorter tho

agile rock
#

Also how do I prevent things such as memory leaks in my plugin?

brisk mango
#

Always using dependency injection, loading data into memory etc

#

many things you can do for it

#

not using static

sturdy oar
#

generally, not doing dumb things

crimson sandal
#

What's the best way to check if a server is running Spigot/Bukkit so I don't call Spigot only methods?

frigid ember
#

which vps hosting is the best? halp me please

#

for a biginner

sturdy oar
#

no server is running bukkit lmao

#

@frigid ember VPS aren't really meant for game-servers hosting, and you will probably get poor performance

crimson sandal
sturdy oar
#

๐Ÿ˜ that's sad to be honest

crimson sandal
#

Bukkit is supposed to be completely vanilla compared to Spigot that's why right?

#

Spigot just has performance enhancements on top

sturdy oar
#

you could try and use reflection if you need Spigot method on server running Bukkit

brisk mango
#

wouldnt say on top

crimson sandal
#

Well Spigot just extends the Bukkit api...?

#

And so I guess just look if the class org.bukkit.Server.Spigot exists

kind raven
#

Starting to feel a little crazy. I cannot connect to my local server on same comp. I have a networking background and host servers for many other apps

#

just doesnt show in MC for LAN or WAN devices

frigid ember
#

why does armorequipevent not work

#

does it have another name or smth?

paper compass
#

what should I make for my first minigame

vernal spruce
#

w/e you feel excited bout

paper compass
#

But idk what to make

vernal spruce
#

i mean dont go spamming every channel if thats the case..

#

ur gonna make it not us

#

replicate hypixels shit

frigid ember
#

lol

paper compass
#

True

#

lmfao

wanton vine
#

I need a plugin made for me but I can't post in the recruitments thread on spigot. What requirements do I need?

vernal spruce
#

if its paid.. idk

rocky canopy
#

what is the right way to download plugins from command line?

#

wget https://www.spigotmc.org/resources/grappling-hook.70854/download?version=311454
--2020-05-03 19:23:27-- https://www.spigotmc.org/resources/grappling-hook.70854/download?version=311454
Resolving www.spigotmc.org (www.spigotmc.org)... 104.27.196.95, 104.27.195.95, 2606:4700:21::681b:c45f, ...
Connecting to www.spigotmc.org (www.spigotmc.org)|104.27.196.95|:443... connected.
HTTP request sent, awaiting response... 503 Service Temporarily Unavailable
2020-05-03 19:23:27 ERROR 503: Service Temporarily Unavailable.

soft tendon
#

@proven canyon sure

arctic cloud
#

@frigid ember I recommend https://pebblehost.com/vps but you could go for OVH or Digital Ocean or Vultr really but they're typically annoying and require verification

dusty topaz
#

I would recommend using something like cloudflare

#

it's pretty easy to setup and provides some extra ddos protection

arctic cloud
#

OH

#

I see wht u mean now

dusty topaz
#

cloudflare is free

ashen glacier
upper hearth
#

Does anyone know if there is any kind of benefit to using Maven or Gradle if you're making a private plugin? I've tried in the past to use them and for some reason could never wrap my head around how they work more efficiently than just building artifacts and adding dependencies via modules. Maybe if I use a lot of dependencies they're better? But at what threshold do they become better?

dusty topaz
#

maven allows you to shade in jars so they're not necessarily needed to be present on the server

#

can also do other actions when you build, and build in different ways

#

most languages have some sort of package manager like pip or anaconda in python or nuget in c#

upper hearth
#

I mean I can build external jars into my plugin without maven anyways

dusty topaz
#

kind of just makes it easier to manage and add dependencies

#

and is a life saver for open source, else people would have to put their jars in the exact same location

#

and have the exact same setup for it to work

upper hearth
#

Sure but for a private plugin that's not necessarily an issue

#

What other actions does it provide when you build that are helpful?

dusty topaz
#

You can setup different profiles to build for debugging or for release for instance

#

can install it to your maven repo to have it there to depend on in other plugins

#

your argument is similar to me saying i can code in notepad

#

notepad works so why use an ide

hearty trellis
#

does anyone here use PluginAnnotations? how does the output work? like, i dont see it generating a plugin.yml. Is it only in the result jar?

dusty topaz
#

not sure, but when you build a jar open it with 7z or winrar and see if a plugin.yml is there

#

i presume it does add one

fleet burrow
#

I just use IntelliJ

#

And build the artifact with it

#

Dunno what it uses internally

hearty trellis
#

ah yes, the result plugin.yml is actaully in the final jar

dusty topaz
#

        try {
            Yaml yaml = new Yaml();
            FileObject file = this.processingEnv.getFiler().createResource( StandardLocation.CLASS_OUTPUT, "", "plugin.yml" );
            try ( Writer w = file.openWriter() ) {
                w.append( "# Auto-generated plugin.yml, generated at " )
                 .append( LocalDateTime.now().format( dFormat ) )
                 .append( " by " )
                 .append( this.getClass().getName() )
                 .append( "\n\n" );
                // have to format the yaml explicitly because otherwise it dumps child nodes as maps within braces.
                String raw = yaml.dumpAs( yml, Tag.MAP, DumperOptions.FlowStyle.BLOCK );
                w.write( raw );
                w.flush();
                w.close();
            }
            // try with resources will close the Writer since it implements Closeable
        } catch ( IOException e ) {
            throw new RuntimeException( e );
        }
        return true;
hearty trellis
#

kind of annoying, but sure, whatever

dusty topaz
#

generates the yaml yeah

subtle blade
#

It's built at compile time

#

Those annotations have only a source retention, not runtime

hearty trellis
#

yeah but i mean, it would be nice if the output was also put in the src resources folder

dusty topaz
#

pretty sure they got changed to runtime

#

i've never looked at it properly though so don't quote me

hearty trellis
#

im using it for the first time now, seems to be working fine

subtle blade
#

There's no code to use those annotations to generate them in your environment

#

It's not possible unless your IDE can miraculously understand how to do it

hearty trellis
#

ah okay

dusty topaz
#

when i was looking they were runtime

#

i'll check again

#

yup runtime .. lol

#
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Plugin {
    /**
     * The name of this plugin
     */
    String name();

    /**
     * This version of this plugin
     */
    String version();

    String DEFAULT_VERSION = "v0.0";
}
#

that's the main one I believe?

subtle blade
#

What the hell are they runtime for?

dusty topaz
#

no idea

#

all the commit messages are just

#

changed source to runtime (โ•ฏยฐโ–กยฐ๏ผ‰โ•ฏ๏ธต โ”ปโ”โ”ป

subtle blade
#

Ah, uses an annotation processor

inland depot
#

I have a plugin installed on my server but I want to overwrite one of the commands.

The command is /f top, so the command is /f (which I don't want to change) and I want to change what happens when someone uses "top" as the argument. How would I do this?

deep cloak
#

WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

#

where can I find this useSSL setting?

dusty topaz
#

@inland depot listen to command pre process, check if it is "/f top" and then run what you would like

inland depot
#

would I be able to cancel what would usually happen when I run that command?

dusty topaz
#

yep

keen compass
#

@deep cloak its part of the mysql config file for the mysql db server. Depending on your system it varies a bit on where it is located. on ubuntu it is in /etc/mysql

#

usually

#

unless you installed it manually in which case, it will be where ever you installed it at

dusty topaz
#

google very much can

keen compass
#

I am fairly certain cloudflare has documentation on that

dusty topaz
#

someone linked a shockbyte post that also had some good information

keen compass
#

would need webhosting for that

#

Then just point it to the appropriate server

#

if you have a dedicated server you can have both your website and mc server on the same box

#

But it appears the majority who come here do not have a dedicated box lol

#

crashing your MC server has nothing to do with the OS

#

or other applications running on that box

#

or at least it shouldn't anyways

#

yes

#

have no idea

#

anyways what you are going to do is set your domain to point to your webhost

#

then you are going to create a srv record that points to your mc server

#

once you have that, you should have a domain that points to both your website for the browser and mc server for the mc client

#

now the srv record is only necessary because you have both in two different locations/separate systems

#

Google will help you with that, plenty of documentation out there for creating srv records

#

the only difficult thing you will probably do DNS wise

harsh vector
#

i got Ultrapermission on my server but only me owner of the server can use /help, others can only use /minecraft:help
i want them to be able to use /help directly

#

?

keen compass
#

then give the group the permission to use /help o.O

harsh vector
#

can i show a picture ?

#

of my problem ?

keen compass
#

have to be verified to post links

#

or to upload pictures I think too

frigid ember
#

Guys I need help

#
    Collection<Chunk> chunks = kingdomManager.getChunksAroundChunk(new int[] { -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 },
        p.getLocation().getChunk());

    StringBuilder br = new StringBuilder();

    int index = 0;

    for (Chunk c : chunks) {
        index++;
        if (index == 12) {
        index = 0;
        br.append("\n");
        }
        
        if (c == p.getLocation().getChunk()) {
        br.append("+");
        continue;
        }

        if (kingdomManager.getKingdom(c) != null) {
        br.append("/");
        continue;
        } else {
        br.append("-");
        }
    }
    
    msg(p, br.toString());
#

I'm getting unexpected behavior

harsh vector
#

it says that i'm already verified

sturdy oar
#

Phaze what is that even

harsh vector
#

a

#

why am i not verified ....

#

i did the thing ...

frigid ember
#

@sturdy oar I'm trying to make a faction map

#

I think its because I used an unordered collection i have to see if i can change something

keen compass
#

I am not entirely sure what that code is supposed to accomplish @frigid ember

harsh vector
#

what about me ...

keen compass
#

can try uploading a picture or posting links, but generally those verified have blue names

#

not white names

harsh vector
#

yeah

#

how do i get verified tho

keen compass
#

you verify with the bot

harsh vector
#

that's already what i did

frigid ember
keen compass
#

Well, you wouldn't exactly need those methods to do that then

dusty topaz
#

pretty sure all of cosmics source is leaked anyway, so if you are reaaaally stuck i guess you could check the actual stuff haha :p

subtle blade
#

Wouldn't really encourage that

dusty topaz
#

no, of course not, don't do that !

#

(I just checked, do not use it as a guideline!)

keen compass
#

lol

boreal tiger
#

lmao

drowsy orchid
#

Sorry to interrupt, but I'm looking for an anti-cheat/anti-hack plugin for Paper 1.15.2. Any recommendations? ๐Ÿ™‚

limber marlin
dusty topaz
keen compass
#

It isn't necessary to do any loops for what you are doing fyi @frigid ember you already know how many dashes you need. Just simple math really, nothing too complex

boreal tiger
#

any ideas on how I could more easily "chain" conversation api prompts?
I thought about creating a ChainablePrompt interface with a chain(ChainablePrompt prompt) method that sets the next prompt and implementing that for the prompt types I need
and then have some sort of PromptChainBuilder kind of thing

frigid ember
#

@keen compass I'm still stuck, how would I do it?

harsh vector
#

j

keen compass
#

Well, chunks are 16x16 blocks. If you want to display a cube, that is 9 chunks, or (16x3)x(16x3) which is equivalent to 48x48. I assume the dashes represents the chunk right?

frigid ember
#

Yeah

keen compass
#

so, instead of looping, you already know the number of dashes you need based on the math ๐Ÿ˜‰

#

then the next thing is just to grab the chunks that are relative to the players position

#

easy to do with player move event.

#

Then you just display your messages when the player moves to another chunk or another block or however you want to do it.

#

probably would recommend every time they move to a new chunk

frigid ember
#

It's a command so the player types /f map and it shows a map

#

I don't understand how to do it without looping

keen compass
#

because player move event fires every time they move, which is what your map is going to be based on.

frigid ember
#

It only updates when the type the command

keen compass
#

you don't need to send a message unless they move, you can already get the surrounding chunks based on their location

#

Then there you go, you just only do something when the command is ran

#

you can get the chunks around the player based on location of the player without a loop

#

simple math to add your dashes in, based on how many chunks you want to display

#

as I said a single chunk is 16 blocks wide and 16 blocks in length

frigid ember
#

you can get the chunks around the player based on location of the player without a loop

That's the part I'm stuck on

keen compass
#

get the location of where the player is at, add at least 16 to the location of x and z and minus 16 from x and z etc etc

#

you can use a loop, but your plugin would be better without it though

#

or get the chunk coords and use the chunk coords instead

#

which might be better to do to get the other chunks

#

because then you could just do +1 and -1

dusty topaz
#

would it not be better to do that in a single for loop then

#
for (int i = -5; i < 5; i++) {
  // add to map
}
keen compass
#

you could, but it would take longer for the loop to complete then it would be to just tell it to modify the coords that are already present to get the chunks

#

difference is, you have the machine count for you, vs you already know how much to count by

tiny dagger
#

^

dusty topaz
#

would you not have to individually spell it out 10 times then

keen compass
#

wouldn't be 10 times

#

it would just be 4 times

#

up down left and right

#

already have the center

dusty topaz
#

needs to get corners also

#

unless i'm missing something

keen compass
#

if they want to represent the corners, but I see there is compass

#

which shows north east south and west

dusty topaz
#

just seems like a lot of inconvenience for little speed benefit

#

since it wouldn't be a particularly intensive loop

keen compass
#

it wouldn't be intensive for a small server, but once you get enough players doing it though it will be ๐Ÿ˜‰

#

Anyways, I am just going based on the compass representation

frigid ember
#

It would be 121 times for a 11x11 square but i need it to be wider than that

keen compass
#

121 times ? o.O

dusty topaz
#

lol..

keen compass
#

not entirely sure how you get that

dusty topaz
#

i mean, not that i looked at how a big server does it

#

but pretty sure they did only 200 blocks

#

with a lot of iteration, string parsing and a bunch of other gibberish

frigid ember
#

Where did you get that from?

dusty topaz
#

must've dreamt it

frigid ember
#

๐Ÿ˜ฆ

keen compass
#

Because you don't need to iterate over every block for every dash

frigid ember
#

You need to iterate over every chunk

keen compass
#

you already know a chunk is 16 blocks wide

frigid ember
#

Yes

keen compass
#

so if the map only ever updates only when they use the command, then you don't need to iterate over every block, you just need to know where they are at in relation to the chunk.

#

minus their location from the center of the chunk they are in, and you already know how many dashes for the other chunk you need

#

no looping required for that, most of your methods is going to be math, not loops.

frigid ember
#

    /**
     * 
     * @param offset - int array to check
     * @param c - Chunk player is standing on
     * @return
     */
    public List<Chunk> getChunksAroundChunk(int[] offset, Chunk c) {

    World world = c.getWorld();
    int baseX = c.getX();
    int baseZ = c.getZ();

    List<Chunk> chunksAroundPlayer = new ArrayList<>();
    for (int x : offset) {
        for (int z : offset) {
        Chunk chunk = world.getChunkAt(baseX + x, baseZ + z);
        chunksAroundPlayer.add(chunk);
        }
    }
    return chunksAroundPlayer;
    }

Yep I got that

boreal tiger
#

unrelated but int array to check seems a bit ambiguous xD

digital sphinx
#

Is sponge = Spigot?

boreal tiger
#

no

dusty topaz
#

no

#

that is why one is called sponge

#

and one is called spigot

digital sphinx
#

where diffrence?

dusty topaz
#

pretty sure sponge is for modded servers...

#

and a completely different api

#

so most spigot plugins will work on sponge

#

and most sponge plugins will work on spigot

keen moth
#

Some plugins have universal implementations which do work

sturdy oar
#

world edit

tiny dagger
#

i have no idea how he did it :d

#

probabily why the jar is so big

boreal tiger
#

I mean spigot using plugin.yml

#

I think sponge uses a different one

#

they probably do like people do for nms

tiny dagger
#

sponge doesn't use one at all

#

i think

#

it's like annotation searching

boreal tiger
#

no idea, I just opened one and it had an mcmod.info thing xD

#

but I guess it'd still work

#

but you'd have to abstract stuff xD

tiny dagger
#

oh yeah

#

the amount of wrappers

boreal tiger
#

jesusss

keen compass
#

ok, I have to go get me some sustenance and then I will make a gist for you @frigid ember

ashen glacier
keen compass
#

need to modify the spawn limits it would appear

#

singleplayer is slightly different then hosted mc server as well as vanilla is different then spigot in some things lol

#

so can't exactly expect what you do in singleplayer to play out perfectly in hosted mc server that isn't vanilla

#

Anyways, if you have spigot, just look in spigot.yml

#

plenty of settings in there, in regards to spawn limits

ashen glacier
#

okey I check thanks for helping mw

#

me*

keen compass
#

make a backup of your spigot.yml file first @ashen glacier before editing it

#

so that if something messes up or something does seem right, you have something to go back to

ashen glacier
#

I'll thanks

old barn
#
ItemStack creeper = new ItemStack(Material.getMaterial(383/50));

I created the stack item, which in this case is a creeper egg, but when it comes time to spawn the player, he spawns 2 bedrock, does anyone know what problem?

hallow surge
#

why are you gettmaterial 383/50 and not just doing Material.EXAMPLEBLOCK

paper compass
#

Spigot = Dispenser with a water bucket inside

keen compass
#
ItemStack creeper = new ItemStack(Material.CREEPER_SPAWN_EGG);
hallow surge
#

^

#

idk what you were trying to do but what forsthalf said is what you should be doing

keen compass
#

probably read some old tutorial

#

when item id's were still a thing

hallow surge
#

those numbers mean nothing to spigot

#

they dont in 1.8 either

keen compass
#

you can use item id's in 1.8

hallow surge
#

seriously i just prefer material.EXAMPLEBLOCK much easier

keen compass
#

believe it was 1.12 when they finally got rid of item id's completely

hallow surge
#

For the better imo

paper compass
#

Guys canโ€™t you just extends Material then you can use

DIAMOND_ORE instead of Material.DIAMOND_ORE cuz I forgot

hallow surge
#

I'm not quite sure i just do Material.DIAMOND_ORE i can do it at a decent speed doesn't bother me to type it all out

paper compass
#

Thatโ€™s my question

#

Kk

keen compass
#

Material is an Enum so no

#

what you can do however is maintain your own enum and just add all from the Material

paper compass
#

I remember seeing something like that

#

Weird

hallow surge
#

If they extended Material? could mean something else

frigid ember
#

you can static import the enum

hallow surge
#

don't know why you would want to extend Material not that long of a word

keen compass
#

you can implement methods in enums

frigid ember
#

well specifically for DIAMOND_ORE instead of Material.DIAMOND_ORE cuz I forgot you just static import the enum

#

it is nice to do if you heavily use the enum

paper compass
#

Ahhh yeah itโ€™s static import ty guys, I just completely forgot

keen compass
#

well using the static import for an enum is generally recommended because enums are static anyways

paper compass
#

People are so helpful omg

old barn
#

@hallow surge I use version 1.8.8, Creeper_Egg does not exist, I have to use the item id.

paper compass
#

I hate that ^^^^

keen compass
#

their string name equivalent does exist in the API

frigid ember
#

not latest feels bad

paper compass
#

Because I wish they had material creeper egg

spring sapphire
#

Guys

paper compass
#

What

keen compass
#

Anyways 1.8 isn't supported anymore anyways

#

should update ๐Ÿ˜‰

spring sapphire
#

I am trying to create a command and it's really giving an error that's not existing

paper compass
#

Ok send

spring sapphire
#
    public String killCmd = "stuck";
    @Override
       public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {```
keen compass
#

you need to register your command as well as make sure your command is in the plugin.yml

spring sapphire
#

why is Commands marked red?

#

the class name

keen compass
#

You don't need to extend CommandExecute

hallow surge
#

lol

#

why are you extending command execute

paper compass
#

Lol

spring sapphire
#

because I have a command below it

hallow surge
#

๐Ÿ˜„ you dont need to do that

lilac wasp
#

CommandExecute isnt a thing

paper compass
#

Whatโ€™s CommandExecute :3 :

hallow surge
#

^ gp

spring sapphire
#

Ok I was following a tutorial and following him

#

however, removing it fixed the error lol

paper compass
#

โ€˜ 3 โ€˜

hallow surge
#

epozide

#

let me hook you up with a good tutorial ๐Ÿ˜„

paper compass
#

Lmao trash tutorial

keen compass
#

I think the person ment CommandExecutor

paper compass
#

Send the tutorial

keen compass
#

instead of CommandExecute

lilac wasp
#

Shows you how to register the command & put it in the plugin.yml

paper compass
#

@spring sapphire send the tutorial I wanna see how bad it is

hallow surge
#

bet its some 13 year old

keen compass
#

CommandExecutor executes a command, normally when implementing commands you don't need to Extend it or implement it. Usually plugins that want to run commands from other plugins would want to use that API class

paper compass
#

I am 16

hallow surge
#

Im talking bout the guy who made the tutorial smh

paper compass
#

I know

keen compass
#

I am old ๐Ÿ˜ฆ

paper compass
#

I like gin

#

Gin & lemonade

golden vault
#

Gin is like licking a pinecone.

hallow surge
#

he should really be doing in a Main Class

getCommand("Examples").setExecutor(new CommandExample());
//this code fetches the command Examples from the plugin yml and sets the executor to CommandExample class
paper compass
#

What?

keen compass
#

or, could just mean a card game @golden vault

golden vault
#

oh lol

paper compass
#

What

keen compass
#

I am not certain which is implied however

paper compass
#

@keen compass what u mean

golden vault
#

Hopefully the card game if they are actually 16

paper compass
#

Gin (Alcohol) & lemonade

#

And I am 16

golden vault
#

gross

paper compass
#

Shut up

#

Lmao

keen compass
#

Gin is also a card game @paper compass not just a type of drink

golden vault
#

stop drinking lol

#

gin rummy iirc

paper compass
#

But I like gin

keen compass
#

I can't say much as for others drinking habits, I mean I started pretty early myself

#

Not that I recommend it, because I don't lol

agile rock
#

For dependency injection, do i need to use guice?

keen compass
#

no

paper compass
#

In the Uk you can drink in public if your parents accompanies you and allows you to

golden vault
#

being a hypocrite does not make you wrong

keen compass
#

True, it doesn't make me wrong, but I try to not make it a habit of being one either lmao

golden vault
#

fair

paper compass
#

Gin is the best

golden vault
#

for throwing in the trash

keen compass
#

Uh no, but you can think so at least it isn't that bad of a drink

#

as far as the others go in terms of health etc etc

paper compass
#

Once I had 70% alcohol and it felt like it burnt my throat

#

Doesnโ€™t feel good

rain plank
#

anyone good with coding that could answer a question about hostile turning into passive spawners, message me D:

keen compass
#

?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.

paper compass
#

Guys I forgot how to spell throat in my last sentence

keen compass
#

well, if 70% does that for you might as well quit with the drinking. It only goes higher from there ๐Ÿ˜‰

paper compass
#

Only gin

#

Gin is good

rain plank
#

Okay, is there a mod or plugin to have spawner mobs not attack when you have them in a survival mode game? Same with passive mobs spawners. Instead of having them walk all over the map.

#

If that makes any sense.

keen compass
#

I am sure many plugins exist for spawners

#

and spawner customizations

#

you should really stop drinking though and wait till you are about 21 or older @paper compass all you do is hurt your growth by doing so.

limber marlin
#

On my server,when I try to enchant something to above efficency 10, or put it in a kit, the pickaxe reverts to effiiency 10 even though it was supposed to be efficiency 20 or something... no error or message in console but when a player mines with the pickaxe, the enchants all revert to 10.

keen compass
#

I think you need to use Unsafe enchants or whatever it is

#

?jd

worldly heathBOT
rain plank
#

does anyone know the best spawner customization plugin? ๐Ÿ˜ฎ

paper compass
#

21???

#

Why 21???

golden vault
#

Legal age of majority in the US.

paper compass
#

And what do you mean โ€œgrowthโ€

#

Iโ€™m in the Uk

keen compass
#

because you pretty much stop growing around 25, but really wouldn't hurt that much if you started doing so at a bit younger age

paper compass
#

Iโ€™ve been drinking gin but Iโ€™m still getting tall

keen compass
#

You kill off brain cells by drinking, stunts your growth, you incur more problems later in life that don't manifest right away.

paper compass
#

2 months ago I was 5 foot 5 inches and now Iโ€™m 5 foot 8 inches

keen compass
#

could have been 6ft by now ๐Ÿ˜‰

#

but I guess we will never know

golden vault
#

your height does not determine your mental and physical health

keen compass
#

^

lilac wasp
#

^

paper compass
#

Lmao

lilac wasp
#

Drinking alcohol at 16

paper compass
#

14 actually

lilac wasp
#

Why though?

paper compass
#

But Iโ€™m not 16

lilac wasp
#

What does it do for you?

paper compass
#

Now*

#

Tastes nice

keen compass
#

peer pressure @lilac wasp is generally the common thing

golden vault
#

go lick a pinecone, it tastes the same

paper compass
#

Not peer pressure, I just tried it and loved it

fading owl
#

i feel like this is the wrong kind of help section

lilac wasp
#

lmao

keen compass
#

I would agree with @golden vault on that statement

hallow surge
paper compass
#

You realise there are different flavours @golden vault

keen compass
#

@hallow surge Ok, but I wasn't the one that was curious about the tutorial

golden vault
#

additives not the base taste, which is pinecone

hallow surge
#

oh yea was it ohsry

#

there it is

keen compass
#

The base for gin used to be juniper berries

paper compass
#

Palma violet gin

keen compass
#

so I guess pinecone is better then those

#

not sure if you ever tasted a juniper berry

#

highly do not recommend it

golden vault
#

ya they taste like gin

#

yuck

paper compass
#

Palma violet gin is the best

keen compass
#

Anyways, alcohol just does a lot of bad things for you at a very young age that won't affect you right now

#

but later in life when you become an adult those problems will start to manifest

#

like early onset memory problems

#

where you find it more difficult to remember things then the typical person lol

lusty vortex
keen compass
#

sure its all fun and good when young to drink, but pretty much almost guaranteed you will incur some kind of problem by the time you are in your early twenties unless you are one of the lucky few that manages to not have any problems at all by then

paper compass
#

I only drink like a glass every 4 months

keen compass
#

hmmm, they way you make it sound, it would be as if you drank it almost everyday or at least once a week XD

paper compass
#

I have bad memory problems

lusty vortex
#

You're tripping out Frostalf lol

paper compass
#

Even before gin days

lusty vortex
#

Chill

keen compass
#

@lusty vortex to be fair, I generally don't encounter people recommending alcoholic drinks that only drink once every 4 months

#

generally those that recommend alcoholic drinks to me, do a fair bit of drinking lol

lusty vortex
#

Alcohol is only really bad if it becomes a habit

paper compass
#

I hardly drink

lusty vortex
#

And I doubt this dude drinks until he passes out

paper compass
#

Well

golden vault
#

it is literally a poison hence the effects

lusty vortex
#

A damn good poison then

paper compass
#

Once it was my sisters 18th birthday and everyone let me have a drink of their alcohol once they were done, there was about 20 drinks there LmFAO

golden vault
#

pretty mild as poisons go

keen compass
#

wine is pretty much one of the only types of alcoholic drinks that is good for you once in a while and it isn't because of the alcohol but rather where it comes from.

golden vault
#

but can taste good, as long as it is not gin

paper compass
#

Grapes

#

Mmmmmm i love grapes

#

What does win taste like

dusty topaz
#

tastes disgusting

paper compass
#

Vinegar?

dusty topaz
#

mmm not vinegar

#

i can't describe it it just was like

paper compass
#

Yeah my parents hate the taste

dusty topaz
#

i hate it too

paper compass
#

Once in my art class we were drawing win glasses and a plant next to it

#

But there was some wine left in the bottle

#

So my friend drank a bit

#

Idk why

#

That was like 2-3 years ago

frigid ember
#

Guys, how do I make zombie look like a player?

    protocolManager.addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Server.SPAWN_ENTITY_LIVING) {
        
        @Override
        public void onPacketSending(PacketEvent event) {
        if (event.getPacketType() == PacketType.Play.Server.SPAWN_ENTITY_LIVING)
        event.getPacket().getIntegers().write(1, (int) EntityType.ARMOR_STAND.getTypeId());
        }
        
    });
paper compass
#

What do you mean look like a player

#

Look at my dog

#

Now look at all that ram

#

80gb ram there

#

@dusty topaz

keen compass
#

if only your system could make use of it all

paper compass
#

Server*

#

Which it does

#

HP DL380 G6

#

80Gb is a lot of ram

#

Jesus

#

I think there is 16x 4gb sticks and 2x 8gb sticks

#

I just bought a new raid card for my server

keen compass
#

80GB isn't quite that much

paper compass
#

For me thatโ€™s a lot

gloomy arch
#

Hey can somme1 help me out i put my back up World on my server after somm1 destroid my world but pieces of the World are gone like spawn

mellow matrix
#

how do i set up MV so that if you change worlds it remembers were you were at so if you do the mv tp world command it takes you back to were you were at

frigid ember
#

Hey guys, this works if I set it to different mobs but disguising as a player doesn't work

    protocolManager.addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Server.SPAWN_ENTITY_LIVING) {
        
        @Override
        public void onPacketSending(PacketEvent event) {
        if (event.getPacketType() == PacketType.Play.Server.SPAWN_ENTITY_LIVING)
        event.getPacket().getIntegers().write(1, (int) EntityType.PLAYER.getTypeId());
        }
        
    });
ebon charm
#

hey guys, is here someone who can help me rn, please?

keen compass
#

?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.

ebon charm
#

oh, sorry

#

I want an Armorstand to always center itself in the block from any direction.
It only works in one direction, but I want it to be no matter which direction.

keen compass
#

probably going to have to mess with packets for that or rotate the armor stand based on view

ebon charm
#

I think I don't need packets

#

bc i can probably do it with BlockFace, or?

frigid ember
keen compass
#

you are going to need to mess with packets for that

#

so, the packet you would need is the spawn player packet

frigid ember
#

@lusty vortex it keeps crashing the server when I join

    protocolManager.addPacketListener(
        new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Server.SPAWN_ENTITY_LIVING) {

            @Override
            public void onPacketSending(PacketEvent event) {
            if (event.getPacketType() == PacketType.Play.Server.SPAWN_ENTITY_LIVING) {
                Player p = event.getPlayer();
                Location location = p.getLocation();

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

                EntityPlayer entityPlayer = new EntityPlayer(nmsServer, nmsWorld, profile, interactManager);

                nmsWorld.addEntity(entityPlayer);
                nmsServer.getPlayerList().players.add(entityPlayer);
                
                ((CraftPlayer) p).getHandle().playerConnection.sendPacket(
                    new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.ADD_PLAYER, entityPlayer));
                ((CraftPlayer) p).getHandle().playerConnection
                    .sendPacket(new PacketPlayOutNamedEntitySpawn(entityPlayer));

                event.getPacket().getIntegers().write(1, entityPlayer.getId());

            }
            }

        });

https://hastebin.com/radequtapa.php

keen compass
#

because that packet doesn't accept player entities

lusty vortex
#

Ur probably doing that async too lol

#

Yeah cancel that packet man

#

I told u

keen compass
#

therefore, you can't stuff gameprofile into that packet

lusty vortex
#

NAMEDEntity

keen compass
#

You need to use Spawn Player packet

frigid ember
#

This one?

                ((CraftPlayer) p).getHandle().playerConnection
                    .sendPacket(new PacketPlayOutNamedEntitySpawn(entityPlayer));
clear crag
#

Hello, i have a bungeecord server running at an external household and the hub for the server is located at my house. The issue is that when my internet goes down then comes back on, the bungeecord refuses to connect to it at all, the only way to get it to work again is to restart bungeecord. What can i do to fix this?

lusty vortex
#

Idk if that's a good idea to begin with either. It's one thing to change the entity type by changing the id

#

But you're trying to spawn an NPC to completely replace the already existing entity lol

frigid ember
#

I only want to make zombies look like players

lusty vortex
#

Yeah but you can't just do that

#

You need to spawn the entity on it's own

#

Not intercept a packet being sent to the client

#

Because they're two COMPLETELY different entity types

pastel basin
#

@frigid ember why don't you give citizens api a try

#

you don't need to reinvent the wheel

lusty vortex
#

I'm not sure what effect that'd have on the tracker system either? If the client never gets the creation packet, the tracker will still keep sending them the movement update packets and such

frigid ember
#

@pastel basin I can make custom pathfinder goals with citizens?

lusty vortex
#

Best to just create the entity from scratch rather then trying to mask another entities's type

#

Yeah they've got a cool API

pastel basin
#

i think you can since you can do it with commands

#

check the docs

lusty vortex
#

That'd save you a lot of time and effort at least ๐Ÿ˜†

keen compass
#

yeah, isn't quite easy to fool both the server and the client at the same time

#

have to fool the server into thinking it really isn't a player and that it is some other entity so it can have pathfinder goals etc, and then you have to fool the client into thinking it is a player and not some other entity

#

lots of packet interception and manipulation XD

lusty vortex
#

And either way, the AI would of looked weird as hell if you managed to replace a zombie's skin with a player's

frigid ember
#

Alright

hot girder
#

Spigot for java 14!

frigid ember
#

lol

#

does vanilla server even run on anything past 8

subtle blade
#

Yep

#

Runs on 14

#

Just ask Mini ;P

frigid ember
#

/give @a stone_shovel

#

Doesnt work

#

Anyone can help?

subtle blade
#

Probably using Essentials

#

/minecraft:give

frigid ember
#

/minecraft:give @a?

subtle blade
#

stone_shovel, yes

frigid ember
#

Ill try that when i get on later thanks

ebon charm
agile rock
#

How do I load certain chunks for crop growth, mob spawning etc

#

without a real player being there

ebon lintel
#

i just upgraded from 1.12.2 to 1.15.2 and its just so bad

frigid ember
#

@pastel basin is citizens free for 1.15?

pastel basin
#

yes, they drop builds on jenkins

knotty karma
#

How can I generate tallgrass? I have tried setting the bottom half, and that just places the bottom, so I tried setting the bottom and the block above it, but it immediately breaks.

jaunty night
#

does anyone know how minecraft calculates status increases based on enchantment levels. So given value x being the enchantment level, what equation would give you the status increase?

subtle blade
#

What status? I'm not sure I understand. Enchantments are just integer levels

jaunty night
#

So for example protection or sharpness

#

if x is equal to the enchant level.

#

how does minecraft calculate the increase in damage, defence, etc..

subtle blade
#

That depends entirely on the enchantment. For protection it's (4*level)%

#

i.e. Prot II would be 8%

#

Sharpness is 0.5 * (level + 1)

#

i.e. Sharpness 4 is +2.5

jaunty night
#

that makes sense

#

Is their like a list for different enchantts

#

like on the minecraft wiki or something

subtle blade
#

Don't think the wiki gives a list on a single page, but each enchantment has their own page explaining how the enchantment works and gives the formula

jaunty night
#

ah

mellow matrix
#

how can stop a player from using /wild in my spawn world in MV

hallow surge
#

depends if you own the plugin what plugin if its your own /wild plugin insert a check for a specific world

#

if not decompile and insert your checks in the current code not sure of an easier way to do it probably amuch easier way I wouldn't know of atm @mellow matrix

neon matrix
#

What event is called for a player head being broken by an explosion like TNT or creeper?
Im trying to remove the block from the blockList from BlockExplodeEvent and that isnt working
Cancelling the event if the block matches in BlockDamageEvent does not work
Cancelling the event if the block matches in BlockDropItemEvent does not work

I truly cannot figure out why my code is not working

hallow surge
#

Maybe BlockBreakEvent ?

neon matrix
#

I cancel for BlockBreakEvent as well; even though it is a player event

#

No dice

#

The piston detection works fine, interact works fine

hallow surge
#

yea as i thought just checked a thread on a simliar

#

issue

#

block break event should work fine

neon matrix
#

I will record a gif of what happens

hallow surge
#

multiple sources that could help in that thread

neon matrix
#
private fun onBlockBreak(event: BlockBreakEvent) {
  val block = event.block
  extractGraveData(block) ?: return
  //Disallow breaking of graves
  event.isCancelled = true
}
#

However EntityExplodeEvent is an idea

#

EntityExplodeEvent it is

#

Someone should figure out the difference between BlockExplodeEvent and EntityExplodeEvent and make it clear in the docs

hallow surge
#

its pretty self explanatory in the names imo

#

one is for entities

#

one if for blocks

neon matrix
#

How does a block explode?

#

TNT is an entity

#

So what block just natively causes explosions

hallow surge
#

I'm guessing BlockExplodeEvent is targeting the blocks that are in an explosion

neon matrix
#

That doesnt make sense; because I am using the same exact code for EntityExplodeEvent and BlockExplodeEvent, and the block is only safe when EntityExplodeEvent is present

hallow surge
#

the java doc puts pretty clearly what it does

#

I cant read java very well but it explains pretty well what hte different funcntions do

neon matrix
#
private fun onBlockExplode(event: BlockExplodeEvent) {
  event.blockList().removeIf{
    extractGraveData(it) != null
  }
}

private fun onEntityExplode(event: EntityExplodeEvent) {
  event.blockList().removeIf{
    extractGraveData(it) != null
  }
}
#

This is Kotlin

#

How does a block explode friend

#

That is what I am asking you

hallow surge
#

smh xD clearly oyu dont understand what I'm getting at

neon matrix
#

primed TNT is an entity; thats why it is caught by EntityExplodeEvent

#
public class BlockExplodeEvent
extends BlockEvent
implements Cancellable

Called when a block explodes

hallow surge
#

exactly called when a block explodes

neon matrix
#

How does a block explode

#

What block is an explosion generator?

hallow surge
#

I've already tried explaining this too you clearly you don't understand look it up if you have questions

#

link i posted before was a narrower use

#

reposted

neon matrix
#

I understand what BlockExplodeEvent does

#

Rather what it is supposed to do

#

The block to blow up should be the TNT block right? That would be the block from getBlock

hallow surge
#

clearly not

How does a block explode?

neon matrix
#

And then the affected blocks are in getBlockList

radiant pollen
#

No, TNT would be an EntityExplodeEvent, I'm pretty sure.

neon matrix
#

Then what CAUSES a BlockExplodeEvent

radiant pollen
#

Beds in the Nether.

neon matrix
#

Perfect example

radiant pollen
#

PrimedTNT is an entity, though.

#

Hope that helps.

neon matrix
#

And that explains why EntityExplodeEvent works and BlockExplodeEvent does not

#

Is a bed the only kind of block that can explode without an entity?

hallow surge
#

yea too my knowledge

radiant pollen
#

AFAIK.

neon matrix
#

Yeah so why could you not have told me "Bed" when I asked what block is an explosion generator

hallow surge
#

i tired okay

#

its 2 am

#

I was drawing a blank

neon matrix
#

Heads break in the water.
Will cancelling a BlockPhysicsEvent cancel this? or is it a waste of time?

radiant pollen
#

BlockExplodeEvent does not extend BlockPhysicsEvent.

neon matrix
#

I understand that

#

I mean if water flows into the head

#

It will break

#

Like torches do

radiant pollen
#

Oh... I have no idea.

#

It should...?

hallow surge
#

yea you can

#

just call for an event that has head break on touch with water

#

prolly a simpler optino

neon matrix
#

The head breaking in water is normal functionality

#

I am looking for the event to cancel that

#

But I have an alternative idea anyway so nvm; thanks for your help with the explosions

radiant pollen
#

@neon matrix BlockFromToEvent.

#

Check if the to location is a head.

#

Works with lava and water.

neon matrix
#

I've opted to place the head in the closest available air block above the death location

proud lynx
#

how can I hide a command run from a command block?

#

please tag me if you have the answer cuz I am leaving temporary from discord

sharp dew
#

@proud lynx if you want to hide all of them you can use the in game command gamerule commandBlockOutput false

wicked sage
#

is there an event that gets called when weather is changed automatically by the server? according to my client WeatherChangeEvent isn't called unless you use /weather or /toggledownfall? ๐Ÿค”

frigid ember
#

As far as I'm aware, it should be called, although ThunderChangeEvent is another event entirely

radiant pollen
#

Yes, you should listen for both.

wicked sage
#

hmm

#

ok

cold wharf
#

Is it possible to check how much blocks a player has placed or mined using placeholders?

frigid ember
#

Fuck knows, ask the place holders guys?

pastel basin
#

yes, there are extensions for that

cold wharf
#

@pastel basin What extension?

pastel basin
#

search for it

cold wharf
#

I did and I didn't find it so I came here

sacred wave
#

Hi, how to detect player's language settings in client minecraft? I know about Player#getLocale(), but it returns always en_us regardless minecraft language settings... :/

pastel basin
knotty karma
#

How would I go about properly generating both halves of tall grass?

cold wharf
#

@pastel basin someone told me that it is for certain block

knotty karma
cold wharf
#

So I didn't use that

pastel basin
#

pretty sure that counts for every block, but if you want for specific blocks you can do that too

cold wharf
#

Oh okay tysm

pastel basin
knotty karma
#

thank you! i've been looking for almost an hour and havent found anything lol

turbid vapor
#

I have 2 plugins with the same commands, and one plugin is taking priority, but i want that the other plugins executes the command

I cant figure out how to do this

pastel basin
#

use /pluginname:commandname

#

example /essentials:tp or /minecraft:tp

turbid vapor
#

Oke thx,

#

But i still dont know how to block it

#

Just with a CommandBlocker plugin?

pastel basin
#

do you want to block players from using /plugin:command ?

turbid vapor
#

I have 2 plugins with the command "/pay"

Plugin A is handeling that command, but i dont want that

I want that plugin B handels it

pastel basin
#

you will need to use a command block plugin then

#

suggestion: my-command

turbid vapor
#

Yes but that is the problem, it blocks the whole command then

#

Not only for one plugin

sturdy oar
#

?

#

/plugin:pay

pastel basin
#

create the command /pay on the command blocker and set it to execute /plugin:pay

turbid vapor
#

create the command /pay on the command blocker and set it to execute /plugin:pay
@pastel basin i dont know a commandblocker plugin that can do that

#

I only can find commandblockers that blocks only one command

pastel basin
#

mycommand as I said before

#

can do that

wicked sage
#
    commands:
      - chance: 50
        command: eco give %player_name% 100
      - chance: 50
        command: give %player_name% DIAMOND 6
      - chance: 50
        command: give %player_name% IRON_INGOT 12```
#

if i wereto parse this, what would the data structure be?

#

config.getList("commands");

#

what will be the type of the lsit?

lament wolf
#

Hello ! Someone know how to set a pathfindersgoals on an EntityPlayer (npc) ?

pastel basin
#

use citizens

lament wolf
#

without use citizens

pastel basin
#

well, good luck reinventing the weel, you have a long path of research and packets ahead

lament wolf
#

mmm mm mmm

#

I should glance Citizens

sacred wave
#

Hi, how to detect player's language settings in client minecraft? I know about Player#getLocale(), but it returns always en_us regardless minecraft language settings... :/
@sacred wave In case someone has this issue, the problem probably is, you are calling it on Player Join... That is too soon, when invoked later, it works ๐Ÿ™‚

marble ingot
#

i'm trying to put a Custom Player Head Texture on an Armor Stand and am aware GameProfile is no longer an option. How would I go about getting this Player Head

{SkullOwner:{Id:"33a84c61-263c-4689-a62c-3b8044e1ff4d",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDVjNmRjMmJiZjUxYzM2Y2ZjNzcxNDU4NWE2YTU2ODNlZjJiMTRkNDdkOGZmNzE0NjU0YTg5M2Y1ZGE2MjIifX19"}]}}} 1```

Current Code:
```java
ItemStack chestHead = new ItemStack(Material.PLAYER_HEAD, 1);
SkullMeta chMeta = (SkullMeta) chestHead.getItemMeta();```
chrome edge
#
        if (!texture.isEmpty() && !signature.isEmpty()) {
            GameProfile profile = new GameProfile(UUID.randomUUID(), null);
            PropertyMap propertyMap = profile.getProperties();
            if (propertyMap == null)
                throw new IllegalStateException("Profile doesn't contains property map");
            propertyMap.put("textures", new Property("textures", new String(texture)));
            ItemStack head = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);
            ItemMeta headMeta = head.getItemMeta();
            try {
                Field profileField = headMeta.getClass().getDeclaredField("profile");
                profileField.setAccessible(true);
                profileField.set(headMeta, profile);
            } catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) {
                e.printStackTrace();
            }
            head.setItemMeta(headMeta);
            this.current = head;
        } else {
            this.current = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);
        }
        return this;
    }```
#

part of my old code. You can edit as your needs.

marble ingot
#

wait whats the signature is that the ID?

#

and JITEM? whats that

chrome edge
#

Skins has signature and texture datas.

#

As I mention it, it's my old class.

marble ingot
#

oh the issue was that GameProfile isnt a thing anymore

chrome edge
#

Do you use minecraft-head for getting texture?

marble ingot
#

yeh

chrome edge
#
        GameProfile profile = new GameProfile(UUID.randomUUID(), null);
        byte[] encodedData = Base64.getEncoder()
                .encode(String.format("{textures:{SKIN:{url:\"%s\"}}}", url).getBytes());
        profile.getProperties().put("textures", new Property("textures", new String(encodedData)));
        Field profileField = null;
        try {
            profileField = itemMeta.getClass().getDeclaredField("profile");
            profileField.setAccessible(true);
            profileField.set(itemMeta, profile);
        } catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) {
            e.printStackTrace();
        }```
#

url is URL of skull

marble ingot
#

oh the issue was that GameProfile isnt a thing anymore

#

GameProfile isnt in 1.15

#

unless i am doing something wrong

paper pumice
tiny dagger
#

you iterate over all sections and if it's equal with that number you return it

#

there is no skip over

paper pumice
#

Thank you @tiny dagger

tiny dagger
#

no problem

cold wharf
#

@pastel basin that doesn't work I need to specify the block type

@cold wharf literally the first result when I searched
@pastel basin

#
[10:00:32 WARN]: java.lang.IllegalArgumentException: The supplied Material does not have a corresponding statistic
[10:00:32 WARN]: at org.apache.commons.lang.Validate.notNull(Validate.java:192)
[10:00:32 WARN]: at org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer.getStatistic(CraftPlayer.java:787)
[10:00:32 WARN]: at
marble ingot
#

armorstand.setHelmet is deprecated now for armorstands what is the alternative for it

boreal tiger
pastel basin
#

@cold wharf search for a stats plugin, there are many out there

marble ingot
#

yeh got that now @boreal tiger thanks tho ๐Ÿ™‚

boreal tiger
#

๐Ÿ‘Œ

pastel basin
#

you'll need to download the plugin as well

cold wharf
#

Aight ty

marble ingot
#

I would assume this would set the angle of the armor stands legs but it doesnt seem to:

EulerAngle legsPose = new EulerAngle(0f, 0f, 180f)
armorstand.setLeftLegPose(legsPose)

but it puts the legs at an odd angle "233.34"

(this is after spawning the armor stand on a specific player)

vernal lance
#

isn't it in radians?

#

wait nvm

boreal tiger
#

it is radians yeah

marble ingot
#

i

boreal tiger
#

you have to convert from degrees

marble ingot
#

hate

#

radians

wicked sage
#

radians are cool

boreal tiger
#

hhpazzzzz henlo

rugged void
#

is it possible to create multiple worlds that can have their individual nether and end worlds with global and local plugins/mods etc.... but have everyone login into a reception world with portals to the other worlds?

fathom coral
#

Hello, how do I disable plugins in a certain world?

dusky roost
#

@fathom coral im not sure if u can do that

marble ingot
#

i mean if you go into every plugin and only make it react if in that world lmao

dusky roost
#

I would recommend you look into something like bungeecord to use plugins you want per server

marble ingot
#

^^

fathom coral
#

i mean if you go into every plugin and only make it react if in that world lmao
@marble ingot I'll try that

dusky roost
#

._.

#

this guy

#

@marble ingot

#

@fathom coral You would have to modify the source code of every plugin

fathom coral
#

okay well then maybe not

dusky roost
#

@fathom coral What you want to do is use Bungeecord to link multiple server instances

#

and choose the plugins you want on each server

fathom coral
#

okay

#

how do I get another server?

left plover
fathom coral
#

it did not work

left plover
#

oh

dusky roost
#

.-.

marble ingot
#

@fathom coral how are you hosting your server

fathom coral
#

it is on a dedicated server

dusky roost
#

ok great

left plover
#

A VPS or a singular?

dusky roost
#

dedicated server usually means the entire machine

#

but who knows

left plover
#

a lot of providers of individual servers like to call them dedicated for some reason

marble ingot
#

@fathom coral is it off of your computer or are you using a website

dusky roost
#

to make them sound better

fathom coral
#

it is on my computer

marble ingot
#

oh that makes everything much easier

#

yeh use bungeecord

fathom coral
#

okay thanks

marble ingot
fathom coral
#

Thank You

chrome heron
#

Any method to disable tab complete on bungee
?any plugin

sharp dew
#

in bukkit you can use the event TabCompleteEvent

chrome heron
#

bungeeeeeeeeee

#

but how?

#

i dont have any idea on script

sharp dew
#

i don't know how to do it with script, you can do it with java

tiny dagger
#

you're probabily need to listen to the packlet playout tabcomplete i think ๐Ÿค”

sharp dew
#

there is the TabCompleteEvent in bungee, i checked

chrome heron
#

ty

sharp dew
#

but with the tabCompleteEvent you can't hide command entirely if you cancel the TabCompleteEvent you can block the parametes of a command but not the list of commands itself

chrome heron
#

or

#

custom tablist

sharp dew
#

you will need to block the PacketPlayOutCommands packet if you want to hide a command

#

custom tablist
what do you mean

chrome heron
#

well i hv zero language knowledge of java

#

but with the tabCompleteEvent you can't hide command entirely if you cancel the TabCompleteEvent you can block the parametes of a command but not the list of commands itself
@sharp dew

#

where to edit it

wanton delta
#

PlayerCommandSendEvent

#

Idk if its in bungee

#

But its how you clear the sent command list

chrome heron
#

wdym

#

sent command list?

frigid ember
#

Please help with this error you can not enter the server

13:50:29 WARN]: An exception was thrown by a user handler's exceptionCaught() method while handling the following exception:
java.lang.NullPointerException
[13:50:33 INFO]: Given Mining Fatigue (ID 4) * 3 to uselles_3iq for 6 seconds
[13:50:34 INFO]: Given Mining Fatigue (ID 4) * 3 to uselles_3iq for 6 seconds
[13:50:34 WARN]: Failed to initialize a channel. Closing: [id: 0xa5c3b5b2, /10.0.0.1:27702 => /10.1.20.24:15430]
java.lang.NoClassDefFoundError: Could not initialize class com.comphenix.protocol.injector.netty.ChannelInjector
at com.comphenix.protocol.injector.netty.InjectionFactory.findNetworkManager(InjectionFactory.java:205) ~[?:?]
at com.comphenix.protocol.injector.netty.InjectionFactory.fromChannel(InjectionFactory.java:142) ~[?:?]
at com.comphenix.protocol.injector.netty.ProtocolInjector$1.initChannel(ProtocolInjector.java:157) ~[?:?]
at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:69) [server.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:158) [server.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRegistered(AbstractChannelHandlerContext.java:144) [server.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:71) [server.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:158) [server.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRegistered(AbstractChannelHandlerContext.java:144) [server.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:71) [server.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandler

#

Where can I download the latest version of spigot? will anyone link me?

chrome heron
#

you need to download the version

#

on

#

bukkit build tools

frigid ember
#

bukkit building tools?

chrome heron
#

ys

frigid ember
#

i have spigot

chrome heron
#

no,for the latest build,i use this

frigid ember
#

I use 1.8.8

chrome heron
#

Where can I download the latest version of spigot? will anyone link me?
@frigid ember

#

the latest verion is provided on build tools

#

wdym by 1.8.8

dusty topaz
#

@frigid ember it just looks like you have the wrong version of protocol lib

frigid ember
#

anyone send the latest version of protocollib??

chrome heron
#

Any method to disable tab complete on bungee
?any plugin
@chrome heron
I dont hv any java language knowledge

#

Any plugin could help?

frigid ember
#

next problem, from time to time crashes half of the players and there is:
[159:41 INFO]: BasedShinso lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: Mr_Tymbark lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: Xerratch lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: OnlyBisYT lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: InsecT lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: phasmatos
lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:42 INFO]: Protect_ONLY lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:42 INFO]: UUID of player Mr_Tymbark is 7155c5cf-8fdf-496c-af66-432e50cb3a0a
[159:42 INFO]: UUID of player Xerratch is 6f1ecf72-53f3-4836-b323-238b3f9ce761
[159:42 INFO]: UUID of player BasedShinso is fe3aac66-866a-4a83-87a2-8139ba9b4703
[159:42 INFO]: UUID of player BasedShinso is fe3aac66-866a-4a83-87a2-8139ba9b4703
[159:42 INFO]: UUID of player Mr_Tymbark is 7155c5cf-8fdf-496c-af66-432e50cb3a0a
[159:42 INFO]: UUID of player phasmatos_ is bacdbf5a-3629-48b8-a7d7-59fd71165215
[159:42 INFO]: UUID of player phasmatos_ is bacdbf5a-3629-48b8-a7d7-59fd71165215

lapis crypt
#

I need PermissionsEx for a Plugin and its deleted now anyone Download for 1.8.8 Spigot?

chrome heron
#

use luck perms

silver haven
#

How to compile the plugin using some sort of cicd?

#

Can i use github actions?

marble ingot
#

im using break naturally to break a block. is there any way i can spawn the particles

subtle blade
#

breakNaturally() should do that. If not and if possible, pass the item used to break the block

marble ingot
#

@subtle blade java BlockBreakEvent blockBreakEvent = new BlockBreakEvent(clickedBlock, event.getPlayer()); Bukkit.getPluginManager().callEvent(blockBreakEvent); if (blockBreakEvent.isCancelled()) {return;} clickedBlock.breakNaturally();

lament wolf
#

What is a (nms) Vec3DPool ?

ebon charm
#

Hello,
i am doing a shop but dropped items.
The items are the passengers of the armorstands.
But when i right-click the sign (which i made), it doesn't center in the block.
It only works from only one player direction, but i want that it works from every direction.

frigid ember
#

next problem, from time to time crashes half of the players and there is:
[159:41 INFO]: BasedShinso lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: Mr_Tymbark lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: Xerratch lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: OnlyBisYT lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: InsecT lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: phasmatos lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:42 INFO]: Protect_ONLY lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:42 INFO]: UUID of player Mr_Tymbark is 7155c5cf-8fdf-496c-af66-432e50cb3a0a
[159:42 INFO]: UUID of player Xerratch is 6f1ecf72-53f3-4836-b323-238b3f9ce761
[159:42 INFO]: UUID of player BasedShinso is fe3aac66-866a-4a83-87a2-8139ba9b4703
[159:42 INFO]: UUID of player BasedShinso is fe3aac66-866a-4a83-87a2-8139ba9b4703
[159:42 INFO]: UUID of player MrTymbark is 7155c5cf-8fdf-496c-af66-432e50cb3a0a
[159:42 INFO]: UUID of player phasmatos is bacdbf5a-3629-48b8-a7d7-59fd71165215
[159:42 INFO]: UUID of player phasmatos_ is bacdbf5a-3629-48b8-a7d7-59fd71165215

chrome heron
#

Any method to disable tab complete on bungee
?any plugin

strange grove
#

hey does anyone here know how to make the custom map images align together in order to make one large singular image that is made from other maps?

#

that would rly be helpful ๐Ÿ™‚

marble ingot
#

there are websites google it

remote socket
#

Does anyone know how to format a number with suffix (K, M, B, T) with one rounded decimal

rugged void
#

wouldn't multiverse access mess up end and nether access?

lusty vortex
#

Anyone ever run into issues with Map scales? For whatever reason, it refuses to render higher then 128 pixels no matter what scale it's set to. The scale is set server-sided too

#

Or am I just misunderstanding the entire concept of maps

unique fox
#

I want to use an older map from 1.14.3 on my server 1.15.2. Do i just drop the old files in the /world folder on 1.15.2 server? anything I need to do beforehand?

wise token
#

hi how do i download new build pls

light geyser
#

Im dealing with a little issue regarding scoreboards. I run these two lines in onEnable(): ```java
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "scoreboard objectives add health health");
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "scoreboard objectives setdisplay list health");

subtle blade
#

Don't run commands to execute logic

light geyser
#

Ive also tried it using the API, but realized just using commands would be easier, however it aint working ๐Ÿ™‚

subtle blade
#

If you're running commands you might as well be using command blocks

light geyser
#

How would you recommend I do it then?

#

When I used the bukkit api I first created the scoreboard, then got an objective from it, set the display to list, and iterated over each player to set that as their scoreboard

#

That didnt work though

#

Okay...interesting now. This is what it shows now, criteria is health. How would I get it to show hearts instead?

#

Scoreboard is created like so: java ScoreboardManager sbManager = Bukkit.getScoreboardManager(); scoreboard = sbManager.getNewScoreboard(); Objective healthObjective = scoreboard.registerNewObjective("health", "health", "health"); healthObjective.setDisplaySlot(DisplaySlot.PLAYER_LIST); then the player gets it set to itself with player.setScoreboard(UhcPlus.scoreboard); in a PlayerJoinEvent

marble ingot
#

just divide it by 2

#

each heart has 2 health

#

so if you divide health by 2 you will get hearts

light geyser
#

yeah, but how do I get the actual hearts? like the icons

sleek ivy
#

so with the restart-script approach, it launches a new process which I can't seem to access the console of. I'm using tmux but when I login all I see is the shut down one, but the new process is running. is there any way to properly attach to that new process? not being to access console is a prob

earnest bay
#

@light geyser you can add a fourth argument RenderType.HEARTS

light geyser
#

Yep, that works. Thanks!

#

Then I ran into another..interesting issue.. ```java
//Put the died player into spectator mode and TP them to 0,0 in the UHC World
player.setGameMode(GameMode.SPECTATOR);

    Location tpLocation = new Location(Bukkit.getServer().getWorld("uhcworld"), 0, 100, 0);
    player.teleport(tpLocation);
#

Do I need to teleport before the gamemode change or?

#

Nope switching it wasnt the fix either

upper hearth
#

Is there an error?

light geyser
#

nope

#

it just spawns me at the world spawn point

upper hearth
#

Do you actually die?

#

Where you have to click respawn?

light geyser
#

After I die I should get TP'ed by the code, in a PlayerDeathEvent. I do actually die as far as I know, using /kill

upper hearth
#

You can't teleport a dead player afaik. You need to see if they're GOING to die, cancel the damage, and teleport them then

#

Or use PlayerRespawnEvent and teleport them then I suppose.

light geyser
#

Yep that works better

#

Will do that

chrome heron
light geyser
#

set a TabCompleter, and return an empty list

chrome heron
#

how to set

light geyser
#

e.g: ```java
getCommand("uhcp").setTabCompleter(new UhcpTabCompleter());

chrome heron
#

no idea on java ๐Ÿ˜ฆ

light geyser
#

then in UhcpTabCompleter, in my case (this is a class)

public class UhcpTabCompleter implements TabCompleter {

    @Override
    public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
        return new ArrayList<>();
        }
}```
#

The first line I sent goes in your onEnable method

earnest bay
#

@light geyser, why do you add an empty string to your list?

light geyser
#

I dont myself, but Terence could do it like that

#

Though thinking about it, you dont need to add anything no

upper hearth
#

Just return new ArrayList<>()

chrome heron
#

i just add it under the import?

light geyser
#

yep that works too Dessie

#

Ive fixed it

earnest bay
#

Collections.emptyList() would be cleaner imo

frigid ember
#

is this a place to ask about the spigot api?

earnest bay
#

@frigid ember, sure

frigid ember
#

ok let me just double check it before i ask the question ๐Ÿ™‚

chrome heron
#

then like this?

light geyser
#

Server is probably underpowered

#

Hardware wise

#

or, you have something hogging system resources

#

Very well possible yes

earnest bay
#

@frigid ember if it is on startup, that would be fine, on join less fine

light geyser
#

I know my plugin tends to throw those warnings, since it needs to generate a new world

upper hearth
#

Does it do it everytime?

chrome heron
#

Very well possible yes
@light geyser
Talking to me?

light geyser
#

No, to Festive

earnest bay
#

@chrome heron, that onTabComplete looks fine, no clue wat that TabComplete event is suppose to do though

upper hearth
#

That message is literally telling you that the server is lagging lol

chrome heron
#

ok,ty for your help @earnest bay @light geyser

light geyser
#

np ๐Ÿ˜„

#

back to my issue with TP'ed after death. doing it like this rn: ```java
@EventHandler
public void onPlayerRespawnEvent(PlayerRespawnEvent event) {

    Player player = event.getPlayer();
    
    System.out.println("TEST");
    
    //Put the died player into spectator mode and TP them to 0,0 in the UHC World
    Location tpLocation = new Location(Bukkit.getServer().getWorld("uhcworld"), 0, 100, 0);
    player.teleport(tpLocation);
    
    player.setGameMode(GameMode.SPECTATOR);
}```

Player still doesnt get TP'ed, and seems to go into half spectator, they cannot pass through blocks or use the spectator ui

#

๐Ÿค” seems I need to delay it one tick

frigid ember
#

alright, just double checked

#

it has to do with chunk unloading using the unload method does not seem to work

#

for 1.15