#help-archived

1 messages · Page 107 of 1

frigid ember
#

doesn't look like bc problem

still pulsar
#

Not a single error and crash. Anyway, thank you very much @pastel condor .

pastel condor
#

Also I use 1.11 because bedwars rel supports that

#

Oh yeah no problem

#

I can’t seem to update from 1.11 to 1.15, it just hangs when going from 1.13 to 1.14

frigid ember
#

anyone help me

#

i want to get inventory items from config any method?

tiny dagger
#

did you looked for alternatives to bedwars fierceeo?

pastel condor
#

Yes, I’m using screaming bedwars now

#

That’s why I’m trying to go to 1.15

tiny dagger
#

slowly but steady we seem to finally move to stable versions :d

fossil shoal
#

i want to get inventory items from config any method?
@frigid ember create your own (de)serializer or use an existing one

vernal spruce
#

Doesnt config api have getItemstack now? Why not use that

frigid ember
#

i mean i want it like

#
   item: item
   lore:
   - "" 
torn robin
#

@frigid ember what have you tried?

median swift
#

So you guys have an api down

#

am i right?

sturdy oar
#

?

frigid ember
#

i tried to loop

sturdy oar
#

abhiram

#

the '-' is not indented properly

#

I think

zinc ingot
#

its fine

frigid ember
#

but it works 1 problem is it getting the key value

sturdy oar
#

why are you not doing new ItemStack(Material.valueOf(this.plugin.getConfig().getString("GUI.item"))) ?

frigid ember
#

i need to allow users to make more item stack

sturdy oar
#

then you need object serialization

frigid ember
#

can you explain me please

sturdy oar
#

something like

GUI:
  - item: STONE
    lore:
      - 'Message'
      - 'Other Message'
    amount: 6
    enchanted: false
  - item: RED_STAINED_GLASS
    lore: []
    amount: 6
    enchanted: true

something like this

#

will require YAML Deserialization\Serialization

frigid ember
#

yea this is what i am looking for

#

how can i make it

sturdy oar
#

look at ConfigurationSerializable

frigid ember
#

Okey

#

like this

#

i dont know about yamls

#

if you help me it will be good

sturdy oar
#

then learn YAML I guess

#

I can give you an example from my code but it's probably not the best to follow

frigid ember
#

Okey

#

can you give example so i can refrence it

sturdy oar
frigid ember
#

so i think it will register flags i guss

hot girder
#

final everywhere

sturdy oar
#

that's my coding style

#

I use final everywhere unless it's required not to be final

frigid ember
#

hmm

hot girder
#

I use final only when is required

frigid ember
#

    private final List<ItemStack> items = new ArrayList<>();
    private ItemStack head;
    private ItemStack chest;
    private ItemStack legs;
    private ItemStack boots;

   

    public SInventory(Map<String, Object> config) {
        List<ItemStack> items = (List<ItemStack>) config.get("inventory");
        for (ItemStack item : items) {
            if (item != null) {
                this.items.add(item);
            }
        }
        this.head = (ItemStack) config.get("head");
        this.chest = (ItemStack) config.get("chest");
        this.legs = (ItemStack) config.get("legs");
        this.boots = (ItemStack) config.get("boots");
    }

    public static SInventory valueOf(Map<String, Object> config) {
        return new SInventory(config);
    }

    public static SInventory deserialize(Map<String, Object> config) {
        return new SInventory(config);
    }

    @Override
    public Map<String, Object> serialize() {
        Map<String, Object> back = new HashMap<>();
        back.put("inventory", this.items);
        back.put("head", this.head);
        back.put("chest", this.chest);
        back.put("legs", this.legs);
        back.put("boots", this.boots);
        return back;
    }```
#

whill this work?

naive goblet
#

why are you not doing new ItemStack(Material.valueOf(this.plugin.getConfig().getString("GUI.item"))) ?
Material#matchMaterial() over valueOf?

sturdy oar
#

just try abhiram

#

we've given you enough info

hot girder
#

deserialize items using ItemStack.deserialize

#

and serialize using ItemStack#serialize

sturdy oar
#

yeah

#

ItemStack are ConfigurationSerializable

hot girder
#

Idk what is the difference between Material.matchMaterial and Material.valueOf

#

valueOf is the Enum default method

sturdy oar
#

valueOF needs exactly to be the name

#

matchMaterial tries to match without being equals

hot girder
#

Oh

#

Like Bukkit.getPlayer and Bukkit.getExactPlayer?

sturdy oar
#

this is spigot's code for matchMaterial

frigid ember
#

thanks for your help it worked

sturdy oar
#

no way

frigid ember
#

??

#

oof dosnt works it opened plane inventory no items LOL

#

no errors tho

#

@sturdy oar i understand now you mean `

sturdy oar
#

don't ping plz

frigid ember
#
- ==: org.bukkit.inventory.ItemStack
  type: STONE
- ==: org.bukkit.inventory.ItemStack
  type: BLAZE_POWDER``` if a config looks like this and we need to deserialize it right?
hot girder
#

You can remove "==: org.bukkit.inventory.ItemStack"

frigid ember
#

no no

#

thats not what i want

hot girder
#

what do u want

#

deserialize List<ItemStack>?

frigid ember
#
  - item: STONE
    lore:
      - 'Message'
      - 'Other Message'
    amount: 6
    enchanted: false
  - item: RED_STAINED_GLASS
    lore: []
    amount: 6
    enchanted: true``` i need to covert this to java code
#

it says null

hot girder
#

You can get List<Map<String, Object>>

#

and convert it

hoary parcel
#

You need the == so that bukkit knows which class to deserislize

frigid ember
#

hmm i will try

sturdy oar
#

is there any non-official way to bypass Minecraft's max book length?

hot girder
#

You need the == so that bukkit knows which class to deserislize
@hoary parcel yea, but is possible use ItemStack.deserislize

#

so, == is not necessary

hoary parcel
#

More effort

frigid ember
#
        for (Map<String,Object> itemlist : data.getMapList("itemlist")) { 
            myList.add(ItemStack.deserialize((Map<String, Object>) itemlist)); 
        }
        for (ItemStack stack : myList) {
           
        }``` is this what you mean
#

??

boreal tiger
#

That looks a bit disgusting ngl

chrome edge
#

In my localhost it has delay between 40-55 which is server tick rate but it's not the same result for my dedicated.

#

Is the velocity packet communicate server which cause delay?

thorny isle
#

Hi! Help me! Minecraft error: "an internal error occurred while attempting to perform this command"
This is console log! (hastebin)

https://paste.bombsite.be/unoyowuyuw
timid valley
#

packets will be delayed from chunk sending hogging up the queues.

chrome edge
#

Is it same for all of the packets?

timid valley
#

yes

#

we spoke to mojang a few days ago about that to help improve the issue

#

its on their list now

chrome edge
#

I'm happy to hear that. Minecraft code will be better soon thanks god

timid valley
#

and mojang has hired someone to specifically look at reworking the network

chrome edge
#

So mojang has started to listen minecraft server community. It's great

timid valley
#

yes, Helen, the community manager, has been doing great things 🙂

#

Paper teams been working with Mojang to identify a lot of issues we've fixed to get fixed in Vanilla

#

todays snapshot is another result of those discussions

chrome edge
#

Thanks for that and good luck! I'll try to support paper and spigot for that. You guys have done a lot of things for the community. I'm really happy for that.

sturdy oar
#

is Spigot working with Mojang as well

timid valley
#

in the talks we have, no. but md5 does have other connections to them, but i dont know how much discussion they have.

chrome edge
#

I don't know the details but I think yes. If you consider, spigot team found a lot of bugs.

#

Aikar is there any async update for the future?

#

Like performance for servers and game

timid valley
#

yes, but far far future lol

#

mojang does want to get rid of the concept of a main thread

#

id expect at most per-world threads though

chrome edge
#

finally lol

timid valley
#

while it is possible to divide up a world into multiple threads (I've designed the solution already), its a much more ambitious project

#

if it wasn't for plugins, I could of done it already 😛 plugins is what makes it hard

chrome edge
#

Oh that's interesting. I've done some process before the mojang lol

harsh anvil
#

shouldve just thrown the whole notch crap out of the window and make minecraft 2.0

timid valley
#

that prob would of been worse. at least now their usage of streams isnt deep enough that they can be reverted

#

but a whole rewrite likely would of just been built on streams 😛

paper basin
#

anybody available to give some help with packets?
I'm currently listening to an incoming packet from the client with this code:

@Sharable
public class DropHandler extends ChannelDuplexHandler{
   
    DropHandler(){}
   
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception{
        if (msg instanceof PacketPlayInBlockDig) {
            PacketPlayInBlockDig packet = (PacketPlayInBlockDig) msg;
            if (packet.d() == EnumPlayerDigType.DROP_ITEM) {
                // more code
                return;
            }
        }
        super.channelRead(ctx, msg);
    }
}

// Main code:
ChannelPipeline pipeline = ((CraftPlayer) p).getHandle().playerConnection.networkManager.channel.pipeline();
pipeline.addBefore("packet_handler", "drop_handler", new DropHandler());

However, after executing the code if the right packet is received, the minecraft server stills handle this packet even with the return; statement in the code.
Anybody have got an idea of why doesn't it work and how to fix this?

timid valley
#

i think you gotta throw some special exception

frigid ember
#

aikar whats faster iterator or array

#

to loop through

worn temple
#

depends on size and what you are doing

paper basin
#

uh
no way to do this in a... cleaner way? x)

frigid ember
#

while(it.hasNext()) it.next() or a foreach array

timid valley
#

performance wise prob identical. iterator has a small allocation each invocation though

frigid ember
#

id imagine an array

#

same size

#

arrays have a fixed size

timid valley
#

so if its super hot, using random accesse optimized loop avoids any allocations

worn temple
#

a stream is even better than iterator or array

frigid ember
#

no

#

wtf

timid valley
#

your better off writing a proper plugin for it @paper basin this is wrong approach. itll create desync

worn temple
#

Or even, reactively processing, but not really possible on bukkit without resyncing

paper basin
#

I just need to know if the player drops the whole stack or only one item

timid valley
#

??? your listening to block dig packet

#

there is a PlayerDropItemEvent

#

or something like it

paper basin
#

yup, this is the one which handle drop

chrome edge
#

._.

frigid ember
#

aikar is that u irl

paper basin
#

PlayerDropItemEvent does not gives the stack size unfortunately :/

timid valley
#

registering packet handlers to do stuff you should be able to do by api is silly

#

you can do .getItem().getAmount() ?

paper basin
#

what if it was a stack of only one item?

#

I want to know if it's CTRL + DROPKEY or DROPKEY

#

but you're right, it should be in the API, I will create a request

timid valley
#

InventoryInteractEvent

paper basin
#

no, from the game, not from the inventory 😅

timid valley
#

talking about Q rigth?

paper basin
#

yup

timid valley
#

is that really a block dig packet? wtf

paper basin
#

yup x)

#

this is also why PlayerInteractEvent is called when you drop an item

#

because every single PacketPlayInBlockDig calls a PlayerInteractEvent

#

that's a Spigot bug which has been reported for a long time

timid valley
#

yeah hmm no event for this

#

or well, the event that fires doesnt receive the boolean that expressed intent

thorny isle
#

Hi! Help me! Minecraft error: "an internal error occurred while attempting to perform this command"
This is console log! (hastebin)

https://paste.bombsite.be/unoyowuyuw
timid valley
#

can you paste that on a less questionable paste site and also make the url you know clickable

thorny isle
worn temple
#

@thorny isle index out of bounds. the list its checking is empty

Also, please post it on pastebin, or the official hastebin instance

#

An ad filled rehost is pretty questionable

thorny isle
#

wait

worn temple
#

@thorny isle index out of bounds. the list its checking is empty
@worn temple

#

I assume by that response you aren't a programmer and didn't code the plugin. Contact the plugin author as this is a code issue

thorny isle
#

im a plugin author but I'm new and I don't know what you mean

frigid ember
#

Hey guys, if I do

p.getInventory().addItem(Const.NETHER_STAR);

and I have the itemstack as static and final in a seperate class, would this be misuse of static?

thorny isle
#

Do you want someone to give "Nether star"? @frigid ember

worn temple
#

Yeah, its static abuse

frigid ember
#

@worn temple if I put it in an enum would that be static abuse as well?

worn temple
#

@frigid ember Make a static method that instantiates a new itemstack

thorny isle
worn temple
#

since you don't care about state, its technically fine

#

@thorny isle args array is empty.

thorny isle
#

I would like when i write a command without args, it shows usage

worn temple
#

Well, you're trying to get the player by the args, so don't do that?

If you are so new to java that you do not understand these basic concepts, I highly highly recommend you take a step back and learn, at least the basics of, java and then come back to spigot/bukkit. Here is a great resource for learning: https://www.mooc.fi/en/

timid valley
#

@frigid ember this is the worst community to ask about static use. it's fine to do that, however id name the class something more useful than Const, but also do .clone() before adding to inventory as you dont want multiple inventories linking to the same itemstack

#

otherwise it runs risk of amount changing affecting everyone who has a copy

worn temple
#

^

#

mc dev community in general uses static abuse like crazy

timid valley
#

but, your not gonna get much benefit if its just a plain nether star vs new ItemStack(Material.NETHER_STAR)

worn temple
#

Hell, my early plugins are chock full of static abuse

timid valley
#

but if you're configuring lore and such too, then yes it's good to store templates as ready to clone items

tiny dagger
#

they're probabily fine for inventories of type gui too 🤔

grand aurora
#

Does anyone know which plugin is causing me to get giant titles that say "Teleporting to <World> Players: <Players>"? I am using essentialsx, lobbyapi, multiverse (and more but I dont think they are relevant. if you want to know please ask)

#

I think it is LobbyApi because it doesn't happen with multiverse teleporting. Does anyone know how to disable this?

late wyvern
#

ask the devs of LobbyAPI

#

not here

grand aurora
#

Okay

frigid ember
#

or restart

subtle blade
#

because it's a snapshot build?

#

The exact reason it's not available for public use

sudden osprey
#

Does anyone know if there is a free cave generator plugin for uhc?

leaden girder
#

Is it possible to replace a placeholder in the lore of an item with another list? Like I want to replace {upgrades} with a list of strings.

naive goblet
#

Theoretically it should be

leaden girder
#

Got any ideas?

naive goblet
#

Could you give more context for your scenario?

frigid ember
#

how do i give plugins permissions to my friends in my hamachi server

naive goblet
#

I guess you kind of want to rearrange and manage indexes in a list

frigid ember
#

idk how permissionsex work at all

naive goblet
#

Don’t use pex

#

It’s outdated

#

Use luckperms

frigid ember
#

can u send me the link? for 1.15.2

leaden girder
#

I have different upgrades for my hoe plugin and I would like the upgrades and levels of those upgrades to show up in the lore. I don't want to individually add each upgrade and level in the lore so I just wanted to grab the levels through the placeholder but I would need to have multiple lines

naive goblet
#

You’d have to start with comparing the list before transforming the placeholder to after

#

And then take action to the changes

frigid ember
#

why didnt java not make a string a primitive datatype

strange grove
#

hey does anyone know how to schedule

#

with bukkit?

subtle blade
#

because it's not primitive

naive goblet
#

Its really just an array of chars

subtle blade
#

It's almost one of those special cases because its literals make it seem kind of like a primitive

naive goblet
#

^

subtle blade
#

Only... it's not lol

naive goblet
#

Strings are just a sequence of chars and it’s immutable

marble valve
#

Hii can someone help? Pls i recently did a Network, once i already connected all server i had a problem in My survival server because i can’t do /spawn, when i try it just appear a message “You do not have permission to execute this command” i guess is sth in the bungee config, i already set spawnpoint in survival and tried with op and without op

naive goblet
#

Do you have a permission plugin?

marble valve
#

In Survival, yes i use GroupManager, actually, without network i mean, Survival as a single server worked perfectly, without problems but once i connected it to bungee, the trouble appeared

naive goblet
#

Is /spawn a bungee command or what?

marble valve
#

Is a /spawn command from essentials but it seems like bungee don’t allow players to use the command

#

I mean in Survival, i use essentials and in this server, i can’t use it because bungee don’t allow me idk why

frigid ember
#

c# string is primitive

#

@subtle blade

#

and @naive goblet

#

in c# you can do

string a =“a”;
if(a == “a”) {

}```
tiny dagger
#

tf

#

i mean that's not bad 🤔

frigid ember
#

ik

subtle blade
#

Strings are classes in C#

frigid ember
#

primitive

subtle blade
#

They too are immutable

frigid ember
#

as == works

#

its not comparing onstances

tiny dagger
#

in java works too tho

frigid ember
#

== is conparing instances

subtle blade
#

C# has operator overloading

#

Java does not

frigid ember
#

why didnt java do it

subtle blade
frigid ember
#

would u want it

subtle blade
#

Not really. Serves for confusion

frigid ember
#

minecraft is done for writing the game in java tho

#

craziest decision eva

tiny dagger
#

no

frigid ember
#

instead of abandoning it and continuing windows edition they maintain and update it still in java

tiny dagger
#

java is probabily what made them so popular lol

#

how much of minecraft did you played before using mods?

#

exactly

frigid ember
#

no they made java popular

#

I am forced to mod in java

#

I was using C# before

tiny dagger
#

java was used before too 🤔

frigid ember
#

they can rewrite

#

and abandon this

#

focus on windows edition

naive goblet
#

Skip it python ftw

subtle blade
#

They have a team at Microsoft dedicated to the Windows version

naive goblet
#

lol

subtle blade
#

Mojang will remain on Java, as they should

frigid ember
#

😛

naive goblet
#

According to stackoverflow java is 3rd most popular programming language

frigid ember
#

so?

naive goblet
#

No need to switch it out yet

frigid ember
#

im talking about whats better

tiny dagger
#

c++ and python are the other 2 i guess

frigid ember
#

they made java popular

#

more popular

naive goblet
#

Better in what way?

frigid ember
#

id say

#

c# is faster firstly, c# has better inbuilt libraries

#

c# is awesome

tiny dagger
#

then go use that :p

frigid ember
#

?

#

for game modding c# would be best

#

or game deving c# is better than java

#

use opengl and ez

#

if one wants to make plugins one is forced to using java, as mc server is java, mc isnt even open src, this is terrible

#

choco: “i dont use anything thats not open src”
alao choco: plays mc

subtle blade
#

You're not forced to use Java

frigid ember
#

😂

#

for mc

subtle blade
#

Bukkit is designed to allow for plugin loading in different languages. You just have to be willing to implement it

frigid ember
#

java is best option for mc currently

naive goblet
#

then go for java?

#

or what lol

subtle blade
#

Also, LWJGL is a library for Java to interact natively with OpenGL so I don't understand your concerns

#

A large majority of that library is native methods

frigid ember
#

ik?

#

ok

#

ik

#

just as a lang java is slower

subtle blade
#

It really isn't

frigid ember
#

c# inbuilt libs are better

subtle blade
#

C# has its flaws as well

frigid ember
#

name one

#

compared to java

#

its nice not having to use a method to compare strings imo xd

#

“a” == “a”

naive goblet
#

why have that

frigid ember
#

why have “a”.equals(“a”)

#

ik ok it makes sense to have it

tiny dagger
#

this is how java works deal with it

frigid ember
#

just its faster

#

to type ==

naive goblet
#

easier to seperate reference comparison to a value or content comparison. If you're going to compare languages do it in a factual way

frigid ember
#

c# have u seen their IO

#

seen op ide by microsoft

#

io libs

naive goblet
#

Well I shouldn't perhaps say too much as I don't code in C# but go with what u like idc

frigid ember
#

especially the libs

#

java is 💩

#

😂

naive goblet
#

ur factual arguments 😫

frigid ember
#

u have not used c#

#

lol

#

go use it

naive goblet
#

why would i

frigid ember
#

try it

#

learn sth new

#

make games with it

naive goblet
#

lol

frigid ember
#

or anyth

obtuse rose
#

make game in C#? just use Unity 😉

frigid ember
#

one way

naive goblet
#

lmao

frigid ember
#

yea

naive goblet
#

yeah fr

frigid ember
#

sure use unity

tiny dagger
#

so basically you looked on some stuff c# does and based on that you already made your opinion?

#

good to hear

frigid ember
#

?

worn temple
#

@frigid ember in java .equals is a value comparison, but == is an instance (memory location) comparison. so, while == could be "faster to type" its wrong.

frigid ember
#

its not wrong ifs used as a shortcut

#

c# handles it for u

#

so it wont be the case

timid valley
#

ChocoToday at 4:23 PM
They have a team at Microsoft dedicated to the Windows version
ChocoToday at 4:24 PM
Mojang will remain on Java, as they should

@subtle blade this is not true. Literally was just said a few days ago (in private) that the teams are united now. each dev when they add a feature, they add it to bedrock and java at same time, both platforms are unified now in development.

worn temple
#

No, its only correct if you actually want instance comparison

frigid ember
#

it might be a instance check in java

#

not in c#

naive goblet
#

Lol like that shortcut is saving ur life

frigid ember
#

there is no law in programming saying so

#

😂

subtle blade
#

Unified in development, absolutely

#

There are still two teams working on the two differing projects

frigid ember
#

get yo facts ryte

timid valley
#

It's not separate teams. The same developer adds it to both bedrock and java.

#

straight from mojangs mouth.

frigid ember
#

i thought so

subtle blade
worn temple
#
String a = new String("a");

String a1 = new String("a");

a == a1; //false
a.equals(a1); //true
rustic socket
#

choco stanky

frigid ember
#

ik nova

#

i said its like that in java

#

not c#

timid valley
#

They are doing a lot of good stuff to clean things up internally.

tiny dagger
#

would that be in 1.16?

frigid ember
#

not every language must be the same

tiny dagger
#

or for 1.17

timid valley
#

Finally got automated testing setup, hiring people with dedicated roles to improving existing elements

worn temple
#

Its the same in C#

frigid ember
#

no

frigid ember
#

you don’t kno c#

worn temple
#

I do tho

frigid ember
#

string a = “a”;
if(a == “a”){

}

#

is true

worn temple
#

In c# its not instance, its reference comparison, but they can be differing just like in java

frigid ember
#

i didnt say String i said string btw

timid valley
#

@frigid ember don't rely on it. relies on jvm interning common strings

tiny dagger
#

i think "a" == "a" is true in java too

frigid ember
#

i said string

worn temple
#

Again, its value vs instance for java, and value vs reference for c#.

frigid ember
#

go open vs

#

and check

#

its true

worn temple
#

In both cases, while most times it may be the same, it is actually different

naive goblet
#

Retrooper I mean personally I’d probably try out C# if I were to develop a game as it’s confirmed to be better. So fair enough

frigid ember
#

🙂

#

I don’t have time to preach all pros im glad u realized tho

#

a game was an example

naive goblet
#

Idk rlly know much about C# and tbf this comparison discussion is really unnecessary

frigid ember
#

ok

worn temple
#

@tiny dagger "a" == "a" is only true because "a" is cached in the String constant pool. If you did new String("a") == new String("a") it'd be false. This is the same for java and C#

tiny dagger
#

i feel like someone is gonna get hypixel threats again 👀

frigid ember
#

i said string

#

not String

worn temple
#

Still applies

frigid ember
#

intold you thrice

#

String is an object class

naive goblet
#

If C# has the == that replaces .equals() use it? Nothing more nothing less why even debate about it

worn temple
#

yes, string is primitive, and String is class. its still the same thing

obtuse rose
#

"a" == "a"
Sometimes true, sometimes false, depends on caching

#

you'll see some code kinda work using == in Java

#

but you absolutely shouldn't

frigid ember
#

string a = “a”;
bool b = a ==“a”;
b is always true

#

always nova

worn temple
#

== and .Equals are not the same. It will not always be true. 99.99999% of the time, yes, it will be, but it depends on caching

#

its referential

sturdy oar
#
String a = "bruh"
String b = a;
assert(a == b) : "bruh ur java broken";```
#

this is what string == string is for

frigid ember
#

im coding c# dude

sturdy oar
#

smh Microsoft Java

worn temple
#

Its the same in C#, it's usually true, but not always

frigid ember
#

microsoft owns mc

native shore
#

wtf

frigid ember
#

¯_(ツ)_/¯

worn temple
#

Where as .Equals is always true

#

because you are doing referential vs value comparison

frigid ember
#

u said its 99% true

#

ur now changing

native shore
#

You dont compare Java Strings with ==

frigid ember
#

who said java

sturdy oar
#

nobody said that

worn temple
#

I never said always false or always true. its a different type of comparison, because it relies on caching, it can be true or it can be false

sturdy oar
#

I actually compare them character by character smh

subtle blade
#

man this discussion is going literally nowhere lol

naive goblet
#

^

worn temple
#

.Equals is always always correct because it does a value comparison not instance (for java) or referential (for C#)

native shore
#

who said java
literally the code block a few messages above yours..

#

String = Java
string = C#

worn temple
#

@subtle blade I know. People just don't understand the underlying principles of why these two options exist.

#

@native shore string is just the primitive in c#, but String also exists just like in java there is boolean and Boolean

frigid ember
#

and u go on

#

lmao 😂

tiny dagger
#

lol no

#

doubt

timid valley
#

does it a lot smarter than that lol

sturdy oar
#

yeah I don't look smart

worn temple
#

No, it does bit logic on it, no need to go down to chars, it compares the raw bits @sturdy oar

obtuse rose
#

why nested for loop

#

that's not gonna work 🤔

sturdy oar
#

true

#

i just got dumb

tiny dagger
#

you saw nothing 👀

sturdy oar
#

let me delete

obtuse rose
#

I think Java compares hash of the strings?

sturdy oar
#

well first it checks the length i guess

tiny dagger
#

yea

naive goblet
#

@frigid ember I might sound dumb but does all primitives in C# have wrappers?

timid valley
#

just open it in your IDE and look

#

the codes right on front of you if you have IDE open

tiny dagger
#

memory length hash otherwise a for loop to check it 🤔

sturdy oar
#

oh yeah it actually checks length first

frigid ember
#

yea

#

they do

obtuse rose
#

ofc you need to check length first 😛

naive goblet
#

So C# has String and string and Java only has String 🤨

sturdy oar
#

it does compare character by character

frigid ember
#

yup

#

java makes no sense to me

#

that string aint primitive

obtuse rose
#
  public boolean equals(Object anObject) {
        if (this == anObject) {
            return true;
        }
        if (anObject instanceof String) {
            String anotherString = (String)anObject;
            int n = value.length;
            if (n == anotherString.value.length) {
                char v1[] = value;
                char v2[] = anotherString.value;
                int i = 0;
                while (n-- != 0) {
                    if (v1[i] != v2[i])
                        return false;
                    i++;
                }
                return true;
            }
        }
        return false;
    }
naive goblet
#

It makes some sense but I mean does it matter if it’s a prim or not

tiny dagger
#

afterall a string is an array of chars

frigid ember
#

imo it should be prim

timid valley
#

string will prob become a valuetype in vahalla in 40 years

naive goblet
#

¯_(ツ)_/¯

sturdy oar
#

the hell is Valhalla

frigid ember
#

as the value is not a new instance

#

u can do String a = “a”;

tiny dagger
#

a new assassins creed game fendi

timid valley
worn temple
#

in java == actually compares the memory location, an instance comparison. Because of caching, that memory location can be the same for multiple strings. so "a" == "a" would be true since its cached in the constant pool and new String("a") == new String("a)" would be false. Whereas .equals will compare the actual values of the strings (or objects) so both examples would return true because the instancing doesn't matter.

C# is similar, == is a referential comparison. so whether both objects/primitives in question reference the same thing (similar to instancing, but slightly different at the low level), while .Equals does a value comparison.

obtuse rose
#

why do you want primitive string?

sturdy oar
#

is it by OpenJDK or by Oracle

#

im not understanding

worn temple
#

@sturdy oar They are the same thing in basically all respects.

timid valley
#

Created 2012/10/22 20:00

just to give you an idea on timing

frigid ember
#

lol

#

nice timing

#

exact

naive goblet
#

@frigid ember what about javascript then 🤡

frigid ember
#

what about it

obtuse rose
#

I was wrong about Java compares string hash, oof xD

worn temple
#

Javascripts comparisons are much different because its weakly typed.

naive goblet
#

Yh

worn temple
#

Its why == and === exist

naive goblet
#

Doesn’t it have like =======

#

Yhyh fr

worn temple
#

Only 3.

frigid ember
#

=========

worn temple
#

And its complicated to explain

frigid ember
#

if (“a” ========= “a”)

naive goblet
#

Lmao

#

Yes sir

frigid ember
#

java script update

#

😂

sturdy oar
#

PhP has ===

timid valley
#

always prefer === in JS, == just .toStrings() both sides

naive goblet
#

True

frigid ember
#

i predict new updates

timid valley
#

so == can really hurt performance if toString() is heavy

worn temple
frigid ember
#

aikar in c#?

timid valley
#

javascript

frigid ember
#

ok

#

ToString

#

its a pain in ass changing to c# code style

#

c# methods start with capitals

naive goblet
#

oof

frigid ember
#

like Print

#

Yup

obtuse rose
#

JS in 2100 be like

if("a" ================================================================================ "a")
tiny dagger
#

you forgot an =

frigid ember
#

ye

obtuse rose
#

oh yea

frigid ember
#

compilation error

tiny dagger
#

nub

frigid ember
#

line -111

worn temple
#

@obtuse rose its only == and ===.

frigid ember
#

its called jokes

sturdy oar
#

why doesn't Java have the same thing that ECMA Script 6 introduced?

#

I'm talking about string templates

frigid ember
#

skidders

sturdy oar
#

i mean a lot of languages have it as well, Ruby, Kotlin, Python...

worn temple
#

I think string templates were being added in in like j14 or something

sturdy oar
#

no , you might be confusing with text blocks

#

i mean those are cool as well, but they should've come a lot of time before

frigid ember
#

lazy java

#

so use c#

#

how do i remove my name so the server thinks im joining for the first time?
i think it's throwing new people in the wild instead of server spawn and i need to confirm it

tiny dagger
#

delete your playerdata from the main world

#

join

#

to find your uuid

#

then find your_uuid.dat in the world

frigid ember
#

the spawn world is a different world

#

so i'll just remove in both of them

tiny dagger
#

yeah

naive goblet
#

Just the main world?

frigid ember
#

couldnt find the file

tiny dagger
frigid ember
#

well its supposed to spawn in a different world then you warp to the main

#

ty

#

i found it

naive goblet
#

Idm the player data should still be stored in the level worl

frigid ember
#

yeah theres no playerdata saved in the multiverse worlds i guesds

#

here's hoping it works

naive goblet
#

Bukkit.getWorlds().get(0).getWorldFolder()

#

Iirc

frigid ember
#

no good

#

it didnt treat me as a new player

tiny dagger
#

then you haven't deleted it from main world

frigid ember
#

no i did

worn temple
#

Gotta delete the player data from the playerdata folder, also have to go through any plugins (like essentials) that stores additional player data.

frigid ember
#

i deleted the file in playerdata from my uuid

#

reloaded the server

#

and rejoined

worn temple
#

Also, never ever ever ever use /reload. that's for developers only and should never be used in production

frigid ember
#

would it possibly take a complete restart to change it?

worn temple
#

Well, you need a complete restart for plugins. Full /stop and then start.

frigid ember
#

yeah but its not a plugin file

#

As someone who's already taken some courses in Python, would you guys recommend TheNewBoston for Java tutorials?

worn temple
#

But again, you need to go through all your plugins and make sure if any of them store player data, to remove your data.

naive goblet
#

Reload is nice

worn temple
#

Again, even if not a plugin, never ever ever use /reload

#

Its literally only meant for developers

naive goblet
#

Would be even nicer if plugins used onEnable properly

frigid ember
#

what problems can it cause?

naive goblet
#

And onDisable

worn temple
#

memory leaks, bad shutdown of plugins, mishandling of so many things.

#

@naive goblet Its not plugins not using it correctly, its the fact that it fucks with the classloader.

#

Doesn't matter if you use onenable/disable correctly, it still breaks a ton of shit

naive goblet
#

Oh nvm I was thinking of plug man

worn temple
#

because classloaders

#

and fuck plugman, even if you want to mess with classloaders, don't use plugmans, at least use BileTools as it gives plugins a chance to attempt to shutdown correctly, verses plugman which just completely wipes the classloader

frigid ember
#

why did spigot change inventory gui system

naive goblet
#

Did they?

frigid ember
#

plugman is goo

#

d

#

i love plugman

naive goblet
#

me2

#

Plugman4Life

frigid ember
#

yea

#

TheNewBoston? Recommended?

#

unloas, load, restart

#

plugins

#

all there

#

and open src

worn temple
#

But plugman and bile are and other plugins similar to them should only ever be used by developers. They are not meant for production servers or server owners that don't develop plugins.

naive goblet
#

That’s true

frigid ember
#

ok so?

#

is it bad

worn temple
#

Yes

#

Very very bad

frigid ember
#

beuh

naive goblet
#

Still useful

frigid ember
#

/plugman reload plugin

#

thats all u need

#

stop haattinnn

worn temple
#

It does some seriously fucked up things with the classloader and can break so damn many things.

frigid ember
#

lmao

#

u can use ig commands, thatw as example

naive goblet
#

Weird it didn’t do it for me

frigid ember
#

ok nvm ig lol

worn temple
#

I'm not hating, its a solution to a problem that doesn't exist.

frigid ember
#

then u fix it

worn temple
#

Just stop the server and restart it.

frigid ember
#

fork it

naive goblet
#

Plugman works fine with anything except for the plugins that doesn’t have a proper onDisable

frigid ember
#

not all big servers can do restarts

worn temple
#

@frigid ember Yes, let me just rewrite all of java's classloading system. That's what the issue is, its java's classloading combined with how bukkit loads plugins. Its not something to jut "rewrite"

frigid ember
#

i told u fuc java

#

but u licked it off

#

😂

worn temple
#

its server owners being too lazy to stop their server properly because of a lack of understanding of the JVM.

frigid ember
#

i told u

#

ugh there's so many plugins that could be holding uuids. im suprised it didn't treat me like a new player in any way by just deleting the playerdata file

worn temple
#

Well yeah, @frigid ember because plugins need to hold their own data and can't read and write to the player data files like that lol

#

But that's why, while the server itself will think you have joined for the first time, whatever plugin is handling teleporting new players isn't because it relies on its own data

naive goblet
#

I swear ur laughing out loud rn

worn temple
#

nah, actually little aggravated because I can't figure out a networking issue.

naive goblet
#

Ok gl ig

worn temple
#

¯_(ツ)_/¯

frigid ember
#

new idea

worn temple
#

Think its actually on discord's end.

frigid ember
#

anyone want to do me a favor and pop on my server for 2 seconds?

#

see where it spawns you?

#

i changed a suspect plugin

#

but its only been reported once

naive goblet
#

Can’t rn

frigid ember
#

so thats why im trying to confirm

#

im laughing

naive goblet
#

Well I’m going to use plugman even more now

frigid ember
#

same

#

i never ran across any issues

#

i think very user friendly

#

even non devs

naive goblet
#

Yep

frigid ember
#

especially the commands

#

ingame commands

naive goblet
#

Never got any memory leaks or some stuff being messed up

frigid ember
#

yup

#

can anyone pop on for just a sec. 2min thing

#

i mean the value i changed was TeleportNewbies: true to false

#

thats probably it

naive goblet
#

Why not use EssentialsSpawn?

#

Doesnt that teleport u into a specific world regarding other stuff

frigid ember
#

i am using Wild

naive goblet
#

Wth is that

frigid ember
#

and i think either multiverse or essentials was set up to start you off at spawn

#

i mean it worked before

#

but wild i've installed awhile after

#

its /wild

#

so i think it was throwing newbies at random places

naive goblet
#

Config wild then

frigid ember
#

thanks

#

it works now

ashen stirrup
#

Would a TreeMap descendingMap sort the map on keys, highest to lowest?

odd knoll
#

Pretty sure a tree map goes lowest to highest. I'd recommend testing incase I'm wrong and if it does, you can reverse it using Collections.reverseOrder().

ashen stirrup
#

players = (TreeMap<UUID, Integer>) Collections.reverseOrder();

#

?

odd knoll
#

No..

red kernel
#

Nope it wouldn't

odd knoll
#

Like, Maps.newTreeMap(Collections.reverseOrder())

#

Different people have different ways, some prefer using new TreeMap styling, so you could do that instead, but that's the gist.

#

@wanton magnet I'd suggest just thinking of something basic you'd want to do, changing some mechanics or making your own and then exploring what you need, what you can do with it. Pick something where you'd need some events and then maybe to mess with some items. I always find experimentation can be the fastest way to learn.

tiny pebble
#

Anyone know where I can find out how to apply ItemMeta to an item? I'm just doing a simple sort of thing like giving a stick to someone though I want it to have specific properties.

odd knoll
#

Can't personally say I've watched any, but apparently The Source Code's are good.

dusty topaz
#

ItemStack#setItemMeta()

tiny pebble
#

Thanks 😛

ashen stirrup
#

I'm confused on Collections.reverseOrder() - the demonstrations I found online all use ArrayLists etc.

odd knoll
#

I'm getting sooo confused with my own code here.

#

I don't get how this is even working.

#

Ok, I'd recommend waiting for someone else that might have used TreeMaps a bit more.

ashen stirrup
#

I just need the values to be descending.

naive goblet
#

TreeMap<K, V>#descendingMap() ?

ashen stirrup
#

My question was just if descendingMap sorts on Values

dusty topaz
#
    descendingMap()
Returns a reverse order view of the mappings contained in this map.
tiny pebble
#
java.lang.IllegalArgumentException: Meta of class tanku.dev.commands.customitems.WhackerStick$1 not created by org.bukkit.craftbukkit.v1_15_R1.inventory.CraftItemFactory

Sadly I do get this error when applying the ItemMeta. I've tried several ways to apply it but it may just be an error in my Java knowledge, not sure. I know that it says it isn't created by CraftBukkit, but then how else would I get custom properties 🤔

ashen stirrup
#

When I try to initialize the players HashMap with descendingMap, it makes me change the map to a NavigableMap .

dusty topaz
#

@tiny pebble are you making your own ItemMeta lol

tiny pebble
#

At first I was trying to yes, as I thought that was the way to fill out what properties I want haha

dusty topaz
#

this sounds xy problem

#

what are you doing? show some code

tiny pebble
#
ItemStack whacker = new ItemStack(Material.STICK);
whacker.setItemMeta(new ItemMeta() {//all the itemmeta methods});

I'm sure it has to do with the fact that I did new ItemMeta(), though I tried doing it in a separate class as well. Guess I just don't understand ItemMeta

dusty topaz
#

ItemMeta is an interface

worn temple
#

oh god, don't do new ItemMeta().

dusty topaz
#

you use ItemStack#getItemMeta

worn temple
#

^

#

its not so much not understanding ItemMeta. Its understanding what an interface is. And in this case, how to obtain an itemmeta object

tiny pebble
#

Ahha alright, so it was indeed my Java knowledge

#

Yeah, I have a lack of understanding on what an interface is sadly, though I've read up and am learning 😐

worn temple
#

https://www.mooc.fi/en/ < great resource for learning java. I believe the first lesson has a whole section about interfaces and inheritance. (I mean, I know it covers it, just dunno how far in it is)

tiny pebble
#

Ah neat. I've had some good resources about learning Java though none ever told me the difference between an interface and a class, kinda lame

sturdy oar
#

is using ternary operator to avoid if condition fine?

#

like i gotta increase this counter value by 1 if a condition is true

#

so i do something like counter += (condition) ? 1 : 0

worn temple
#

ternary operator is just a shorter way of writing out a conditional that can affect a variable. so its fine.

raven robin
#

Fendi, that's fine, as long as you know what you're writing.

sturdy oar
#

i guess I know 😅

raven robin
#

So do people here use MCDev? I'm trying to use a Redirect in a Mixin, and though the plugin used to verify the target field, I can't get it to do it anymore. Does anyone know how to make it validate that field?

sturdy oar
#

MCDev? you mean the IntelliJ Plugin?

raven robin
#

Yep

sturdy oar
#

yeah I do use it indeed

worn temple
#

not really super needed if you don't mind setting up the boilerplate

sturdy oar
#

i have no time to write pom.xml tbh

raven robin
#

Fendi, can you get it to validate the "target" field in a redirect statement?

sturdy oar
#

sorry can't help you

worn temple
#

I just copy it from other projects of mine

sturdy oar
#

i don't know what you mean lol

#

I just basically use that plugin to generate listeners and configs

worn temple
#

You can just make your own template project with IJ now

sturdy oar
#

you mean a maven archetype?

raven robin
#

Like this: @Redirect(method="spawnEntities", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/mob/MobEntity;initialize()V"))

worn temple
#

No, like a legit full on project template.

sturdy oar
#

WUT IS THAT

#

When did MCDev have such cool features

#

sorry I can't help

worn temple
#

I have no idea what you are doing tbh.

#

Haven't used it since it was pretty early and was just reducing manual work on boilerplate

raven robin
#

I'm trying to write a Mixin.

sturdy oar
#

I just try to use 100% plain java style

#

no lombok, no weird annotations

worn temple
#

annotations are pure java, I just have no idea what the point of this is

sturdy oar
#

I mean there's a lot of libraries that try to simplify code by using Annotations

neat orbit
#

Hi. I run a Minecraft server with Multicraft Spigot and it takes more than 7 seconds for Joining World and to be able to join the server, what affects the span of login. It should only be 1 second at most

worn temple
#

SpingBoot. Its annoying when you start, but once you understand spring well, its amazing

sturdy oar
#

Wasn't Spring for web development

raven robin
#

I'm writing a Fabric mod, but since Spigot uses Mixins, I thought you guys might know something about this.

sturdy oar
#

or I remember something else

worn temple
#

Yeah, it is, I use spring for web dev. Just showing an example of something that uses annotations heavily.

#

The Android API also uses it a lot

sturdy oar
#

Aikar's ACF uses lot of annotations

worn temple
#

@raven robin Honestly, you're way better off going to the fabric help server. Not sure why you started here tbh.

#

@neat orbit So so many things can effect login time: mods, resource packs, auth, connection speed, location, etc etc.

So, no, it shouldn't be "only 1 second at most" Its completely dependent on so many different working parts.

Its kinda like how a spigot server with no plugins can boot really fast, but a spigot server with many plugins will take longer to boot. Its just the nature of interconnected dynamic systems.

raven robin
#

Nova, I did start there; I just didn't get a response. I went here because I thought you'd be familiar with Mixins and/or the plugin.

worn temple
#

Its been so long since I've used that IJ plugin, it only reduced boilerplate at the time. ¯_(ツ)_/¯

sturdy oar
#

I mean the thing that I was trying to say , is that like ""default"" java looks better usually to me

#

or maybe it's just me not being able to use stuff properly , idk.

worn temple
tiny pebble
#

so... is it right to have all of my properties filled out in a separate Java class that implements ItemMeta? and if so, how would I thus apply those properties to my itemstack?

I mean I got ItemStack.setItemMeta(), and I know getItemMeta just returns the current ItemMeta of the item...

ahha, sorry about these questions. i know i'm a bit new but this is how i'm going to learn (meaning i'm going to learn through plugins etc), so if you don't want to answer you don't have to 😛

worn temple
#

Don't make your own class that implements ItemMeta.

#

You aren't understanding how inheritance and interfaces work.

tiny pebble
#

alrighty

#

i'll work on it

worn temple
#

Just retrieve the ItemMeta with ItemStack#getItemMeta()

tiny pebble
#

my main misunderstanding there is what would go in the ()? i'm just confused how i would state the properties i want basically

worn temple
#

Methods do not always need parameters

tiny pebble
#

then i guess re-wording my question, how would i state the properties just in general using ItemStack#getItemMeta()?

worn temple
#

You are retrieving an object, which you can then manipulate

tiny pebble
#

i'll give that a look

#

thanks again and sorry for the hassle

marsh ember
#

i bought a plugin 3 days ago and i never received it

worn temple
#

Contact the developer

primal kelp
#

i looking for a plugin that allows you to sell inventory items for money

odd knoll
#

ShopGUI+? BossShopPro?

worn temple
#

I think essentials even has a /sellhand command or something

odd knoll
#

And yh, essentials has build in things as well ^^

#

Configurable via the worth.yml.

primal kelp
#

well i have essentialsX

#

so there no point adding those 2 plugins

worn temple
#

its just a maintained fork of essentials

#

so should still have that command

tiny pebble
#

Finally did it :P
Thanks for dealing with me 😂

cloud crater
#

I don’t rely on public plugins, just code what’s needed from scratch but better. Maybe working with vault for eco systems about it

subtle blade
#

is using ternary operator to avoid if condition fine?
like i gotta increase this counter value by 1 if a condition is true
I honestly just think it looks better to if (value) { increase++; }

sturdy oar
#

Oh man let me revert my commit

#

I fixed anyway by using a super intelligent method concatenation

#

Thank you chocolate

timid valley
#

@raven robin Spigot does not use Mixins at all. That system was created for Sponge. You may have some luck asking Sponge too if Fabric is inactive atm.

sturdy oar
#

O sorry Choco

#

Autorcorrector

#

Turned you into chocolate

tiny pebble
#

Is it possible to edit the size of every mob via Spigot? Either by editing hitbox/model or the genuine size (other than slime/magma), even if severely difficult?

zinc ingot
#

not clientside

#

but yes

harsh anvil
#

itemstack.setItemMeta

#

goddamit im scrolled up again

tiny pebble
#

😛

timid valley
#

@tiny pebble all that does is adjust their collision boxes, the size internal that is

#

theyll appear same on client

tiny pebble
#

so i could change their collision boxes server side, and then use a resource pack to change the model?

zinc ingot
#

it won't change the interaction of the player with the mob

timid valley
#

good luck, not sure if thats possible client side

sturdy oar
#

Aikar is there a packet to make the client force crouching

#

or basically as I call it 'land swimming'

#

I've seen Entity packet has a 'swimming' field from wiki.vg

snow forge
#

When you deposit money into the faction bank, it shows a message that you have donated x amount but when you check the balance of the faction bank, it is 0. How do you fix this? Please and thank you.

sturdy oar
#

Contact the plugin author I guess?

#

He might have to fix this if it's a bug

tiny pebble
#

Could be a problem with two different plugins colliding, I’d say look it up, if you can’t find the answer on a forum of some sort contact the author

snow forge
#

ok

tiny pebble
#

Or take a look at the documentation to see if the factions plugin only works with a specific economy plugin. If so then make sure you got that one ¯_(ツ)_/¯

snow forge
#

mkay

turbid latch
#

LuckPerms is very confusing to me i just installed it today and barely know enough, i'm used to use groupmanager so i dont know how to use it

how does it on bungeecord and spigot

#

any advice?

worn temple
#

I still use bPerms loool

#

There's a site for helping generate the permissions files and everything.

#

Check out the luckperms wiki/docs. There's a ton of information there because its way too complex to help with here.

turbid latch
#

ok i will, thanks for help@worn temple 👍

frigid ember
#
    Row region = scoreboard.addRow(" &7◈ &bRegion");

worn temple
#

Not processing the color code it would seem

fathom shard
#

If a player has a itemstack in their hotbar, what event fires if they right click that?

frigid ember
#

How would I fix it?

worn temple
#

ChatColor.translateAlternateColorCodes('&', "&7◈ &bRegion");

frigid ember
#

Yeah that's what I'm doing

worn temple
#

@fathom shard right click it in the hotbar (as in their inventory is open), or right clicking with the item in hand?

fathom shard
#

item in hand

worn temple
#

Possible that diamond character is messing it up then

#

@fathom shard PlayerInteractEvent

Get the item in hand, check what item it is

frigid ember
#

@worn temple

Player target = Bukkit.getPlayer(args[0]);
...

if I do this and check for null, but if the player is offline and I do

target.getDisplayName()

will this cause errors?

worn temple
#

It will only error if the args array is empty OR if you attempt to get the display name if it is null (IndexOutOfBoundsException and NullPointerException respectively)

frigid ember
#

When can the display name be null?

worn temple
#

Its marked @NotNull so it can never be null

fathom shard
#

is it possible to just have a list of keys in YAML? yaml groups: stone: diamond: like this?

#

or do they need to be matched

gusty coyote
#

is there an easy way to get the default attributes from an item?

worn temple
#

What do you mean default attributes?

gusty coyote
#

the ones on an unmodified item

#

like the attack speed on a sword

frigid ember
#

Hey guys, can free resources depend on premium ones?

worn temple
#

Yeah, but it will generally turn people off of them unless they already have the premium resource (ex: extensions for mcMMO)

#

@frigid ember

pastel fox
#

How can I send a fake block change?

#

Player#sendBlockChange requires an instance of BlockData

worn temple
#

Packets

pastel fox
#

How can I create that?

#

Yeah Ik packets lol

golden vault
#

material.createBlockData()

frigid ember
#

Hey guys, how do I fix this

    Row region = scoreboard.addRow(ChatColor.GRAY + " ⟐ " + ChatColor.BLUE + "Region");

For some reason the chat color puts a 4 and a 9, I'm using UTF-8 encoding in eclipse

worn temple
#

How'd you fix it for the other one?

frigid ember
#

I didn't its the same thing

worn temple
#

You got it working for the island display did you not?

frigid ember
#

No, that's from the server I'm trying to copy

worn temple
#

You probably just need to escape it as a code rather than include the actual symbol.

That symbol could be the benzene ring \\U23E3

The symbol you're currently using I assume is \\U25C8

#

I'm gonna keep looking for the symbol you're trying to find tho

opal bay
#

that's one hell of a tld

worn temple
#

The TLD is just ooo

opal bay
#

yes

#

it's one hell of a tld

worn temple
opal bay
#

that's some power

worn temple
#

@frigid ember yeah, can't seem to find the symbol, but this one will probably look better anyway: https://www.compart.com/en/unicode/U+29F0

Include it in your string like so: \\U29F0
Don't remove the double slashes

pastel fox
#

How can I detect when chunks are sent and unloaded for players?

green skiff
#

How do i make a compass track someone?

fleet crane
#

PlayerMoveEvent + setCompassTarget or whatever

#

and re: chunks

#

?xy

worldly heathBOT
frozen cedar
#
@EventHandler
fun onClick(event: PlayerInteractEvent) {

player.sendMessage(EventHandler(item, player))

string EventHandler(Item item, Player player)
   {
      val player = event.player
      event.isCancelled = true

      if (event.item.type != Material.STONE) {
          event.isCancelled = false
          return null
      }

      if (!player.hasPermission("Thing")) {
          return "You don't have permission to start this job"
      }

      val job = getJob(player)

      if (player.isSleeping) {
          return "You can't sleep on the job"
      }

      job.start(player)
   }

}```

Or

```Kotlin
@EventHandler
fun onClick(event: PlayerInteractEvent) {

    val player = event.player

    if (event.item.type != Material.STONE) {
        return
    }

    // We don't want people to place stone
    event.isCancelled = true

    if (!player.hasPermission("job.start")) {
        return player.sendMessage("You don't have permission to start this job")
    }

    val job = getJob(player)

    if (job == null) {
        return player.sendMessage("You don't have any jobs atm")
    }
    
    if (player.isSleeping) {
        return player.sendMessage("You can't sleep on the job")
    }
    
    job.start(player)
}```
#

Which is more readable?

fleet crane
#

the second one

frozen cedar
#

Thankz ❤️

#

He wants to know why

fleet crane
#

also banning stone on the server is a bit extreme

frozen cedar
#

Lmao, it's just an example

subtle blade
#

Also seriously don't advise the first one because of the forcing of cancellation

frozen cedar
#

We were comparing it to if around if around if

subtle blade
#

You force it to true, then force it to false

#

If another listener cancels it at a lower priority, you're going to break compat

#

More often than not you don't want to setCancelled(false)

frozen cedar
#

True! 👍

subtle blade
#

On another note - returning void 🤢

frozen cedar
#

Oh you don't like returning void?

subtle blade
#

return player.sendMessage() is strange

fleet crane
#

damn kotlin

frozen cedar
#

I think it's a clean way to end early compared to adding another line

subtle blade
#

Whenever I see Kotlin, it just furthers my belief that it's a wanna-be Python for the JVM

#

lol

frozen cedar
#

Hmm, idk I'm not a big fan of Python personally

green skiff
#

thx fam

bronze marten
#

What’s wrong with python :o

frozen cedar
#

It's hard to follow

worn temple
#

its whitespaced

frozen cedar
#

And yeah... That lmao

bronze marten
#

Fair

frigid ember
#
    scoreboard.addRow(ChatColor.GRAY + " \\U29F0" + " " + ChatColor.BLUE + "Region");
worn temple
#
scoreboard.addRow(ChatColor.GRAY + "\\U29F0" + ChatColor.BLUE + "Region");
#

May need to remove one of the backslashes....

frigid ember
worn temple
#

That's what I figured would happen, not really sure why its not processing that. Unless Mc doesn't support unicode?

frigid ember
#
scoreboard.addRow(ChatColor.GRAY + "□" + ChatColor.BLUE + "Region");
worn temple
#

Ah, probably too new of a character

frigid ember
#

Do you know the one I pointed out earlier?

worn temple
#

Couldn't find it

fleet crane
#

I cant even see that character on discord

#

just a box for me

worn temple
#

it is a box

fleet crane
#

oh the diamond is the issue

worn temple
#

yee

fleet crane
#

@frigid ember shouldnt it be lowercase u

#

scoreboard.addRow(ChatColor.GRAY + "\u29F0" + ChatColor.BLUE + "Region");

#

dunno if it matters

subtle blade
#

It does afaik

fleet crane
#

and definitely single slash

worn temple
#

Actually, that may be it. because it should support those characters

#

yeah. lowercase single slash should work. I was just copying from the site which was using uppercase, that's on me

sleek ivy
#

what is Material.POTATOES supposed to be for? Material.POTATO is a potato

subtle blade
#

potatoes = crop, potato = item

sleek ivy
#

ok

subtle blade
#

Same difference as carrot vs carrots

#

or beetroot and beetroots

sleek ivy
#

ok thanks

frigid ember
#

does the essentialsX motd show up on join in 1.15?

keen compass
#

should really look at the events

#

?jd

worldly heathBOT
keen compass
#

playerjoinevent, then just get the player object send them a message when they join

frigid ember
#

im aware

#

did you even read my question?

worn temple
#

just configure EssX to show it or not

frigid ember
#

how do i configure it? (is it a command or do i need to go into the configs). also is it on by default?

worn temple
#

Go into the config. I don't know either way, and I don't think it matters what the default is. If you're asking those kinds of questions, you haven't even bothered to try it yourself. May as well attempt to do something before asking for help.

sick sleet
#

Is there a way to make an entity use it's walking animation? I'm fine with using NMS but would like to avoid packets.

worn temple
#

Packets.

sick sleet
#

bruh moment

keen compass
#

@frigid ember sorry mis-read your question, in the config there is an option to enable the motd

frigid ember
#

oh ok

#

which file

#

cant find it

woeful mural
worn temple
#

Check out bukkit's self cancelling task.

woeful mural
#

Do you know what it's called?

worn temple
#

?jd

worldly heathBOT
worn temple
#

Read the docs

woeful mural
#

How comes that the processId isn't initialized though? Am I not definig it on the first line?

#

Will do, thanks!

timid valley
#

um wasnt that an improvement in java 8, are you compiling at less than 8 maybe

woeful mural
#

I am compiling in 1.8, that's strange

frigid ember
#

I've developed a plugin that allows players to ride and control Ravagers. When riding, the player that is mounted to the Ravager cannot see the Ravager match the rotation of the player - it resets to a neutral position (possibly yaw and pitch 0,0.) However, when another player watches the player riding a Ravager, they can see the Ravager rotating just fine. I presume this is a packets issue but I have yet to figure out why this is happening. If you have any insight, I would greatly appreciate it. Thanks!

pastel fox
#

So Bukkit stops players from moving into solid blocks

#

How can I disable that for certain blocks?

fleet crane
#

@woeful mural suggest use BukkitRunnable instead

pastel fox
#

PlayerMoveEvent seems to not let me allow it

fleet crane
#

then can just call cancel() or whatever

woeful mural
#

Ah will look into, thanks!

nimble stump
#

@pastel fox that’s client side

pastel fox
#

@nimble stump nono, I send a fake block change to change the blocks to air- and then the server does noclip checks and still blocks players from going in

nimble stump
#

Ah

pastel fox
#

There's definitely some way of NMSing the function

nimble stump
#

That’s gonna be deep in the server logic

pastel fox
#

But I've found no threads on it so far

#

Yeah

nimble stump
#

You’re gonna have to do some bytecode manipulation or actually mod the spigot

#

There’s not gonna be an event for that

pastel fox
#

Yeah, I mean not bytecode I don't think?

#

I've hacked the permissions before to add wildcard support in my perm plugin

#

I just made a custom permissionsbase that extends the API one and injected it into the player

nimble stump
#

But there isn’t going to be an API injection you can do there

#

It’s gonna be hard coded in a method somewhere

pastel fox
#

Ah heck okay ty

#

In that case, annoying but I'll just set the actual blocks to air and send fake block changes to the players who can't pass through

#

I was hoping for an easy way to avoid that because I'll have to store and keep updating the original block data

barren abyss
#

Hi, i added some potion effects on creepers on spawn, but when they blowup they also leave a cloud of this effect on the floor and players can get them

pastel fox
#

@barren abyss tried listening on entity death event and removing the potion effects?

#
manager.addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Server.MAP_CHUNK) {
            @Override
            public void onPacketReceiving(PacketEvent e) {
                Player p = e.getPlayer();

Anyone know how to get the chunk coordinates?

#

It used to be e.read(0) and e.read(1) but that's not a thing anymore

barren abyss
raw basin
#

what is the point of removing potioneffects from a dead entity xd

torn robin
#

I think that’s the joke

#

@pastel fox I strongly recommend using PacketWrapper

barren abyss
#

How can I set weather to thunderstorm in spigot?

sturdy oar
#

from World

fleet crane
#

step 1)

#

?jd

worldly heathBOT
sturdy oar
#

setThundering or something like that

fleet crane
#

step 2) type thunder into the search bar

#

step 3) ?????

#

step 4) PROFIT

sturdy oar
#

Well imma go back to my Bible plugin' development ✝️

#

for my Minecraft Christian Server

fleet crane
#

praise be to jeebus

tiny dagger
#

you're becoming real christian don't you