#development

1 messages · Page 105 of 1

lyric gyro
#

any ideas

thick kestrel
#

?paste

neat pierBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

lyric gyro
#

(Sophia) in part you're trying to access an element at an index before checking the args length

thick kestrel
#

you never assigned locationraid to anything

lyric gyro
#

final org.bukkit.Location locationraid = new Location(Bukkit.getWorld("world"), 102, 67, -25);

lyric gyro
thick kestrel
#

and you assigned it static cordnates?

lyric gyro
#

102 67 -25

thick kestrel
#

@lyric gyro could you reference where I did that?

#

@lyric gyro did you check your cords in f3?

lyric gyro
#

Yes

#

and also broadcasted it

#

coords match

#

there are dozens of command frameworks you can use, but this is a basic understanding of arrays, you're doing this:
Say for instance I type /cmd whatevs a

if (args.length == 1) {  // false
  // ...
  return arglist;
}
if (args[0].equalsIgnoreCase("item") && args.length == 2) {  // fails first condition
  // ...
  return arglist;
}
if (args[1].equalsIgnoreCase("spell") && args.length == 3) {  // fails second condition
  // ...
  return arglist;
}
if (args[2].equalsIgnoreCase("bind")) {  // oops! there is no args[2]! throw
  // ...
  return arglist;
}
thick kestrel
#

are you able to use equals on cordnates?

lyric gyro
#

Yes but it has to be exact, I'd suggest converting toBlockLocation (or whatever it's called) in any case

#

idek how to do that

#

with the method I just mentioned

thick kestrel
#

@lyric gyro could you show me a framework?

#

I will try something different out

lyric gyro
thick kestrel
#

thanks will look into them

#

oh this is like what I was looking at

#

a template

lyric gyro
#

How abt his

#

this

#

Block loc1 = block.getLocation();

#

How would I get that

#

where when they right click a block

#

it gets the location

thick kestrel
#

you will need to add a command instead of right click

#

where it gets where the player is standing when they issue the command

lyric gyro
#

eh?

thick kestrel
#

I dont know how you would go about right clicking

lyric gyro
#

you can still get the player location on PlayerInteract

#

lol

thick kestrel
#

oh

#

Im new to this

#

still dont know many of the functions

#

for bukkit

lyric gyro
#

javadoc can be quite daunting if you're not familiar with them but they are VERY resourceful

#

just knowing how to navigate them

thick kestrel
#

I understand them

#

Im not new to coding just new to bukkit plugins

#

I dont remember functions till I use them a few times

#

but I looked at the frameworks you send me and none of them really suit my taste

#

I also googled for more

#

but I still dont really like them

#

I may use the template I showed but I have to recode and find all the libraries

#

well for classes I can just copy and paste

#

I will try the template and see if I can get it working

#

its a good template

#

framework

lyric gyro
#

Cannot resolve symbol 'getAction'

#

if (event.getAction.equals(Action.RIGHT_CLICK_BLOCK)) {

#

it's a method

#

()

#

?

#

huh

#

you're missing the parenths

#

where at

#

getAction

#

oh

#

I see

#

if (event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {

#

like that

#

that'll work yeah

#

So like that

#

jesus christ

#

?paste

neat pierBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

lyric gyro
#

as a side note: when you're comparing enums (like Actions or Materials) and primitives (ints, longs, chars etc) you should use ==; for everything else .equals

#

ok

#

Would it work tho

#

testing rn but

#

its slow

lyric gyro
#

or at least I don't see anything immediately wrong

#

It works

#

okay so

#

Say I wanted it to do

#

like a skull

#

Wait

#

sorry trhat made no sense

#

What if I wanted it to teleport everyone in the distance of 4 blocks

thick kestrel
#

if its slow you could optimize your imports

lyric gyro
#

its not slow

#

I meant like

#

connecting to host is slow

thick kestrel
#

oh

#

are you running a testing server on localhost?

lyric gyro
thick kestrel
#

maybe you should make a local server and directly build your jar into the plugins

lyric gyro
#

Doesnt ! mean like

#

its not

#

else if (!player.getItemInHand().getType() == Material.IRON_INGOT) {

thick kestrel
#

ah darn time to make this plugin inside a framework T~T

lyric gyro
#

doesnt work

#

else if (!=player.getItemInHand().getType() == Material.IRON_INGOT) {

#

Expression expected

#

Unexpected token

#

';' expected

#

Unexpected token

thick kestrel
#

no

#

(player.getItemInHand().getType() != Material.IRON_INGOT)

#

hand item is not equal to iron ingot

#

not

lyric gyro
#

ty

thick kestrel
#

not not handitem

#

you would just be saying not handitem but is equal to iron ingot

#

well your saying not player actually

#

so no player is == iron ingot

#

thats what you were saying x3

lyric gyro
#
                    event.setCancelled(true);```
#

I wanna do it

#

if they dont right click the prismarine

#

it cancels the event

#

not like

#

where they cant place it

thick kestrel
#

?

lyric gyro
#

got it

#

nvm

#

How can I make it so like

#

it makes a whole new world

#

with maps and everything

#

like generates one

thick kestrel
#

get a library of multiverse and use its api

lyric gyro
#

ok

#

thanks

thick kestrel
#

anyone have any idea where the symbol trituple is from

#

private static final Map<Command, List<TriTuple<Object, Method, Command>>> arguments = new HashMap<>();

#

I trying to get this framework working

icy shadow
#

christ

thick kestrel
#

?

icy shadow
#

eclipse hono apparently

#

but jesus

#

horrid

thick kestrel
#

what

icy shadow
#

TriTuple

#

cursed

thick kestrel
#

wdym

icy shadow
#

wdym wdym

#

i mean it's cursed

thick kestrel
#

so what

#

I would like to get this framework working

icy shadow
thick kestrel
#

is it only on eclipes?

icy shadow
#

probably

#

but like, every general purpose library has a Triple / Tuple type

thick kestrel
#

well this framework doesnt list the library that used Trituple

lyric gyro
#

cough jdk cough

thick kestrel
#

im using jdk 16

icy shadow
#

just make a record then

thick kestrel
#

I cannot get the files to import properly it stops on the java file or symbol

#

fixed it

thick kestrel
#

went to build and it came out with 100 errors...

#

maybe its time to build with an updated framework...

#

there are no errors in the project just in the building

#

nvm fixed it

dense galleon
#

Can I

#

In any way

#

have an abstract class (public abstract class SomeEntity)

#

extend a class...

#

but like

#

public abstract class SomeEntity extends <? extends LivingEntity>

#

That's just an example not supposed to make any sense, you can replace the class names with anything

#

But I want it to extend a wildcard..? which is a class that extends a specific class though

icy shadow
#

Short answer, no

dense galleon
#

F

#

Cause I got a lil issue where

#

I got a class which has a lot of data

#

Which needs to extend PathAwareEntity, but I also need that same exact class to possibly extend AnimalEntity based on the need

#

How would I avoid creating two separate classes which extend those two things

#

And have a LOT of repeating code

thick kestrel
#

java.lang.IllegalArgumentException: The embedded resource 'src/resources/options.yml' cannot be found in plugins\MagicTools.jar
https://pasteboard.co/ifJrp8KLsOhO.png

For some reason its not able to find it

thick kestrel
#

fixed it

mystic fern
#

Hi! One thing! Can I cancel the Player Move Event on the OnJoinEvent ? Because I would like to cancel the movement until they write a command on the chat. I don´t know if I explain well. Thx

warm steppe
#

when they join the server put them in a list and when they move remove them from that list

#

then make a check on the chat event if they are in the list

#

if they are, say that they need to move

#

and cancel the event

thick kestrel
#

I cant find any good working spigot frameworks

#

for 1.18

#

cant someone help me?

wheat carbon
#

what sort of framework are you after?

#

what functionality do you need?

mystic fern
thick kestrel
#

Scoreboard/Saving and loading config/command handler

#

it would be also nice to have a system that you can tag items and bind a script to it

#

as thats a main function of this plugin

#

but I expect I will have to do some digging in open source api for that one

#

its more like an rpg framework

thick kestrel
#

thanks this is a good command framework

#

does anyone know of framworks for saveing and loading and scoreboard?

#

and possibly item tagging

warm steppe
#

item tagging?

thick kestrel
#

to attach a script to it

warm steppe
warm steppe
thick kestrel
#

its done in plugins like itemadder

warm steppe
thick kestrel
#

thanks again

#

NBT api will give me item scripts

#

if anyone has any suggestions on a scoreboard framework let me know ^~^ otherwise I will do some digging

high edge
#

Just handle it yourself, it's really not that hard

tight junco
#

kek just remake spigot loser

sage thorn
#

should each subcommand have own class?

tight junco
#

yes

sage thorn
#

is there a tutorial bcs i dont know where to start 😄

tight junco
#

uh not off by heart that i know of

#

no

sage thorn
#

found something

#

😄

#

kinda old

tight junco
#

i would just use matt framework for commands CatJam

mortal timber
#

java.lang.NullPointerException: Cannot invoke "com.comphenix.protocol.ProtocolManager.sendServerPacket(org.bukkit.entity.Player, com.comphenix.protocol.events.PacketContainer)" because the return value of "com.comphenix.protocol.ProtocolLibrary.getProtocolManager()" is null

i dont understand why the protocolmanager (protocollib) does not work

tight junco
#

providing your code is useful

#

also you probably implemented protocol lib into your plugin instead of compiling it

lyric gyro
#

instead of stitching something up with many smaller frameworks

thick kestrel
#

@lyric gyro no thanks I want to keep my compiling size low

wheat carbon
#

I've nicked you as I can't stand untypable usernames

thick kestrel
#

lol

#

ok

#

I have no need for allot of features in lucko

lyric gyro
#

I mean it's not even that large and it will probably be near if not even smaller than your Frankenstein'ed plugin lol

thick kestrel
#

I dont like the wiki theres no examples

lyric gyro
#

excuse me?

thick kestrel
#

on lucko

lyric gyro
#

there very much are examples

thick kestrel
#

I dont see any

lyric gyro
#

if you're gonna """"read the wiki"""" at least read it deep enough to ensure what you're saying is true

thick kestrel
#

ok I found examples

lyric gyro
cinder forum
thick kestrel
#

but I dont like the coding style x3

lyric gyro
thick kestrel
#

I think the other ones keep it much more simplier and readable when it comes to updating

lyric gyro
#

my personal suggestion: just stick with the bukkit api, it's not that hard... it does have a few sharp corners you'll want a helper for (like commands) but other than that it's not really that big of a deal

high edge
#

Emily, just accept it, you're a noob

lyric gyro
#

frosty stfu no one likes you

high edge
#

Hey that's not nice 😦

lyric gyro
#

sez u

high edge
#

Can't even spell right and you trynna flame me

#

Sucker

tight junco
#

okay mr "trynna"

thick kestrel
#

x3

high edge
#

Do I even want to ask why you got so many of the same emoji?

thick kestrel
#

x3

tight junco
#

no you don't

lyric gyro
#

i have more

#

but discord won't let me use them

thick kestrel
#

on topic is this channel note

lyric gyro
#

yes

#

this is very on topic

high edge
#

We are always on topic

lyric gyro
#

utmost importance

thick kestrel
#

topic = hotdog.pvp();

tight junco
#

we never go off topic here

robust flower
#

I have kind of a stupid question, but when things seems so simple there must be something wrong: In a context of limiting a method param to an Iterable<?> instead of a Collection<?>, what would be the difference between using Collection#isEmpty vs Iterable.iterator()#hasNext?

icy shadow
#

isEmpty would be slightly faster in that it would avoid object creation

#

But functionally they're identical

stuck rain
#

Turns out it was neither

#

Very sad

tight junco
#

what in the american

#

how does that not look like a cat

#

with headphones

dense galleon
#

🤨

#

I'll rephrase this

#

I got class EarthboundEntity, which extends PathAwareEntity.
I got another class, EarthboundAnimal. It needs to extend EarthboundEntity, but it also needs to inherit fields and methods from another class AnimalEntity. What should I do...?

stuck rain
dense galleon
#

AnimalEntity is abstract and is pre-existent. Same goes for PathAwareEntity

graceful hedge
#

You need to class to derive both AnimalEntity and PathAwareEntity?

#

that is not possible

mortal timber
#

Hello,
my problem is that ProtocolLib does not work correctly. I get the following error message:

java.lang.NullPointerException: Cannot invoke "com.comphenix.protocol.ProtocolManager.sendServerPacket(org.bukkit.entity.Player, com.comphenix.protocol.events.PacketContainer)" because the return value of "com.comphenix.protocol.ProtocolLibrary.getProtocolManager()" is null

My corresponding code for this:
https://prnt.sc/2214t67

dense drift
#

What build tool do you use, gradle or maven?@mortal timber

mortal timber
#

maven

dense drift
#

Right, make sure the scope of plib is provided

mortal timber
#

How exactly should I do this?

dense drift
#

<scope>provided</scope> unside protocollib <dependency> block

mortal timber
#

Strange, I only have this:

<dependency><groupId>com.comphenix.protocol</groupId> <artifactId>ProtocolLib</artifactId
<version>4.7.0</version>
</dependency>```
tight junco
#

great resource peepoBlushPoint use gradle

#

well then add the <scope>provided</scope>

#

ez

mortal timber
#

i'll try

#

It works, thank you very much. But why was that the error? I didn't need it with older versions.

dense galleon
#

Or an alternative

#

or is there no solution

#

I will just need to have repeating code in EarthboundEntity and EarthboundAnimal

#

Maybe I'd be better off having EarthboundEntity be an interface?

graceful hedge
#

smtng like that

#

or have a class with the common logic

#

then just use instances of that class

dense galleon
#

yeah I guess

graceful hedge
#

you can even have an interface which exposes an accessor of that common class if you need multi-inheritance or whatever you'd call it

dense galleon
#

So many dilemmas

#

I made an interface now called Earthen instead of the EarthboundEntity class

#

Thing is that all the classes implementing Earthen will have a method createAttributes()... but the method will vary slightly for each instance and NEEDS to be static

#

So I cannot have it in my Earthen interface

#

So I have to repeat creating a new createAttributes() method in each class..? Is that fine?

dense drift
#

You can have static methods in interfaces, or whats the problem?

dense galleon
#

The method differs between each instance

#

So one class implementing Earthen might need the method to change slightly

hard wigeon
#

what's a good representation of a 3D regtangular prism?

cinder forum
#

nice hat fred

hard wigeon
#
{
  "start": {
    "x": 0,
    "y": 0,
    "z": 0
  },
  "end": {
    "x": 0,
    "y": 0,
    "z": 0
  }
}

does this make sense?

hard wigeon
slow kiln
#

Anyone know a free host that lasts for like an hour and allows me to upload my own plugin for testing purposes?

broken elbow
slow kiln
hard wigeon
#

so does Minehut ^

#

and Skynode

#

everyone does basically

high edge
#

Or you know just self host

broken elbow
#

k frosty with good pc

#

I'll remember that

dense drift
hard wigeon
#

👍

dense drift
#

Well, actually I believe that's an official naming

hard wigeon
#

official in what way?

high edge
#

in the way min max makes more sense

hard wigeon
#

well yeah

#

also,
in one-dimensional space, given 2 lines that go along that one dimensional axis that currently don't overlap, what's the best way to find how far it can move before it overlaps?
I could do a bunch of if/elses but that seems over complicated

dense drift
high edge
#

there's probably an equation for that

broken elbow
#

XD

hard wigeon
#

I mean one dimensional

#
xxxxxxxxxxxx                    zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
            ^                   ^

finding the distance between those two points

icy shadow
#

oh right

hard wigeon
#

google is only giving me 2D stuff

icy shadow
#

indexOf(last) - indexOf(first)

hard wigeon
#

but the issue is I don't know which 2 points are closest

#

what if it was the other order for examle. z than x

broken elbow
hard wigeon
#

I could do a bunch of if/elses but that seems over complicated

#

so this is correct?

dusky harness
#

How do i detect if a player is looking and can see another player? so far i stole this piece of code: ```kt
private fun getLookingAt(player: Player, other: Player): Boolean {
val eye = player.eyeLocation
val toEntity = other.eyeLocation.toVector().subtract(eye.toVector())
val dot = toEntity.normalize().dot(eye.direction)
return dot > 0.99
}

#

an idea that i just thought of was to ray trace blocks and see if the closest block distance is farther than the player's distance but i feel like that might be buggy

#

and I'm also running this every tick

dense drift
#

d;spigot livingentity#haslineofsight

uneven lanternBOT
#
boolean hasLineOfSight(@NotNull Entity other)```
Description:

Checks whether the living entity has block line of sight to another.

This uses the same algorithm that hostile mobs use to find the closest player.

Parameters:

other - the entity to determine line of sight to

Returns:

true if there is a line of sight, false if not

dusky harness
#

iirc that returns true if you're not looking at the player

broken elbow
#

you can test just in casew

#

case*

dusky harness
#

i mean maybe i can combine both?

dusky harness
#

ill try combining both

#

hm

#

i mean it sort of works

#

but

lyric gyro
broken elbow
#

lol

dusky harness
#

two bugs:

  • if im too close, then only the head works
  • if im too far, then i can be looking a bit away from the player

and

  • if im looking at a block but can still see the other player, it works (since thats how hasLineOfSight works)
#

:((

#

why there no rayTraceEntities

#

in paper

#

1.18

#

wait there is??

broken elbow
#

probably

lyric gyro
#

why would there not be

dusky harness
#

theres World#rayTraceEntities

#

i was looking at Player#rayTraceEntities (which doesn't exist)

#

yet there is Player#rayTraceBlocks

lyric gyro
#

PR

dusky harness
#

👀

#

i bet they have it there for a reason tho

lyric gyro
#

because spigot

dusky harness
#

wdym?

#

also it'd make sense to have it in World (so that the params can be Location :)) and i dont think they'd want extra methods in Player

lyric gyro
#

what

dusky harness
#

i dont think they'd accept PRs that just adds a couple methods that just calls another method in another class

lyric gyro
#

why not

#

it's beneficial

broken elbow
#

dkim. look at block iterator maybe?

dusky harness
#

block iterator?

broken elbow
#

yeah. its a class. in spigot

lyric gyro
#

i mean he can get away with World::rayTraceEntities lol

broken elbow
#

tru

#

yes dkim? xD

#

how can I help

dusky harness
#

hm

#

i have to be looking exactly at the player's head

#

or else it doesn't work

#

🤔

#

or if im nearby then it doesn't work at all

lyric gyro
#

what

#

it 100% works if it hits anywhere on the hitbox

dusky harness
#

ill show video

lyric gyro
#

ok now how about you show some code

#

actually don't

#

you're using the player location as source

#

instead of the eye location

dusky harness
#

oh-

lyric gyro
#

that's why you need to look upwards a bit

broken elbow
#

Emily too smart for us

dusky harness
#

mhm

#

uhh

broken elbow
#

look boys. I made my own HexViewer

#

bcz I'm cool

#

lol

dusky harness
#

cool

broken elbow
#

yes. very

dusky harness
#

its uh

#

not working anymore

#

at all

#

🥲

#
player.world.rayTraceEntities(player.eyeLocation, player.eyeLocation.direction, 50.0) { entity ->
            entity.type == EntityType.PLAYER
        }?.hitEntity?.uniqueId == other.uniqueId
sage thorn
#

java.lang.NullPointerException: Cannot invoke "me.clip.placeholderapi.PlaceholderAPIPlugin.getLocalExpansionManager()" because the return value of "me.clip.placeholderapi.expansion.PlaceholderExpansion.getPlaceholderAPI()" is null

#

any help?

lyric gyro
#

Not with just that, no

#

Full stack trace & relevant code would be ideal

dense galleon
#

public primitive variable in interface

#

good or bad

#

(not final)

dusky harness
#

public non constant variable = bad

graceful hedge
#

interface dkim19376 {
L e = new L();
}
dkim19376.e = new Yeet();

dense galleon
#

ah

#

well

#

static and final in interfaces is useless

#

So I was doing it right without knowing

lyric gyro
#

How can I get a block

#

Location

#

Like sau I want it only when they right click a certain lever can I do that with the location

#

Seeing if the right click matches the

#

Coords I put

#

If so how do I get the block they right click location

thick kestrel
#

?paste

neat pierBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

lyric gyro
lyric gyro
#

But it wont work bc I don’t have the import

#

And it wont out one in for it

#

Put one

dusty frost
#

uh are you doing an event handler for that?

lyric gyro
#

Wdym no block import?

#

Like the class for it or whatever tf it’s called

#

Yes

#

It’s under my event handler

dusty frost
#

Is your event handler taking PlayerInteractEvent?

lyric gyro
#

Yes

#

I’d show u code but disc wont load on me c

#

Pc*

dusty frost
#

are you doing event.getClickedBlock()?

lyric gyro
#

Yes

#

Block raidtwleporter =

#

Then that yes

#

That doesn’t seem to be the issue

#

The Block raid teleported is

dusty frost
#

What version are you using?

lyric gyro
#

Teleprinter is

#

Teleported

#

1.8.9

dusty frost
#

Oh well that might be why lmao

lyric gyro
#

So how do I do it on 1.8.9

#

I just wanna get the block they click

#

See if it matches with coords of a diff block

#

Bc I want it so when they flip a lever at certai bc coords

#

It does something

#

I have it all down besides the certain coords

sharp cove
#

Just use interact event or smth else

prisma briar
#

Does someone know how to reobfuscate remapped-mojang version 1.18 on Gradle?

dense drift
#

Any idea how to use regex with nginx redirects? rewrite ^/vote/1-(\w{3,16})$ https://minecraft-mp.com/server/271241/vote/?username=$1 permanent; This doesn't work 😦

torn burrow
#

yo soo i was working on "mc but tnt spawns on u when u touch grass"
i did the following code : https://pastebin.com/R7uJpsA5
it seems the task scheduler dosent wanna slow down the tnt spawning but instead speed it up ;-;

#

any suggestions on how can i fix this ?

torn burrow
neat pierBOT
#
📋 Paste Converted!
https://paste.helpch.at/vumabofiha

A member of staff has requested I move your pastebin.com paste to our paste.helpch.at!

broken elbow
#

why? xD

#

||yes I know not helpful at all|||

torn burrow
#

uhm yea im just one messy coder ;-;

#

thought i'll clean things up after making things work yk

broken elbow
#

wait. you know that your code listens to whenever a player moves and starts spawning a tnt every 10 seconds?

torn burrow
#

yes thats what im going for

broken elbow
#

I'm confused. why are you making a new task every time a player moves tho?

#

you understand that if a player moves 5 times it will start 5 tasks right? which will all run at the same time

torn burrow
#

ooooohhhhhh

#

thats why spawning rate is soo much ;-;

broken elbow
#

you should instead maybe have just one task running and not even use player move event

torn burrow
#

but i dont want the tnt to spawn when the player is for example on stone or somethin

broken elbow
#

well in your task you can check if the player is on grass or not

#

which you already do

#

like that player move event is really not necessary

torn burrow
#

ooh

#

i'll try that thanks 👍

#

btw how do i refer to all online players without using a event listener ?

broken elbow
#

Bukkit#getOnlinePlayers

#

d;spigot Bukkit#getOnlinePlayers

uneven lanternBOT
#
@NotNull
public static Collection<? extends Player> getOnlinePlayers()```
Description:

Gets a view of all currently logged in players. This view is a reused object, making some operations like Collection.size() zero-allocation.

The collection is a view backed by the internal representation, such that, changes to the internal state of the server will be reflected immediately. However, the reuse of the returned collection (identity) is not strictly guaranteed for future or all implementations. Casting the collection, or relying on interface implementations (like Serializable or [List](https://docs.oracle.com/javase/8/docs/api/java/util/List.html "class or...

This description has been shortened as it was too long.

Returns:

a view of currently online players.

torn burrow
#

thx

wooden loom
#

what is the difference between the paper api and the spigot api?

lyric gyro
#

Paper is built on top of Spigot and adds new things to it, it's just non-stagnant and simply better, it adds APIs for things like tags and full json component support and it adds many, many events and methods all over the place

broken elbow
#

but you should note that if you use stuff that paper added, your plugin will probably break on spigot servers. tho that's way less than the paper servers nowadays

pulsar ferry
#

papi added
Go home Blitz, you're drunk again smh

broken elbow
#

yes

#

I am

#

it happens when I multitask lol

#

and when I Don't

lyric gyro
#

Wow Spigot @ 35% v Paper @ 51%

#

Look at them numbers

broken elbow
#

yes. I know.

#

that's what I said

lyric gyro
#

Last time I checked they were closer together

pulsar ferry
#

Yeah they were like almost 50/50 for a while

broken elbow
#

anyone can recommend a UI library for C# that works on linux and windows? Cant seem to find one.

#

all I need to do with this is: let the user select a file, ask for a number from the user then display them a lot of text lol

#

ah found one called Eto. will look into that

dense drift
#

Do you shade papi by any chance?

sage thorn
#

no 😄

#

should i? 😄

dense drift
#

No

sage thorn
#

maaaybe i got it 😄

#

but i am saying maybe 😄

#

no 😦

slow kiln
#

I'm getting beginning to learn about asynchronous methods in java now, would this be a good example of how you would do one?


 public static CompletableFuture<Optional<Gang>> getGang(String string, List<Gang> gangList){
        return CompletableFuture.supplyAsync(() -> {
            try {
                TimeUnit.SECONDS.sleep(1);
            } catch (InterruptedException e) {
                throw new IllegalStateException(e);
            }
            return getGang(UUID.fromString(string), gangList);
        });
    }

dense drift
#

Thread sleep 🙅‍♂️

slow kiln
warm steppe
#

What could cause custom event not work on one plugin, but work on other one?

warm steppe
#

Plugin 1:
Main:
getProxy().getPluginManager().registerListener(this, new PrePlayerLogin(this));
Listener:

    @EventHandler
    public void onNotRegisteredEvent(NotRegisteredEvent event) {
        event.setCancelled(true);

        System.out.println("1");
    }
#

this event listener is just not working

#

if i replace NotRegisteredEvent with any other event it works

#

BUT...

#

Plugin 2:
Main:
getProxy().getPluginManager().registerListener(this, new Listener(this));
Listener:

    @EventHandler
    public void onNotRegistered(final NotRegisteredEvent event) {
        this.plugin.getLogger().info("ran notregisteredEvent");
    }
#

this works

#

plugins were made by different people btw

fiery pollen
#

Oh you have to add something after @EventHandler

#

but i don't remember what

warm steppe
#

??

slow kiln
fiery pollen
#

or i am completely wrong

warm steppe
#

but both plugins are 1:1 but one works, other doesn't

#

that NotRegisteredEvent is from FastLogin, a custom event was made in it

fiery pollen
#

@EventHandler (ignoreCancelled = true)

#

That

warm steppe
fiery pollen
#

hmm

warm steppe
#

also, if it helps, i'm on Java 17, Bungee 1.18

fiery pollen
#

Oh i've not worked with bungee before

warm steppe
fiery pollen
#

👀

lyric gyro
#

Block raidteleporter = event.getClickedBlock();

#

How would I resolve this

#

Incompatible types. Found: 'org.bukkit.block.Block', required: 'net.minecraft.server.v1_8_R3.Block'

rugged bane
#

You’ve imported the NMS version

slow kiln
#

will this work for checking if a block is a crop (i.e, sugar cane, wheat etc etc)

if(e.getBlock() instanceof Crops){

    }
sleek wedge
#

the best ID-

#

uhm better no

thick kestrel
#

I have a much needed help request

#

how do I build sf-cfg....

broken elbow
#

why would you do that?

thick kestrel
#

because it needs to be built

#

I tried everything manually but doesnt work

broken elbow
#

use jitpack with maven/gradle

pulsar ferry
#

Probably better to ping SecretX for help with it since it's new ;p

thick kestrel
#

@robust flower how do I build your framework because it will not work for me...

shell moon
#

How to include a date in discord.js (embed) so it looks correctly for each user reading it, simply the object toString() or how?

thick kestrel
#

can you run maven in Intellij?

mental cypress
#

Yes

thick kestrel
#

@broken elbow Jitpack is for publishing

lyric gyro
#

jitpack 🚮

broken elbow
thick kestrel
#

I want to build

broken elbow
#

then clone it and run gradle build

river solstice
#

dead chat

broken elbow
#

?

thick kestrel
#

intellij has gradle built in

#

but when I run the gradle file it crashes

river solstice
robust flower
thick kestrel
#

nvm I built it but Im making it into a library jar file and seeing if I can make it work

#

last time it said no class found

#

@robust flower so you see i have been getting this error everytime with a clean good build
java.lang.NoClassDefFoundError: com/github/secretx33/sccfg/Config

robust flower
#

I didn't try to build the library and use its jar, especially since it uses various transitive dependencies, this class specifically is located on bukkit module

thick kestrel
#

so how do I make it into my project then?

#

without the jar

robust flower
#

well, using jitpack, at least for now, it's on my plans to migrate to a server (either Maven Central or another Cloud Hosting) for the artifacts, but until I configure everything jitpack is the only easy way of using it

hushed badge
#

jitpack 🚮

broken elbow
#

please stop

#

jitpack is nice

hushed badge
#

lol

broken elbow
robust flower
#

(or export to mavenLocal)

hushed badge
#

im just copying what emily said cus its a funny emoji

thick kestrel
#

Im not sure how to build with jitpack and I dont think I can get it on windows

robust flower
#

but why?

thick kestrel
#

its not really clear when you say copy and paste

#

Im to new to just know how to do this

#

add the library modules as dependancy

#

relocate the library

robust flower
#

are you using gradle, right?

thick kestrel
#

ya

robust flower
#

try this, with only this much your plugin should already compile

thick kestrel
#

where do I put this code because I made a build.gradle file and it didnt work with this

robust flower
#

wait, what do you mean with made a build.gradle?

thick kestrel
#

I made a gradle file

#

in intellij

robust flower
#

is your project already using gradle?

thick kestrel
#

intellij has gradle

robust flower
#

yes, but does your project already got gradle set up?

thick kestrel
#

no

robust flower
#

then you need to first convert your project to either gradle or maven before adding my library

#

hmm, there's a million guides on how to convert a project, but the easiest way is to (download the minecraft plugin for intellij if you don't have it already), create a new project using gradle/maven, then move the classes from your old project folder to the new project folder

thick kestrel
#

its done I have a gradle project now

#

ok this makes more sense

#

I can do it from here I think

robust flower
#

ok, great 🙂

thick kestrel
#

google seach for "nodejs include user time"

#

you should find something that you can use in your embed from javascript utils or something

#

@robust flower this 'com.github.secretx33.sc-cfg:bukkit:master-SNAPSHOT' does not exist

#

Could not find com.github.secretx33.sc-cfg:bukkit:master-SNAPSHOT

#

I can get it working but just thought Id let you know

#

nvm it still doesnt exist

chilly saddle
#

I have this code that randomly generates blobs of blocks around the world on the top layer in a specific pattern: (JsonResourceNode class) https://www.toptal.com/developers/hastebin/cicowukumi.kotlin

I then have this method to trigger those ones: https://www.toptal.com/developers/hastebin/gexuxecohi.kotlin

And then this code to randomly generate the Location: https://www.toptal.com/developers/hastebin/vehixadeta.java

Here is my issue: When all the blocks are being placed they are offset by +1 on the Y axis and they appear "floating" https://imgur.com/a/99ZEL9U

Now, there is one block im placing/checking at the end of the createNode which is the block that is on top in the image above, when i remove that block on top, they work perfectly and generate like this: https://imgur.com/a/Y3evAre

How come when i add the last block on top, all the blocks get shifted up one block on the Y axis?

chilly saddle
#

Fixed it, i needed to call clone on my Location instance from RustLocation

robust flower
lyric gyro
#
    public void onPlayerInteract(PlayerInteractEvent event) {
        Player player = event.getPlayer();
        Block raidteleporter  = event.getClickedBlock();


        final org.bukkit.Location raidteleporter1 = new Location(Bukkit.getWorld("world"), 22, 78, -178);


            if (event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
                player.sendMessage("HI1");
                if(raidteleporter.equals(raidteleporter1))
                    player.sendMessage("HI2");
                    if (player.getItemInHand().getType() == Material.IRON_INGOT) {
                        if(event.getClickedBlock().getType() == Material.PRISMARINE) {

                        player.sendMessage(ChatColor.BLUE + "Guardian Of The Sea Messenger> " + ChatColor.YELLOW + "You have summoned the Guardian Of The Sea \n" + ChatColor.GRAY + "Be wise on the decisions you make further on.");
                        final org.bukkit.Location location = new Location(Bukkit.getWorld("world"), 10, 10, 10);
                        player.teleport(location);
                    }
            }

                    if (!raidteleporter.equals(raidteleporter1));
                {
                    player.sendMessage("f");
                }
                 if (event.getClickedBlock().getType() != Material.PRISMARINE) {
                    return;
                }

            else if (player.getItemInHand().getType() != Material.IRON_INGOT) {
                player.sendMessage(ChatColor.BLUE + "Guardian Of The Sea Messenger> " + ChatColor.YELLOW + "You don't have the right materials to summon the Guardian of The Sea");
            }
        }
    }
}```
Even at the right coords of raidteleporter1 it doesnt do it it always sends "f" bc its not the right or atleast it says its not
thick kestrel
warm steppe
thick kestrel
#

check your raid teleporter you set one to block xyz and other to get block click

#

and said if they are equals

#

@warm steppe

warm steppe
#

uhmm

#

I think you replied to the wrong person

thick kestrel
#

I know nothing about bungee nvm

warm steppe
#

also if someone is thinking about that setCancelled method usage, it does not work without it.

warm steppe
#

if i remove that method it also does not work

plucky helm
#

Heya guys. So I have this one function called "get_near_and_apply", which take as parameters integers x, y, z, a potion name (in string), and an int level parameter. The function uses x, y, z as maximum distance in each axis for finding nearby entities. Then, the nearby entities get the Potion passed as a parameters, with a level associated to it.

The problem is: I want to take the input of the potion as a String, and then use It to get a PotionEffect object

how can I do that without a lot of ifs
or a hashmap that takes each possible string and converts it to a PottionEffect object?

thick kestrel
#

why do you want to covert PotionEffect to string

plucky helm
#

I want to make It easy for later use. Like, instead of always using "new PottionEffect(PottionEffectType..."

#

I can just say

#

take "regeneration" with level 2

thick kestrel
#

ok

#

well this is an example of converting java object to string

plucky helm
#

not that important, but I like to make things to make my life easier on the future

thick kestrel
plucky helm
#

I see

#

oh

#

isn't the other way around, though?

#

I will be passing a string and converting It to a java object

#

Or am I misunderstanding something?

thick kestrel
#

Im trying to understand what you doing

plucky helm
#

Ok, I guess a example will make things more clear

thick kestrel
#

ya

#

which you would get the player and apply potion effect

plucky helm
#

sorry, bad example. I meant nearby entities

#

suppose you want to give nearby entities regen II

#

I want to do

thick kestrel
#

ok

plucky helm
#
get_near_and_apply(10, 5, 10, "regeneration", 2)
thick kestrel
#

you would make a forloop getting all the entities

plucky helm
#

yeah, this part I can do

#

the problem is getting the potion effect "regeneration", using the string "regeneration"

thick kestrel
#

then you want to take that string and add it to the potion effect object?

plucky helm
#

yeah, I want to apply the effect to the nearby entities

#

not really add it. Just apply

#

of course I can just do "New PottionEffect..."

thick kestrel
#

ok one min I will make a piece of code as example since its not easy to explain

plucky helm
#

but I want to make it in a more legible way

#

Oh, of course! I really appreciate your help, by the way

thick kestrel
#

np hope I can make it properly x3

tight junco
#

please stop with the underscores in function names

#

idk why i said brackets, brain no work

thick kestrel
#

@plucky helm do you want a list or a forloop

plucky helm
thick kestrel
#

List is the best way to use

plucky helm
thick kestrel
#

because you can index all

tight junco
#

no stick to java conventions

#

there's a reason intellij bugs the fuck out if you try and do an underscore when getting a function, cause its an ungodly thing to do

plucky helm
#

If It is a convention than maybe I should change it.

#

but I do find It better

tight junco
#

java conventinos is lowerCamelCase variables, lowercase packages, UpperCamelCase classes and underscores are always avoided

plucky helm
#

ah, I see

tight junco
#

they're tolerable on variable names but even then its iffy

plucky helm
#

Thanks

broken elbow
#

constants are named like this: UPPER_CASE

#

but in rest what ori said applies

tight junco
#

yeah i said that and i was like

#

well yeah they're used sometimes

#

but i still find them weird

thick kestrel
#

@plucky helm I cant seem to find the giving potionb effects to mobs

#

but I can give you the code and you can figure it out

plucky helm
#

Don't worry about It. I think in the end I'll have to use a hashmap, regardless

#

to take the string as input and return a PotionEffectType object

thick kestrel
#

?paste

neat pierBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

thick kestrel
plucky helm
#

oh, that is clever, I like It

thick kestrel
#

thanks

plucky helm
#

:)

thick kestrel
#

I tried to keep it simple

#

not to boast but I like readable code in my code

#

you dont need Player though I forgot to take that out

#

@plucky helm

plucky helm
#

I don't see how you can do that without "player"

#

since you have to use the distance from the entity to the player

dense drift
#

d;spigot world#getnearbyentities

plucky helm
#

Maybe I'm misunderstanding something

uneven lanternBOT
#
@NotNull
Collection<Entity> getNearbyEntities(@NotNull Location location, double x, double y, double z, @Nullable Predicate filter)```
Description:

Returns a list of entities within a bounding box centered around a Location.

This may not consider entities in currently unloaded chunks. Some implementations may impose artificial restrictions on the size of the search bounding box.

Parameters:

location - The center of the bounding box
x - 1/2 the size of the box along x axis
y - 1/2 the size of the box along y axis
z - 1/2 the size of the box along z axis
filter - only entities that fulfill this predicate are considered, or null to consider all entities

Returns:

the collection of entities near location. This will always be a non-null collection.

thick kestrel
#

oh

#

in the if statment make it from distance to player < distance

#

@plucky helm

plucky helm
#

sorry, I didn't turn my notifications on

plucky helm
thick kestrel
#

@plucky helm I think this will work

                entityList.add(e);
            }
        }```
prisma briar
#

why not just get the entity within the distance you want?

#

so you don't need to compare the distance

thick kestrel
#

I guess we could do that to optimize it more

plucky helm
#

Thanks, I'll try It

thick kestrel
#

but I think you should still compare because if you set it to a static disctance it will only give the effect at that distance

#

and when its close the potion effect will ware off

#

depending on how far they want the effect to be applied

#

its its something like 7 blocks then the entity will be way within range and the effect will not stay on

dense drift
thick kestrel
#

@plucky helm

plucky helm
#

I'm not sure if I got it, but I'll try to understand now

thick kestrel
#

and I think gabys will work better

plucky helm
#

ah, I see

#

using the method

dense drift
#

loc.getWorld().getNearbyEntities(loc, 3.5, 3.5, 3.5) to create a 7x7x7 cube then just iterate though the collection

thick kestrel
#

yes much better

plucky helm
#

now I'm in the part of adding the given potion effect to the entity

#

I found that "LivingEntity" has this method

#
for (Entity entity : nearby_entities) {
            LivingEntity living_entity = (LivingEntity) entity;
            living_entity.addPotionEffect(potion);
            player.sendMessage(living_entity.getName());
        }
#

I tried iterating in the list

torn burrow
#

yo

#

soo

plucky helm
#

I think It's doing all right

#

however, It's not actually doing anything to the entity

#

It's getting It's name, though

torn burrow
#

my command (it starts a bukkit task from another class)
https://pastebin.com/r2iXyCbK (the class code)
the problem i am facing is the second time i run the command in game it creates a second task... i want it to replace the original task with the new one when i run the command

#

any suggestions ?

robust flower
#

@thick kestrel could you paste your entire build.gradle?

thick kestrel
#

?paste

neat pierBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

thick kestrel
plucky helm
#

So, I'm trying to iterate through the entities of a list and adding potionEffects to these entities

#
for (Entity entity : nearby_entities) {
            LivingEntity living_entity = (LivingEntity) entity;
            living_entity.addPotionEffect(potion);
            player.sendMessage(living_entity.getName());
      }
#

I can see the entity is being reached, because It's sending me the message, in "player.sendMessage(living_entity.getName())"

#

but the entity doesn't receive the effects

#

maybe mobs can't have potion Effects directly given to them?

#

I'm not sure

thick kestrel
#

ya I couldnt find addpotioneffect on a list either

plucky helm
#

I tried to make It work by casting It to livingEntity

#

since livingEntity has this method

thick kestrel
#

@plucky helm just try this

#

LivingEntity livingEntity;

#

oh your getting the entity

#

nvm

plucky helm
thick kestrel
#

ya nvm

#

airhead moment

plucky helm
#

thats ok

pulsar ferry
#

@robust flower are you sure what you put on the readme is right? Jitpack is a bitch and doesn't really care about your build.gradle, the dependency it gives is com.github.SecretX33:sc-cfg:Tag where Tag is the version, being a commit, branch, or release

thick kestrel
#

@plucky helm the only thing I can think of why this is not working is the potion effect is not valid

plucky helm
#

weird

#

PotionEffectType is "PotionEffectType.SPEED"

#

Which I am pretty sure Its valid

thick kestrel
#

weird

plucky helm
#

I searched for it and apparently I'm not the only one confused by this

#

maybe It's a bug?

thick kestrel
#

hmm

#

try new

#

@plucky helm

#

no that doesnt work either

plucky helm
#

D:

#

very weird

pulsar ferry
#

Don't you need to add a strength and duration to the potion?

plucky helm
#

yeah

thick kestrel
#

try this

#

PotionEffectType potionEffect = PotionEffectType.SPEED;

plucky helm
#

I'm already doing It

thick kestrel
#

oh

plucky helm
#

I'm using this hashmap to make the convertion from potion name to potion type:

#
Map<String, PotionEffectType> spellName_to_spellObject = new HashMap<String, PotionEffectType>() {{
       put("regeneration", PotionEffectType.REGENERATION);
       put("absorption", PotionEffectType.ABSORPTION);
       put("speed", PotionEffectType.SPEED);
    }};
pulsar ferry
#

d;spigot LivingEntity#addPotionEffect

uneven lanternBOT
#
@Deprecated
boolean addPotionEffect(@NotNull PotionEffect effect, boolean force)```
Description:

Adds the given PotionEffect to the living entity.

Only one potion effect can be present for a given PotionEffectType.

Deprecation Message:

no need to force since multiple effects of the same type are now supported.

Parameters:

effect - PotionEffect to be added
force - whether conflicting effects should be removed

Returns:

whether the effect could be added

plucky helm
#

so It should already give me the speed effect

#

Yeah, thats what I'm using

pulsar ferry
#

Try setting the force, on the example you sent there isn't
Idk if that'd be it though, just for testing

thick kestrel
#

are you grabbing the Map properly?

plucky helm
#

yeah. I think I'll just send the function

#
public void get_nearby_and_apply(Player player, int x, int y, int z, String spell, int duration, int level) {
        List<Entity> nearby_entities = player.getNearbyEntities(x, y, z);

        PotionEffectType spell_object = spellName_to_spellObject.get(spell);
        level = Math.max(1, level);
        PotionEffect potion = new PotionEffect(spell_object, duration, level-1);
        for (Entity entity : nearby_entities) {
            LivingEntity living_entity = (LivingEntity) entity;
            living_entity.addPotionEffect(potion);
            player.sendMessage(living_entity.getName());
        }
    }
robust flower
#

@thick kestrel I'm stupid, I'm so sorry lol, you just have to replace "master" by "main"

thick kestrel
#

ok thanks Secret

#

and no worries

robust flower
thick kestrel
#

thanks a bunch it built

robust flower
#

what a stupid typo :/

plucky helm
#

I'll leave now. If I find out what is wrong I'll come back to say It

#

thanks guys

#

:))

thick kestrel
#

and the server started!

#

UwU time

#

now I can get back to development x3

wheat carbon
#

why do you not have a role yet sophia

#

what is this magic

thick kestrel
#

?

neat pierBOT
#
Generating Profile!

We're generating a profile for this user, try again in a minute.

wheat carbon
#

you've sent over 200 messages in here and barry hasn't given you a role yet, it's weird

thick kestrel
#

thx x3

robust flower
thick kestrel
#

did I get a role yet?

wheat carbon
#

no

#

think you might've broke barry

#

guessing he didn't like your original name

thick kestrel
#

Im good at breaking code x3

#

he doesnt like my username how dare

wheat carbon
#

nice account btw

#

discord og

thick kestrel
#

x3 thx

torn burrow
#

yo soo i have a command that starts a bukkit task
public class tnttoggler implements CommandExecutor { @Override public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) { BukkitTask cooltasks = new tntspawntask(main.getPlugin()).runTaskTimer(main.getPlugin(), configfile.getCheckTime(), configfile.getSpawnTime()); return true; } }
i want to pass the name of the commandSender() to the bukkit task... how should i do that ?

thick kestrel
#

2015

wheat carbon
#

indeed

#

rare

thick kestrel
#

never been hacked

pulsar ferry
wheat carbon
#

@torn burrow you can access the name via CommandSender#getName

torn burrow
#

how do i pass that to the bukkit task ? (its in a differrent class)

wheat carbon
#

add an additional parameter to the constructor for "tntspawntask" that accepts a string (the username)

#

then you can simply pass in the username with the rest of the arguments

torn burrow
#

oop

#

ok thanks

robust flower
#

That is me poking my own repository after I configure it

robust flower
wheat carbon
#

generally a better idea to publish to central to ensure code doesn't break in the future

robust flower
#

the issue with central for me is their policy of wanting only code that depends entirely on libraries that are already there, and even if that is not enforced now, it might be in the future (plus my lib uses jitpack for one specific dependency and I'm sure maven central does not like jitpack kek)

wheat carbon
#

I'm sure maven central does not like jitpack kek
no one likes jitpack

thick kestrel
#

question will my plugin not run with java source folder

robust flower
wheat carbon
#

sophia you need java classes for your plugin to run

#

the plugin.yml points to a class, so if there's no classes to point to, it cannot run

robust flower
thick kestrel
#

ok

#

I have a plugin.yml in the java source folder

#

but it is not working

wheat carbon
#

the plugin.yml should go in the resources folder

#

src/main/resources

thick kestrel
#

thanks

#

still didnt load plugin

wheat carbon
#

show me the directory structure of your plugin

thick kestrel
wheat carbon
#

how are you building the plugin?

thick kestrel
#

artifact

wheat carbon
#

also that main.iml file can be deleted

#

you need to build your plugin via gradle

#

that's what it's there for

thick kestrel
#

oh ok

wheat carbon
#

click the gradle button on the right side of intellij

thick kestrel
#

gradle assemble?

wheat carbon
#

no

#

jar

#

or build

thick kestrel
#

does it go to where the output folder of the artifact is?

pulsar ferry
#

shadowJar is the one you're looking for since you have libs

wheat carbon
#

the jar will be in build/libs once you run shadowJar

thick kestrel
#

thanks

#

ah this error again @robust flower

#

java.lang.NoClassDefFoundError: com/github/secretx33/sccfg/Config

wheat carbon
#

what jar are you using from build/libs?

thick kestrel
#

snapshot is the only one there

torn burrow
wheat carbon
thick kestrel
#

ok

robust flower
wheat carbon
#

also paste your build.gradle

#

=paste

#

idek how to get the link anymore

#

slash commands suck

robust flower
#

Use ?paste, it still works

wheat carbon
#

aight

thick kestrel
#

so do I use shadowjar to build from now on?

wheat carbon
#

yes

thick kestrel
#

ok thanks

thick kestrel
#

@robust flower can you store a hashmap?

#

it didnt seem like it when I ran it

robust flower
thick kestrel
#

@robust flower [09:28:10] [Server thread/WARN]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

#

but then

#

config exception

#

?paste

neat pierBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

thick kestrel
robust flower
#

what java version are you using?

wooden loom
#

why should I use an interface for a class?

dusty frost
#

java 69 of course

broken elbow
#

nice

dusty frost
#

That way you can do some nice polymorphism stuff

icy shadow
#

@guys

wheat carbon
#

i need developer

#

i pay nitro

icy shadow
#

same

tropic granite
#

I need developer

icy shadow
#

nitro classic

tropic granite
#

For My Server

wheat carbon
#

for your server?

icy shadow
#

no, for my server

wheat carbon
#

oh for your server

tropic granite
#

For Mine

wheat carbon
#

for yours?

tropic granite
#

Lmao

icy shadow
#

No

#

Not yours

wheat carbon
#

ah so it must be yours

icy shadow
#

what? No

wheat carbon
#

then whos?

icy shadow
#

I just said it's not yours

wheat carbon
#

sir

tropic granite
#

I Will

#

Give .....,

wheat carbon
#

5 nitros?

#

over what period

icy shadow
#

10 nitros

#

per hour

wheat carbon
#

tell you what

#

give me all the nitros you have

#

and I will not do anything in return

dusty frost
#

Hey guys! If we could move this discussion to #off-topic, that would be great!

scenic knoll
#

Hello dear helpers ^^
I'm currently making a permissions plugin (like groupmanager, pex, luckperms,etc...) and I also don't know how to do something...
I did well for setting player's rank + player's name in chat and in tablist
But I don't know how to change the player's nametag... (without an API)
I know there is something like packets but idk xD
I'm using spigot 1.8
This is my code right now:

neat pierBOT
#
Uploading Images

You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.

scenic knoll
#

thanks in advance for your help ^^

mortal timber
#

Suppose I had a list of many items in Minecraft. For each item there is a probability in percent to get this item in the distribution. How do I use this probability? There is, of course, the method of throwing the same item into the list several times in order to increase the chance. But is there a way to determine the chances by percentage?

scenic knoll
#

for instance: getChance(50); will have 50% of chance to return true

tame crystal
#

If I have an ItemStack that is a player head, how would I go about placing a block from that ItemStack ??

scenic knoll
#

I think (didn't try so xD) you should not use itemstack but Block

#

Blocks.HEAD

#

or something like that

tame crystal
#

No I know, but I'm using HeadDatabase's API to retrieve the custom head, which gives me an ItemStack

dense drift
#

hdb api has a method to set the texture to a block

tame crystal
#

It does??

tame crystal
#

Oh shoot you're right, I just found it

#

but thanks for finding it for me as well

#

I was not aware of this, thnx!!

dense drift
#

np

tame crystal
#

It gives me this error though

        at me.arcaniax.hdb.util.HeadUtil.setBlockProfile(HeadUtil.java:210) ~[HeadDatabase.jar:?]
        at me.arcaniax.hdb.api.HeadDatabaseAPI.setBlockSkin(HeadDatabaseAPI.java:309) ~[HeadDatabase.jar:?]```
#

Know what that could be?

#

Using this code:

currentBlock.setType(Material.PLAYER_HEAD);
hdbAPI.setBlockSkin(currentBlock, "702");```
thick kestrel
#

@robust flower 16

#

sorry for late reply at work

#

please ping me when you get back to me

dusty frost
#

or something like that

tame crystal
dusty frost
#

that does not look like something returning false lmao

#

that's a null pointer exception

tame crystal
#

So must be the function that it's wrong with

robust flower
#

@thick kestrel what mc version are you using?

thick kestrel
#

@robust flower 1.17.1

#

Compiled with Java 16, Server runs Java 16, Server Runs 1.17.1

robust flower
#

I'll test the library using those specifications later on, I'm busy rn, but it should work just fine

thick kestrel
#

@plucky helm did you get your potion effects working?

plucky helm
#

No. Im doing another thing, now

#

But yh, the potion did not work

thick kestrel
#

ok was just wondering

plucky helm
#

Oh, I see

#

I will tell you if I managed to find a workaround

#

:))