#help-development

1 messages · Page 85 of 1

midnight patrol
#

is there a way for my plugin /enchant to override essential's command

delicate lynx
#

register the recipe correctly rather than doing that janky method

sterile token
#

Let me check it

tulip nimbus
#

But how do you register the recipe with ShapedRecipe class and support specific amounts in the ingredients is what he's asking

atomic swift
#

Can I use this to add to the config

snow lava
#

It's posible to do it with CraftItemEvent?

tulip nimbus
#

I dm'd you a kind of wacky solution for it using separate for loops to check the used and unused crafting grid slots, it can work for a simple craft like this which follows a nice pattern of identical ingredients in odd slots and air in even slots

#

But I also don't know how to make a ShapedRecipe with specific ingredient amounts and would like to see a solution like that too

hollow marten
#

I have a question: does a VehicleMovementEvent trigger if something like a minecart or boat is placed?

if not, i'd like to know which event would be most appropriate to attach an EventListener to for minecarts. I'm trying to create a rail crossing with a pressure plate in the center of 4 rails facing the plate, and I only want my code to trigger when a minecart is in proximity of a pressure plate. Basically, i want to make a pressure plate express the same sort of physics to a minecart that a straight rail does, but not restricting which cardinal direction makes the minecart think its on a rail.

atomic swift
onyx fjord
#

Docs probably say what to use instead

boreal python
#

would this get the level of knockback a stick has?
final var PlayersStickKnckbackAmount = item.getEnchantmentLevel(Enchantment.KNOCKBACK);

kind hatch
#

It's cause of the MaterialData parameter. There is likely a replacement method that takes the standard Material enum.

#

Sorry, I missed the context. Recipes ignore item amount. If you want a recipe that requires multiple items, you have to listen for certain craft events and check the item amounts yourself.

timid jetty
#

hey how do i make an item that I spawn in be at maximum combine cost (cant combine things anymore in anvil)

#

yes :)

boreal python
#

trying something else

terse raven
#

could you show me where you defined that

#

and maybe send the error?

#

item.getItemMeta().getEnchants().containsKey(Enchantment.KNOCKBACK);

and i think his getEnchantLevel usage should be correct aswell

worldly ingot
#

If you're just checking for one enchantment, item.getEnchantmentLevel()

terse raven
#

it just depends what he calls it on

terse raven
worldly ingot
#

Can you link me your forum account?

terse raven
worldly ingot
terse raven
#

Thank you!

worldly ingot
#

Well it most certainly works ;p

#

So if something isn't working, then it's because of a logic error

terse raven
#

yea they are only sending snippets

#

and not even sending the error

river oracle
#

wtf is foods.itemStacks

#

java conventions moment

dry forum
#

is there a way to have arguments for a command in different classes? i know just make a new command executor but im aussming thats not the best since itd be registered like 12 classes for the different arguments

river oracle
#

there are plenty of really good ones out there

#

Lamp, ACF, etc.

#

Brigadier even is really good if you get comadore with it

dry forum
#

they have features for arguments in dif classes?

river oracle
#

atleast lamps are same class but its cleaner to look at

#

really stops if statement hell as well

dry forum
#

ah alright ty

river oracle
#

I dont' know much about acf but i know its really good

#

as far as brigadier I have 0 clue I also know its good though

terse raven
#

else if (args[0].equalsIgnoreCase("ban")) { if (args.length == 2) { int sizeBanList = Main.getInstance().getConfig().getStringList("Ban-Definitive-Ban").size(); Main.getInstance().getConfig().getStringList("Ban.Definitive-Ban").set((sizeBanList), args[1]); Main.getInstance().saveConfig(); } }

#

should do the trick

terse raven
#

remove the error hopefully

golden turret
#

which event is fired first: PlayerInteractEvent or PlayerInteractAtEntityEvent?

drowsy helm
#

anyone know if ACF allows me register multiple commands under the same alias across multiple plugins

#

for example
plugin 1:
/test a
plugin 2:
/test b

tulip nimbus
#

PlayerInteractEvent, since PlayerInteractAtEntityEvent fires under more specific conditions. Can anyone else confirm?

tulip nimbus
#

Actually PlayerInteractEvent applies only to clicked objects (in the JavaDoc there is no way to get a clicked entity for this event), so it shouldn’t have anything to do with PlayerInteractEntityEvent or PlayerInteractAtEntityEvent.

golden turret
#

same for PlayerInteractEvent and EntityDamageByEntityEvent?

tulip nimbus
tawny otter
#

does the PlayerRespawnEvent run before or after the player respawns? (lets say I am giving a potion effect to a player when they respawn, it does not seem to work using PlayerRespawnEvent)

eternal oxide
#

runs before

#

the player only exists IN the respawn event

tawny otter
#

would there so happen to be an event or workaround for my situation?

eternal oxide
#

delay adding the effect

tawny otter
#

with a task?

undone ruin
#

quick question: how do I handle an interaction in chat to a plugin with bungee cord api TextComponent? (idiot example, every time I click a chat msg an int var sums 1)

mighty aurora
#

I got this error when compiling my plugin us.newrealms.timebounditems.EquipmentPacketProcessor is not abstract and does not override abstract method process(com.comphenix.protocol.events.PacketEvent) in us.newrealms.timebounditems.EquipmentPacketProcessor Does that just mean I need to set EquipmentPacketProcessor as a abstract class?

late sonnet
mighty aurora
marble copper
#

U r little kid

mighty aurora
#

But would adding abstract to the class change anything(I haven't really worked with abstract a whole lot).

#

Alright nevermind I just had done something wrong.

#

Thanks though

marble copper
#

Ok little kid

mighty aurora
#

When loading my plugin I get this error. I can't figure it out. Could not load 'plugins/TimeBoundItems-0.024Snapshot.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: Abnormal plugin type at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:87) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:153) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:411) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:319) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_19_R1.CraftServer.loadPlugins(CraftServer.java:421) ~[paper-1.19.jar:git-Paper-81] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:278) ~[paper-1.19.jar:git-Paper-81] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1122) ~[paper-1.19.jar:git-Paper-81] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:303) ~[paper-1.19.jar:git-Paper-81] at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: java.lang.InstantiationException: us.newrealms.timebounditems.TimeBoundItems at java.lang.Class.newInstance(Class.java:639) ~[?:?] at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:83) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?] ... 8 more Caused by: java.lang.NoSuchMethodException: us.newrealms.timebounditems.TimeBoundItems.<init>() at java.lang.Class.getConstructor0(Class.java:3585) ~[?:?] at java.lang.Class.newInstance(Class.java:626) ~[?:?] at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:83) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?] ... 8 more

boreal seal
#

But u must declare only one and other not as a command

undone axleBOT
mighty aurora
#

How will learning java help with that?

boreal seal
#

It will help

#

U can’t even understand a stacktrqxe

#

Idk how you like you programming

#

?learnjava

undone axleBOT
tranquil stump
#

How do I check if a block is inside a region? I've been trying for a bit but I can't seem to figure it out

#
    @EventHandler
    public void onBlockBreak(BlockBreakEvent e) {

        Block block = e.getBlock();
        Location blockLoc = block.getLocation();
        
        RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
        RegionQuery query = container.createQuery();
        ApplicableRegionSet set = query.getApplicableRegions(blockLoc);

    }
#

I have this but its saying blockLoc has to be a different type of location type

waxen plinth
#

There should be a method in BukkitAdapter to convert

tranquil stump
#

that fixed it

#

thanks

quaint mantle
# mighty aurora How will learning java help with that?

@boreal seal being toxic again, just ignore him. Learning java is more than just learning what certain things do, it also for people who know java to take refreshers on things. As humans we aren't perfect and sometimes things slip our mind or fall outside of our understanding. Things also change rapidly over the years. Being able to read a stacktrace is a very useful ability and while I'm not sure if the links in the bot cover stacktraces it is something I definitely recommend googling (or duck duck going if you prefer not to be tracked... Most of the time... Looking at you Bing...)

tranquil stump
#

i was gonna say he seemed to not be being very helpful..

mighty aurora
quaint mantle
#

While the XYProblem is a good thing to keep in mind, it's not the be all end all solution and doesn't warrant being rude.

mighty aurora
#

I do have another question though. I'm working with packets and I was using what ProtocolLib tells you to use to setup the initial packet listener and such but when I load my plugin it just throws NPE errors at me because my declaration(same as what the protocollib wiki says) is "null". If you need the error or to see my code I'll send that but I think I gave enough information.

mighty aurora
quaint mantle
#

I've never worked with ProtocalLib and so this is a question for somebody else.

mighty aurora
#

ok

river oracle
#

What version are you using

mighty aurora
#

1.19

river oracle
#

I actually don't reccomend using protocol lib

quaint mantle
#

I think he means of protocallib

river oracle
#

no I meant spigot

quaint mantle
#

Oh nvm I guess lol

river oracle
#

I have 2 good options protocol lib is overly verbose versus either Mapped NMS or PacketEvents by Retrooper

mighty aurora
#

Primary reason I used it was I couldn't find much of how I can learn how to do Packets and it was a plugin I knew

river oracle
#

imo best way to learn stuff is just fuck around with it till it works

mighty aurora
#

and most of the code I've created are written for ProtocolLib and I don't really want remake what I've already done unless its doesn't work.

#

because I'm not kidding ProtocolManager manager = ProtocolLibrary.getProtocolManager(); this is my initial declaration for the ProtocolLib stuff and in the error it gives me it says that results in null...

#

which doesn't make sense

river oracle
#

are you shading protocol lib

#

if so don't just put protocol lib in your plugins folder

#

then it should return fine

mighty aurora
#

It gives me the same error whether I have protocol lib on the server or not.

#

took a second cause I had to double check if that was true or not

mighty aurora
#

I got this error https://pastebin.com/ivhpHG4Q when loading my plugin. From what I read it's caused by ProtocolLib and when looking at ProtocolLib's common error page it says a common error is NoClassDefFoundError for BaseComponent and I don't think that matches my error but I want to make sure before I report it to them(No I can't update protocollib)

river oracle
#

did you make sure its not being shaded/shadowed in your maven/gradlew build

#

do the versions you're using match from pom/gradlew to plugin jar

mighty aurora
#

Yes, I think so, yes @river oracle

river oracle
#

I think so isn't really good enough class not found errors happen when the dependency isn't there or its shaded and their simultaniously

#

my assumption would be one of those two things would be happening

mighty aurora
#

So that error wouldn't be a protocollib issue?

river oracle
#

no

#

it'd be a you issue a good 100% of the time

mighty aurora
#

So its something I can/should fix not something to report.(sorry I'm not understanding what your saying.)

river oracle
#

yes its something you should fix on your end

#

not something you should report

leaden knot
#

I need some help

river oracle
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

river oracle
leaden knot
#

Okay thanks

mighty aurora
#

As far as I can tell I'm not shading protocolLib into my plugin and I know that protocol lib is their and that if I remove it it will cause problems.

mighty aurora
#

@river oracle ^(couldn't dm you)

river oracle
#

send me the name of the protocol lib jar in your server

mighty aurora
#

ProtocolLibdev1.19.jar (I added the dev1.19 so that I could keep my old protocollib version).

river oracle
#

having 2 protocllib versions in your server is going to be the issue

#

get rid of one

#

you have no choice its a either or

mighty aurora
#

I was meaning in my downloads

#

sorry

river oracle
#

what version of protocol lib did you download do you know?

mighty aurora
#

I only have one protocollib on my server

river oracle
#

looks like 4.8 is hte latest

#

yet your pom says 5.0.0

mighty aurora
#

because for 1.19 you are supposed to do dev versions

#

I did dev version #600 which is the latest

river oracle
#

hmmm I'm not sure tbh it'd be best to open an issue/go to their discord if they have one and ask

#

using dev builds you can always have issues i guess

#

even if you are doing something on your end they'd know more than me

mighty aurora
#

ok

ornate mantle
#

Caused by: java.lang.ClassNotFoundException: net.minecraft.server.level.ServerPlayer

#

bruh

#

shows no errors during compilation

#

or in the IDE

#

only shows this error when i try to run it in minecraft

quaint mantle
#

I've never used NMS, but doesn't the namespace typically include the server version? Are you using a library?

#

If so, is that library being shaded, or loaded as a plugin?

ornate mantle
#

im using a library

drowsy helm
#

not for mojang mappings

ornate mantle
#

which also happens to use nms

#
<dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.19.2-R0.1-SNAPSHOT</version>
            <classifier> remapped-mojang </classifier>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.nuggetmc</groupId>
            <artifactId>TerminatorPlus</artifactId>
            <version>3.2-BETA</version>
        </dependency>```
#

the second one is the library im using

quaint mantle
ornate mantle
#

i have no clue

#

doesnt say it anywhere

#

its a plugin

#

doesnt say how to load

quaint mantle
#

If it's a library it needs to either be shaded, or loaded as a plugin on the server. If the library itself isn't a plugin then it needs to be shaded

drowsy helm
#

if its a plugin you dont have to shade it

#

put it as scope provided

ornate mantle
#

alr

quaint mantle
#

Of your server

ornate mantle
#

aw

#

the library im using is local

#

its not hosted anywhere

#

idk if that means anything

#

cuz the creator didnt bother putting it up anywhere

drowsy helm
#

wdym local

ornate mantle
#

uhh

quaint mantle
#

Just slap their plugin in along side with your plugin on your server

ornate mantle
#

fuck uh

#

also heres another thing

#

oh nevermind

ornate mantle
#

was something like mvn install:installfile

quaint mantle
#

If they said it was a plugin, the same rule applies. You need to take their JAR file and put it in the plugins folder on your server

ornate mantle
#

same error 💀

#

why does it not show the error in compile time

quaint mantle
#

In your plugin.yml add their plugin as a dependency

#

It will ensure your plugin loads after theirs

ornate mantle
#

i dont think thats the error

#

Caused by: java.lang.NoClassDefFoundError: net/minecraft/server/level/ServerPlayer

quaint mantle
#

Can you paste the log?

ornate mantle
#

?paste

undone axleBOT
ornate mantle
#

this is what their docs say

quaint mantle
#

The full log, not just the stack trace. I want to see if your plugin is loading before or after theirs

ornate mantle
#

its not

#

ok wat

#

wait

#

i forgor to reupload

quaint mantle
#

Load order makes a difference. Their classes wont be available if their plugin isn't loaded first.

ornate mantle
#

[06:53:50 INFO]: Max TNT Explosions: 100
[06:53:50 INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms
[06:53:50 INFO]: [TerminatorPlus] Disabling TerminatorPlus v3.2-BETA
[06:53:50 INFO]: [NPCTest] Disabling NPCTest v1.0
[06:53:50 INFO]: Loaded 7 recipes
[06:53:51 INFO]: [TerminatorPlus] Loading TerminatorPlus v3.2-BETA
[06:53:51 INFO]: [NPCTest] Loading NPCTest v1.0
[06:53:51 INFO]: Server permissions file permissions.yml is empty, ignoring it
[06:53:51 INFO]: [TerminatorPlus] Enabling TerminatorPlus v3.2-BETA
[06:53:51 INFO]: [NPCTest] Enabling NPCTest v1.0

#

same exact error 💀

quaint mantle
#

Are you running /reload or actually restarting your server?

#

Because you shouldn't use /reload

ornate mantle
#

bruh

#

restarting rn

quaint mantle
#

That probably isn't the source of this error specifically, but it is bad practice.

quaint mantle
ornate mantle
#

class still not found

#

what

quaint mantle
#

Are you putting remapped mojang's jar file in your plugins folder

ornate mantle
#

im gonna guess no

quaint mantle
#

Because you should

ornate mantle
quaint mantle
ornate mantle
#

im putting the selected file

#

this is all that builds

quaint mantle
#

Download remapped-mojangs jar file and put it in the plugins folder

ornate mantle
#

what

#
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.19.2-R0.1-SNAPSHOT</version>
            <classifier>remapped-mojang</classifier>
            <scope>provided</scope>
        </dependency>```
#

this is remapped right?

quaint mantle
#

Yeah, but you need to download the jar file

#

From them

ornate mantle
#

im so confused rn

quaint mantle
#

Not from the maven repo, as that one is probably stripped

ornate mantle
#

i used buildtools for this

#

do i remove the repository tags

quaint mantle
#

Ah wait, I might be misunderstanding

#

Ok, so when you run buildtools, it generates a few jar files right?

#

One of those should be the server jar

#

You will need to use that as your server jar

ornate mantle
#

alright

#

lemme just

quaint mantle
#

I thought remapped mojang was a plugin, but it is actually a compile flag.

#

That was my mistake lol

ornate mantle
#

where the server at

quaint mantle
#

That's a good question, it is your server so I guess wherever you decided to host it?

ornate mantle
#

i mean the file 💀

#

which one would it be

#

theres tons

quaint mantle
#

Like, the built server?

#

Lemme double check

ornate mantle
#

no the server jar file

#

the one you told me to use

#

still tho

quaint mantle
#

It would be named something like spigot-1.19.jar but it may include -remapped mojang in the name

ornate mantle
#

oh alr

quaint mantle
#

Do not use api jars

ornate mantle
#

its in the maven repository right

#

the local one buildtools generates

quaint mantle
#

It is also on your system

#

In the folder that build tools runs

ornate mantle
#

literally what i just said

#

but worded slightly different

quaint mantle
#

Yeah, but you can get the jar file using your file explorer

#

You don't need to worry about it being in the maven repository at this current moment. You just need the jar file to replace your server jar.

ornate mantle
#

-remapped-obf.jar

#

-remapped-mojang.jar

#

and a regular one

quaint mantle
#

-remapped-mojang.jar I would use

ornate mantle
#

aight

#

server crash :D

#

doesnt even start

quaint mantle
#

Time to look at the log then

#

latest.log

ornate mantle
#

no

river oracle
ornate mantle
#

it doesnt start

ornate mantle
#

its almost as if im using the exact same mojang mappings that are on every single google search

quaint mantle
ornate mantle
#

last i used nms on a project

#

it showed 4 files

river oracle
#

I offered you help and a direction if you don't want it just fuck off and ignore me

ornate mantle
#

💀

quaint mantle
#

I mostly just use paper these days

ornate mantle
#

my bad

river oracle
quaint mantle
#

Seems like it lol

river oracle
#

its ingrained in my brain now though lol

#

will never forget java -jar BuildTools.jar --remapped

#

I use it way to much xD

ornate mantle
#

--rev for version

quaint mantle
#

Luckily for me, my plugins are more on the simple side and don't need this

river oracle
#

yea I don't use NMS much either

#

mostly use it to decompile and screw around for a couple hours here or there

quaint mantle
#

It's fun to see how much damage you can do to the games you love

desert frigate
#

The Item#owner is the person who first picked up the item right?

#

Like it will never change unless specifically changed

vocal cloud
noble forge
river oracle
#

I'm not quite sure you'd have to test that out I'd assume it'd just be whoever held it last

vocal cloud
#

Sets the owner of this item. Other entities will not be able to pickup this item when an owner is set.

river oracle
#

ahh there is a setOwner smart guy

#

you're a genius "MikeTheshadow"

vocal cloud
#

Mike - Read The Docs - Shadow

river oracle
#

I was on the same docs page difference was you can read

#

I can't

fluid cypress
#

can i somehow change the last location of a disconnected player? without tricks like teleporting them immediately the next time they connect or something like that. is there some entity in the world that represents the last known location?

ornate mantle
#

oh my lord

#

i forgot to write the plugin thing

#

works

#

💀

river oracle
#

they wouldn't feel any effects as they are leaving either

desert frigate
#

Is it possible to check if the item was previously picked up before

river oracle
#

apply this to the item on first pickup and follow through with logic on corosponding events

desert frigate
#

basically I'm trying to make a collection system so people can't just drop it and pick it up again lol

fluid cypress
#

Idk, if its too hard or i need to use nms or something, i gues ill just teleport them once on the first login after that

#

Tho i would prefer to avoid the need to keep a plugin forever just for that

river oracle
# fluid cypress Cant do that, you see, what im doing is moving an entire city along the y axis, ...

okay this is pretty much all 100% theory, but on leave store the players uuid in a list on join remove it. This way you don't have repeats in the list. When you go to move the city trigger the runnable while the city movement code is executing that reads off the player UUIDs into an OfflinePlayer object now that you have the OfflinePlayer object you should beable to modify their NBT spawn data with your new locations. This should allow a clean transition on next spawn

fluid cypress
#

So, basically, if i have the uuid, i can get an offline player object, in which i can set the location

river oracle
#

granted you need to know the NBT tags to set thats where I can't help you anymore

#

but its somewhere in there likely

fluid cypress
#

Will essentials interfere with that?

river oracle
#

depends on what you have essentials doing

#

if it spawns the player at X location every join yes

#

otherwise no

#

Writing to the NBT is writing directly to the player's data file

fluid cypress
#

players appear where they left so, i dont think i have any plugin touching that, not even essentials

#

So ill try that, thanks

river oracle
#

You might have to do some try and see with the NBT tags to see what they all are I couldn't find any resources on what the OfflinePlayer NBT contains

#

but I'd assume there is something in there regarding spawn location

final monolith
#

The

Entity#remove()

method didn't works at the onDisable?

boreal seal
#

Lmao

#

Just that guy should go to help in plugins section

#

And use skript 😂😂😂😂🥴

iron glade
river oracle
iron glade
#

How are you guys handling permissions in your plugins? Like, if I have one permission needed for several things I don't wanna write it over and over again, are you saving them into some string variables, etc? Would be interesting to know

agile anvil
river oracle
#

You could also use enums

agile anvil
iron glade
iron glade
iron glade
agile anvil
#

So /command test and /command yo are 2 different commands for me

iron glade
#

yeah, makes sense! that's cool

#

how do you handle that in events when there is no command?

agile anvil
#

But I usually like to create a method to checkPermission, and automatically: return, send a message, etc

iron glade
#

Thanks for the insight :)

rough drift
#

to collect everything within "" should I use indexOf or a for-i loop

ebon axle
#

Hey guys I've got a problem with a plugin I'm trying to do
I'm totally new in the matter and every time I'm importing something an error occurs saying that "org.bukkit.(whatever) is accessible from more than one module: org.bukkit and org.api"
does anyone know how to solve that?

granite burrow
#

hey why does Player#teleport(location) spam console with "Player moved too quickly! (coords)"

kindred valley
granite burrow
#

It’s on my test server, no anti cheat, or any other plugins that should cause that

kindred valley
#

Yeah prolly spigots own

#

But i dont have an information

#

Dont have an opinion but try this

reef lagoon
#

how would I go about doing so?

#

nevermind, I think I got it, thanks

granite burrow
# kindred valley

This would most likely work, however, I’d like to not mess with the game rules. especially since I plan to release the plug-in to the public, and they might want the gamerule on

old cloud
worn tundra
granite burrow
old cloud
#

But if it’s performing well then it’s probably not the issue

granite burrow
#

Ah yeah, not it performs pretty well, I give it like 8gb of my system memory to make sure lag isn’t an issue on my test server

old cloud
# final monolith any help?

I had this issue a while ago and iirc there is no way to guarantee that the entity is being removed in the onDisable.

#

I always removed it after the server startup

#

onDisable is so your plugin can clean up after itself, not make changes to the world

tender shard
# final monolith any help?

iirc remove() only "marks" the entity for removal on the next tick or so. I'd simply apply a PDC tag to the entity like "myplugin:tokill" -> (byte) 1.

Then listen to EntitiesLoadEvent, check if any of the entities has this PDC tag, and if yes, remove() it then

grim ice
#

even if you learn java

#

you need to pretty much learn the meanings of all the exceptions, except if they're self explanatory

tender shard
tender shard
# final monolith Thats amazing

note that your plugin needs to be enabled on STARTUP and not POSTWORLD, otherwise you cannot listen to the EntitiesLoadEvent in the spawn chunks

#

although you could of course also just loop over all already loaded entities in onEnable()

#

both would work

quasi flint
#

tho second would be slower maybe

tender shard
#

yeah maybe 0.02 seconds

#

and it's only in onEnable, when no player is online anyway

opal juniper
#

unless they /reload

golden turret
#

/plugman reload 🤡 💀

final monolith
#

what version the nmsentity.setNoGravity(true) method has implemented?

#

1.12?

agile anvil
#

I thought it was before. Cause you can set no gravity to an Armorstand in 1.8

final monolith
#

1.8.8 doesn't have this method

grim ice
#

so um, I had this bug with minecraft where any versions 1.18 and above would freeze every 1 second, meaning the graph would be some thing like this:
300 -> 1 - 250 -> 1..etc
so well i used some jvm args i got recommended which ill send later,
and that fixed it, however after 3 days the bug is back, but i realized something, when the bug was fixed i had 2gb allocated and it was using 2.7gb, but when the bug still existed it was using 2gb flat, so i thought maybe that was the problem, i just tried allocating 3gb or 4gb and no luck.
the jvm args are here: https://pastebin.com/3mK9yZFf

manic furnace
#

How can I add an enchantment to an block (without nms)?

agile anvil
#

A block ??

#

Do you mean the item in the inventory of a block ?

manic furnace
quaint mantle
#

Enchanted beacon

agile anvil
#

I'll enchant my door protect 4 so zombies won't pass

quaint mantle
#

Bru what about curse of vanishing on a block

manic furnace
#

I get his error:

java.lang.IllegalArgumentException: Specified enchantment cannot be applied to this itemstack
undone axleBOT
manic furnace
#

Better?

agile anvil
#

Lmao

manic furnace
#

oh

agile anvil
#

addUnsafeEnchant

quaint mantle
#

You can't apply each enchantment on all items

manic furnace
#

The glint isn't there

agile anvil
#

?paste

undone axleBOT
agile anvil
#

Version ?

manic furnace
#

api 1.13, server 1.19

hard socket
#

is the 1.19 |1.18 |1.17 R3?

misty ingot
#

would it be possible to say, have a crafting recipe require a potion (the potion can be of any type) and the attributes of the item given from the recipe depend upon the effects the given potion has?

agile anvil
golden turret
agile anvil
golden turret
#

you can

misty ingot
#

if you code enough, anything is possible

golden turret
#

if something is "impossible" then write a mod

reef lagoon
#

if it's impossible then make it possible

agile anvil
reef lagoon
misty ingot
#

I wanted to make some sort of tinted potion item

#

which would hide what effect the potion has

golden turret
#

you can listen to PrepareItemCraftEvent

#

or something like this

misty ingot
#

could I make a shaped recipe with it tho

#

which also changes the outcome depending on potion

golden turret
#

if you want only to hide the effects, you cann listen the event and add an ItemFlag to the result

misty ingot
#

also wanna change color

golden turret
#

also listen the event and apply the color

misty ingot
#

wait a minute

#

if the crafting recipe doesnt exist and the player doesnt actually technically craft the item what do I run the event for

heady spruce
#

how can i prevent a player from eating / start eating?

grim ice
#

too bad it's client side

golden turret
#

so the recipe will listen for every potion

green prism
#

Hello, I am developing a CustomSkullGetter method and this is the result. The only problem is that Legacy Item is initialized and causes a Thread break for about 5 seconds.
Can you give me a solid alternative/advice or help please?

   public static ItemStack getSkullHead(final String val, final String name, final List<String> lore) {
        final ItemStack head = new ItemStack(Material.LEGACY_SKULL_ITEM, 1, (short) 3);
        if (!val.isEmpty()) {
            final SkullMeta skullMeta = (SkullMeta) head.getItemMeta();
            final GameProfile gameProfile = new GameProfile(UUID.randomUUID(), null);
            gameProfile.getProperties().put("textures", new Property("textures", translateValue(val)));
            try {
                final Field profileField = skullMeta.getClass().getDeclaredField("profile");
                profileField.setAccessible(true);
                profileField.set(skullMeta, gameProfile);
            } catch (IllegalArgumentException | NoSuchFieldException | SecurityException | IllegalAccessException ex3) {
                ex3.printStackTrace();
            }
            skullMeta.setDisplayName(name);
            skullMeta.setLore(lore);
            head.setItemMeta(skullMeta);
        }
        return head;
    }```
young knoll
#

Don’t use the legacy item?

reef lagoon
#

how do I get a circle around a player
place blocks in a circle or play particles or whatever

green prism
kind hatch
#

It will. That method still works for 1.18+

green prism
kind hatch
#

Just use the PLAYER_HEAD instead.

green prism
#

It is only legacy

green prism
kind hatch
#

No, as those are magic values that are no longer needed post 1.13

green prism
#

Fixed, thank you bro

vivid skiff
drowsy helm
vivid skiff
# drowsy helm show your code
    public static ItemStack getHandCuff() {
        ItemStack item = new ItemStack(Material.STICK);
        ItemMeta meta = item.getItemMeta();
        meta.setDisplayName("§7§lManette");
        item.setItemMeta(meta);
        NBTItem nbtItem = new NBTItem(item);
        nbtItem.setString("handcuff", "handcuff");
        nbtItem.applyNBT(item);

        return item;
    }```
grim ice
#

so um, I had this bug with minecraft where any versions 1.18 and above would freeze every 1 second, meaning the graph would be some thing like this:
300 -> 1 - 250 -> 1..etc
so well i used some jvm args i got recommended which ill send later,
and that fixed it, however after 3 days the bug is back, but i realized something, when the bug was fixed i had 2gb allocated and it was using 2.7gb, but when the bug still existed it was using 2gb flat, so i thought maybe that was the problem, i just tried allocating 3gb or 4gb and no luck.
the jvm args are here: https://pastebin.com/3mK9yZFf

eternal oxide
eternal oxide
#

it says the method you are trying to call does not exist

#

getHandCuff

#

is it in a different jar or something?

vivid skiff
reef lagoon
#

calculus?

golden turret
#

yes

reef lagoon
#

hahahai hatem ylife

#

can you give me a general idea

#

not code, just what I need to do

golden turret
#

go to google and search for

#

circle math

kindred valley
eternal night
#

whatever scuffed version of a server software you are using is failing to connect to some api/website

grim ice
#

so um, I had this bug with minecraft where any versions 1.18 and above would freeze every 1 second, meaning the graph would be some thing like this:
300 -> 1 - 250 -> 1..etc
so well i used some jvm args i got recommended which ill send later,
and that fixed it, however after 3 days the bug is back, but i realized something, when the bug was fixed i had 2gb allocated and it was using 2.7gb, but when the bug still existed it was using 2gb flat, so i thought maybe that was the problem, i just tried allocating 3gb or 4gb and no luck.
the jvm args are here: https://pastebin.com/3mK9yZFf

kindred valley
eternal night
#

whatever that is is neither papermc nor spigot

marble copper
#

dude i just download skin restorer plugin and it doesnt show in the plugin files
but i can use the plugin

eternal night
#

Neither spigot or paper contain a obfuscated Updater class

eternal night
hazy parrot
eternal night
#

love it

#

malware 🙏

mighty aurora
#

Is their a way without building an AI system that I could create an iron golem that would be like a village golem except towards a specific player?

vocal cloud
#

Probably

grim ice
#

bro i literally have a problem

#

no one has ever had

#

how unlucky can i be

vocal cloud
#

x to doubt moment

eternal night
grim ice
#

asked on 9 servers daily

#

no one knows what the problem is

vocal cloud
#

For what

grim ice
#

so um, I had this bug with minecraft where any versions 1.18 and above would freeze every 1 second, meaning the graph would be some thing like this:
300 -> 1 - 250 -> 1..etc
so well i used some jvm args i got recommended which ill send later,
and that fixed it, however after 3 days the bug is back, but i realized something, when the bug was fixed i had 2gb allocated and it was using 2.7gb, but when the bug still existed it was using 2gb flat, so i thought maybe that was the problem, i just tried allocating 3gb or 4gb and no luck.
the jvm args are here: https://pastebin.com/3mK9yZFf

#

its client side btw

#

i tried using default jvm args

#

and removed the Xms flag since some people suspected that

#

updated java

#

reinstalled minecraft

#

restarted pc 10 times

#

reinstalled java runtime

dim palm
vocal cloud
#

Haven't tried using a different version of java?

grim ice
#

i did

#

i was using jre 8

#

now im using 17

#

and i even changed the provider

vocal cloud
#

What graphics card do you use?

grim ice
#

an integrated one

#

though i doubt thats why

vocal cloud
#

AMD?

grim ice
#

no, intel

dim palm
vocal cloud
#

They used to didn't they?

grim ice
#

i doubt you can come up with a solution with a few questions

#

i asked a few dozen people, none of them knew

#

minecraft support isnt responding either

#

i asked in minecraft discord server too btw

vocal cloud
#

Is this only with the latest version of the game?

grim ice
#

only with versions 1.18 and above

#

1.17.1 works completely fine

vocal cloud
#

gotta use these

-Xms4G -Xmx4G -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-OmitStackTraceInFastThrow -XX:+ShowCodeDetailsInExceptionMessages -XX:+DisableExplicitGC -XX:-UseParallelGC -XX:-UseParallelOldGC -XX:+PerfDisableSharedMem -XX:+UseZGC -XX:-ZUncommit -XX:ZUncommitDelay=300 -XX:ZCollectionInterval=5 -XX:ZAllocationSpikeTolerance=2.0 -XX:+AlwaysPreTouch -XX:+UseTransparentHugePages -XX:LargePageSizeInBytes=2M -XX:+UseLargePages -XX:+ParallelRefProcEnabled
``` ![KEKLEO](https://cdn.discordapp.com/emojis/929143984947884102.webp?size=128 "KEKLEO")
grim ice
#

okay

#

a second imma try that

vocal cloud
#

It's a meme but you can try it anyways

grim ice
#

though idk if thats good since ur forcing it to use 4gb

grim ice
vocal cloud
grim ice
#

welp i already tried a dozen other solutions

fringe hemlock
#

Are your graphics drivers up to date

grim ice
#

another one wont matter

grim ice
vocal cloud
#

It's a different garbage collector than what your args use

grim ice
#

game didnt launch

vocal cloud
grim ice
#

literally crashed

#

instantly

vocal cloud
#

Make sure you're using java 17

grim ice
#

exit code 1

echo basalt
#

mojang moment

grim ice
#

says im using java 17

echo basalt
#

minecraft has its own java builtin

fringe hemlock
#

True

grim ice
#

ill make it use mine

#

"C:\Program Files\Zulu\zulu-17-jre\bin\javaw.exe"

vocal cloud
#
-Xms4g -Xmx4g -XX:+UseShenandoahGC -XX:+AggressiveOpts -XX:+UnlockExperimentalVMOptions -XX:+AlwaysPreTouch -XX:+UseStringDeduplication -Dfml.ignorePatchDiscrepancies=true -Dfml.ignoreInvalidMinecraftCertificates=true -XX:-OmitStackTraceInFastThrow -XX:+OptimizeStringConcat -Dfml.readTimeout=180 -XX:+UseFastAccessorMethods

You can try Shenandoah too if you want

grim ice
#

imma point the java executable to

#

C:\Program Files\Zulu\zulu-17-jre\bin\javaw.exe

yeah it didnt change anything

vocal cloud
#

zulu damn you really are desperate

grim ice
#

i am

fringe hemlock
#

If nothing works you might as well just sell your pc and buy some skittles and coffee and hop on pocket edition

grim ice
#

but shouldnt it be

#

4G not 4g

vocal cloud
#

case doesn't matter

grim ice
quaint mantle
#

case doesn't matter

vocal cloud
#

I believe you need OpenJDK to use it

grim ice
vocal cloud
#

I'll test something brb

fringe hemlock
#

Are you launching optifine

grim ice
#

yes

vocal cloud
#

I assume vanilla gives the same issue

echo basalt
#

just nuke your installation

#

reinstall everything

#

make a windows vm to play minecraft

fringe hemlock
#

Doesn’t optifine have a autosave setting in settings?

grim ice
vocal cloud
#

The first thing I sent works with the openJDK 17 microsoft build

#

It's uh, something lol

grim ice
#

so i should get openjdk 17

vocal cloud
fringe hemlock
#

Everything I’m finding says it’s something to do with optifine but if it’s doing it without optifine then I’m at a loss for words

vocal cloud
#

case insensitive

echo basalt
#

quick question

#

do you have enough disk space 👀

#

could be something tripping with cache files

grim ice
#

300gb surely is enough for minecraft

fringe hemlock
#

You are using 64 bit Java right

grim ice
#

yes..

#

i just updated my drivers

#

since there was an update

#

imma try again now

#

idk if i should restart since it didnt tell me to

#

and if it didnt tell me to restart

#

then its probably not something that matters

#

so im doubting if that would fix it

vocal cloud
#

I can get Shenandoah working on OpenJDK 17 so if you have it you can try -XX:+UseShenandoahGC as an extra arg

grim ice
#

imma get openjdk 17 jre if this doesnt work

torn shuttle
#

is it possibly to only show certain mobs to certain players using only the spigot api (no nms)?

grim ice
#

ok it didnt fix it imma get openjdk jre 17

vocal cloud
#

I get 40fps in 1.19. Something about the update sucks for my PC

grim ice
#

ok how do i do this

vocal cloud
#

Install openjdk make sure it's not oracles openjdk then add the Shenandoah arg

grim ice
#

how to install the open jdk thats not oracle's

#

do you have a link? since all im seeing is jdks

vocal cloud
#

Oh I downloaded a Microsoft build of it

grim ice
#

i use windows

vocal cloud
#

Yeah I got the jdk cause I'm lazy

#

Extracted it into my already thicc java folder and then set my MC to it

grim ice
#

so uh do u have a link

#

to where i can get it

torn shuttle
#

does all of your stuff also get posted by random chinese users on mcbbs?

#

or is this just me?

#

it just keeps happening

vocal cloud
#

Yeah my Mod is bigger there than in English last time I checked

#

They event used machine translation to create a translation

torn shuttle
#

yeah same

#

ended up adding a whole-ass translation system for them

vocal cloud
#

The comments are always a joy to read

torn shuttle
#

yeah pretty funny

#

the website itself is pure cancer though

vocal cloud
grim ice
#

imma download this then

#

but this is a jdk

#

dont i need a jre

vocal cloud
#

You can run things with the jdk

#

I use jdk for everything kekw

grim ice
#

C:\Program Files\Microsoft\jdk-17.0.4.101-hotspot\bin\javaw.exe

#

ok

iron glade
#

Just a question, why u 2 don't create a thread

grim ice
#

because no one else is using the channel

vocal cloud
grim ice
#

and we started talking before anyone came

#

if u want to talk, YOU make the thread

#

because we came here first pretty much

iron glade
#

yea just saying threads exist

grim ice
#

with microsoft

#

openjdk

#

i got a crash

#

wow

vocal cloud
#

I only got the Shenandoah enabled

vocal cloud
#

The default args that is

grim ice
#

ok an exception occured

#

on start

#

i love my life

#

-XX:+UseShenandoahGC

#

so i append this

#

to the default args

vocal cloud
#

That's what I did

grim ice
#

it crashed

vocal cloud
#

-Xms3G -Xmx3G -XX:+UseShenandoahGC

grim ice
#

thats all you use?

vocal cloud
#

It works with that

#

You'd have to add more args slowly to see what works.

#

I haven't slept in 24 hours I'm not exactly present

grim ice
#

ok it didnt crash on start

#

thats progress

iron glade
#

There's a website leaking premium plugins tf

vocal cloud
#

plenty of those around

#

First Time?

iron glade
#

that's kinda sad

grim ice
#

ok

#

didnt change shit

vocal cloud
#

Ah well. 1.18+ is a lag fest so guess you gotta wait and see

flint coyote
#

you can't do a static access to hasPermission

#

move the declaration of your player variable before the if

#

and then use it

iron glade
#

CTRL + L & CTRL + O is love

zealous osprey
#

^^

bronze solar
#

Does anyone have an idea as to why this code isn't working, it never changes anything in the file, the file is always empty?

#

The "createFile" method is called in the onEnable method, of course.

chrome beacon
#

That's a mess

#

?configs

undone axleBOT
chrome beacon
#

^^

waxen plinth
#

It saves and then loads

#

If you start with an empty config, and try to load from disk by calling reload, which saves first, what's going to happen?

#

It saves the empty config, overwriting anything that was in the file, then loads those same values

#

As in, no values, because it's empty

bronze solar
#

I know, I tried without the save() method, but it still did not add any values.

waxen plinth
#

Do you specify any?

#

I see you adding defaults, which aren't the same

#

Defaults are in-memory, they just set what will be returned for a key if it hasn't been explicitly set

#

They don't actually set values that will be saved

#

If you want that, call saveDefaults

bronze solar
#

I don't see any "saveDefaults" method in the code, and neither in the JavaDocs.

waxen plinth
#

Plugin#saveDefaultConfig

bronze solar
#

I tried using copyDefaults, set, and addDefault, but none worked.

bronze solar
waxen plinth
#

Maybe, not sure

#

I haven't used the regular config API in a long time

grim ice
#

so um, I had this bug with minecraft where any versions 1.18 and above would freeze every 1 second, meaning the graph would be some thing like this:
300 -> 1 - 250 -> 1..etc
so well i used some jvm args i got recommended which ill send later,
and that fixed it, however after 3 days the bug is back, but i realized something, when the bug was fixed i had 2gb allocated and it was using 2.7gb, but when the bug still existed it was using 2gb flat, so i thought maybe that was the problem, i just tried allocating 3gb or 4gb and no luck.
the jvm args are here: https://pastebin.com/3mK9yZFf

gray merlin
#

It seems that when I use this.player.getInventory().getContents().clone(); it clones the inventory but forgets how many of each item are in it. Is there a way to make a shallow copy of the inventory, keeping the contents?

grim ice
#

this is client side btw

grim ice
#

its client side

waxen plinth
#

Well this is spigot plugin development support

bronze solar
#

Poor Redempt, we're all torturing him, lol.

waxen plinth
#

😔

grim ice
#

this is the most active coding server related to minecraft

waxen plinth
#

The max pause is 200ms

grim ice
#

i used default jvm args

#

no luck

waxen plinth
#

I would remove everything after experimental VM options

#

Set max pause to 30ms

grim ice
#

just xms 3gb xmx 3gb sheondan gc

bronze solar
#

I tried using saveDefaultConfig and saveResource, none worked, I guess I'm just gonna use some other config library, probably BoostedYAML or RedLib (wonder who made that second one).

grim ice
#

-Xms2G -Xmx2G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=30 -XX:+UnlockExperimentalVMOptions

waxen plinth
#

Milan, I have a config library you can use if you want

grim ice
#

so this?

#

ok

waxen plinth
#

2G could be too low

grim ice
#

yeah ill do 3gb or 4

waxen plinth
#

Go for 4 I'd say

bronze solar
waxen plinth
#

Oh well that works out perfectly lol

glass inlet
#

Anyone knows how would I go about removing the 1/2 players sleeping message when going to sleep?

waxen plinth
#

That's from a plugin

glass inlet
#

no the new versions

waxen plinth
#

Not sure then

glass inlet
#

1.18+ I think

#

or even 17

waxen plinth
#

Read carefully

#

Because a lot of people misunderstand how the target function works

bronze solar
#

I will, thanks!

waxen plinth
#

👍

#

You can ping or DM me if you have any questions

grim ice
#

and it didnt fix

#

aanything

waxen plinth
#

Maybe you need a profiler

#

That kind of issue usually suggests something is going on with gc but that might not be the case

grim ice
waxen plinth
#

A profiler gets a breakdown of what's using the most CPU time

#

VisualVM is a good free one

hard socket
#

why craftbukkit doesnt work?

#

I built it with buildtools

chrome beacon
#

Use Spigot

hard socket
#

I need nms

chrome beacon
#

Spigot has nms

ashen quest
#

what type of event should I listen for tree growth, basically i am making an evil plugin

y'all must know the annoying oak tree (the tall one thats hard to cut down)

I m makin a plugin that will make every single oak tree into an annoying one

(when the world renders, its not like its gonna loop through all trees and turn them, it will just change when one is gonna spawn)

waxen plinth
quiet ice
hard socket
#

how do I import it?

chrome beacon
#

It does

grim ice
waxen plinth
#

Use spigot, not spigot-api

quiet ice
#

spigot has nms, spigot-api does not have nms

waxen plinth
#

But also why are you using nms

hard socket
#

to use multiple versions

quiet ice
#

FUUUUUU

chrome beacon
#

.-.

#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

chrome beacon
#

Get ready for pain

hard socket
#

I just got to 1.13+ in nms

#

I usually work with 1.8

quiet ice
#

A lot of nms-only stuff on 1.8 can be replicated through API on 1.18

#

Considering that you are either using JDT or IJ's cursed build system it shouldn't be too hard to adapt unless you went extra cursed

grim ice
#

ok i downloaded visual vm

#

now do i just start mc

quiet ice
#

If you have that disable attach mechanism JVM flag, remove it - otherwise yes

quiet ice
#

Prevents remote debugging

grim ice
#

is that jvm flag in mc

quiet ice
#

Well it can be applied for any JVM instance, but in this case it would be mc yes

#

If you are unsure whether you have it, just run mc and check

grim ice
#

-Xms4G -Xmx4G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=30 -XX:+UnlockExperimentalVMOptions

#

these are my mc jvm args

quiet ice
#

Should work then

paper crest
#

ClickEvent.Action.RUN_COMMAND not work anymore on 1.19.2?

quiet ice
#

Using adventure?

waxen plinth
#

Show code

quiet ice
#

Because if you use adventure-plattform-bukkit you might need to update it to the latest version. The reason for this is that the client refuses to run the command because the command is not signed

waxen plinth
#

"not working" tells us nothing

quiet ice
#

The client refuses to run it

waxen plinth
#

Oh that's weird

quiet ice
#

I am 100% sure that that is the issue because a lot of plugins broke with that exact issue with the 1.19.2 update

waxen plinth
#

Why didn't spigot just make it sign the command

quiet ice
waxen plinth
#

I don't really understand the point of it over just encrypting the entire connection

#

Oh right, moderation

#

So how does that work?

quiet ice
waxen plinth
#

When you run the command, is it still using the one that was signed by the server?

grim ice
#

ok i ran visualvm

#

and started mc

#

but whats the point of this

waxen plinth
#

Attach VisualVM to Minecraft

#

Go to the sampler

grim ice
#

then?

#

i think it auto attached cuz it says

#

net.minecraft.launchwrapper.Launch

waxen plinth
grim ice
#

okay but

#

whats the purpose of this lol

waxen plinth
#

Figure out what's causing the freezes

grim ice
#

ah yes

#

throw me on an app ive never used before

#

and i have to magically figure out whats causing the freezes

#

well ill try to eitherway

#

thanks for the recommendation

waxen plinth
#

You just have to look through the call hierarchy and see if anything seems to be using an unreasonable amount of cpu time

green prism
#

How can I make my 1.16.5 plugin compatible with every version from 1.13 to 1.18+

vivid skiff
#

How can i give a item to a specified player when it quits, for example, i click on a player with a stick and when this player quits i get back a grassblock

green prism
# vivid skiff How can i give a item to a specified player when it quits, for example, i click ...

I would create a hashmap with a SimpleEntry inside (Containing the sender of the action and the desired block) and as another hashmap value I would put who suffered the action. At quit, thanks to a listener, you control the hashmap and if it contains the X (PlayerUUID) key, it gets the sender of the action and gives them the block.

Something like that: java HashMap<UUID, AbstractMap.SimpleEntry<UUID, String>>

waxen plinth
#

I wish Java had a standard library pair type

#

Though nowadays I guess you could just public record Pair<K, V>(K first, V second) {}

vivid skiff
#

sooo, if you can give me a better example idk

grim ice
#

these are the methods that took a shit ton of cpu time and the cpu time increased dramatically whenever the freeze (every second or two) happened:

in thread io worker 7:

  • org.lwjgl.system.JNI.invokePP[native] () 152,514 ms (100%) 152,514 ms (100%)

in rendering thread:

  • com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS () 159,371 ms (40.4%) 159,371 ms (40.4%)

  • org.lwjgl.system.JNI.invokePPV[native] () 241,926 ms (50.1%) 241,926 ms (50.1%)

#

@waxen plinth

#

idk wtf they do though

quiet ice
#

What happens if you let the game render as many frames as it wishes? (i.e. you disable the FPS limiter)

grim ice
#

but i have my fps maximum set to unlimited

quiet ice
#

hm, interesting

green prism
#

Ive a question for you

quiet ice
#

I'm intrigued

green prism
#

okay but, thats a secret

#

okay?

echo basalt
#

invokePP hehehehehehe pp

quiet ice
#

Oh god

green prism
#

how can I make my.... secret plugin... compatible with every version 1.13+ (it is 1.16 rn)

#

no words with others!!

#

sshh

quiet ice
#

what the hell is going on ...

green prism
#

shh! keep your voice down!

dusk flicker
#

either 5 or a troll

quiet ice
#

I aint going to respond to that

#

That is defo a bait, not idea how, but either way you played your cards wrong there

green prism
#

sshhh

quiet ice
charred blaze
#

two of my server's players cant ping my server

#

it started today

green prism
#

no im sorry lmao

quiet ice
#

But they still can connect?

charred blaze
dusk flicker
quiet ice
green prism
#

Is a 1.16 plugin compatible with 1.17?

#

it's compiled in java 16

ancient plank
quiet ice
#

^

green prism
#

Im serious about that

glossy venture
#

lmao

quiet ice
#

What I gave you is far too much already

#

One cannot learn the dark magic of Mass ASM without experiencing much pain

green prism
#

I... I

#

I think I’ll change job

green prism
#

ahha

glossy venture
green prism
glossy venture
#

i dont know if its possible to run a 1.13 server on java 16 though

grim ice
#

man

glossy venture
#

and any later versions (1.19 requires java 17 i think) wont work

quiet ice
#

There were days where all minecraft modders were Wizards capable of mastering that dark magic, but after they built a bright future with their crafts, others flocked in. They were incapable of mastering the dark arts, but still they existed for they stood on the shoulders of giants. The Wizards meanwhile retreated to the darkest corners of the modding communities, rarely to be seen on discord - for their den was (and still is) IRC

grim ice
#

this is so impossible

quiet ice
#

It is quite possible through mass ASM

grim ice
#

wdym

glossy venture
#

how did you get ASM access on bukkit

quiet ice
#

Just lower the version flag, and transform anything that would be invalid

grim ice
#

what r u talking about

quiet ice
#

And bukkit only allows you to transform raw byte arrays, so you can use your own ASM version

glossy venture
#

ah yes of course MethodHandles.Lookup has a method to define a class

#

bruh what the hell bruh

quiet ice
#

It should be noted that this only works to transform plugin classes and only works on 1.13+ (I.e the versions where commodore is used)

#

Actually, could be that it is used earlier than that. Whatever - it isn't too old

ornate mantle
#

how do i remove soap from my power cord

#

it stopped the power in the house once

#

if i plug my charger in again it might do it again

eternal oxide
#

plug it in, it will dry out once it stops burning

twilit roost
#

I have 4 random locations
but some of them are outside WorldBorder so I tried doing this:

        while(!border.isInside(randomUL)){
          randomUL.add(randomUL.subtract(center).toVector());
        }

but it always goes to -Infinity -Infinity -Infinity and crashes my server

ornate mantle
#

dad just turned the house power on and off

ornate mantle
#

this is a serious development question

quiet ice
#

Turn the power off, then rinse it with water

ornate mantle
#

wait

#

yk the laptop chargers right

quiet ice
#

After that plug the device in an UPS because you have no power in the mains

ornate mantle
#

the ones that disconnect into 2

ornate mantle
lusty forum
#

Hello guys, how can I make a city build plugin? I want to create one my own

ornate mantle
#

dad said something but he just turned the switch on and off

#

and its fine

#

the laptop charger thing has soap in it

quiet ice
#

You should turn it off though, there is a high chance of an electric shock

#

Soap is conductive

ornate mantle
#

yeah its not connected rn

eternal oxide
#

I fit was just water, and the cable, hang it out to dry. If it was the brick you can;t dry it out without openign it or placing it in the airing cupboard for a week

ornate mantle
#

if i connect it it'll probably turn power off

#

what i did was i took a napkin

#

and a bent fork

#

and half a drop of water

quiet ice
#

... or use rice

ancient plank
#

Tf is an airing cupboard

ornate mantle
#

i dont want my parents to know i put soap in my fucking charger 💀

eternal oxide
#

here in teh UK, they are the warm cupboard you keep your linnens in. It has teh boiler in it too, which provides the heat

ornate mantle
#

i dont have that lol

#

i might be living in a goofy house in the UK

eternal oxide
#

older houses mostly

ornate mantle
#

ah

#

wait is the boiler the water heating thing

green prism
eternal oxide
#

You can always ask

ornate mantle
#

ingenius

green prism
#

wait im searching for the link

green prism
#

theres the sourcecode on the top

undone axleBOT
ornate mantle
eternal oxide
#

Yeah, not even bothering to look. It is about Gender

ornate mantle
#

this has soap in it

twilit roost
#

while loops are taking whole main thread for itself right

ornate mantle
green prism
#

im your fan so...

green prism
#

I would appreciate every advice

ornate mantle
#

guys

#

did you know neopronouns started as a troll on 4chan against trans people

green prism
eternal oxide
#

pom looks fine

green prism
quiet ice
green prism
ornate mantle
#

is anyone here a professional soap remover from charging cables

quiet ice
#

Then you are absolutely not his fan

green prism
#

I have a certificate of best fan ever

ornate mantle
#

idk if this is satire or fr

green prism
ornate mantle
#

edgar

green prism
#

eggarl

ornate mantle
#

are you sure the water method is gonnawork

waxen plinth
#

If it's your own resource, why don't you verify your account real quick

ornate mantle
#

what would you do if this happened to you

waxen plinth
#

Yes

green prism
#

how can I

quiet ice
#

?verify

green prism
#

?verify

quiet ice
#

Ah, only works in certain channels

green prism
#

?verify I am the developer

waxen plinth
#

There's a channel for it

green prism
#

ouch

eternal oxide
waxen plinth
#

I would honestly love a plugin that lets you specify pronouns in hover text over your name

ornate mantle
#

does soap evaporate

#

😭

eternal oxide
#

no soap doersn;t evaporate

ornate mantle
#

fuck

green prism
#

done, but... I want to change my name, this is ugly

ornate mantle
#

yeah but how would you repair it properly

#

its got like a drop of handwash

eternal oxide
#

I'd rather not tell you as opening the unit is a shock hazard

ornate mantle
#

BRUH

eternal oxide
#

it could kill you

waxen plinth
#

Alright, link me a GitHub repo and I will happily review your code

ornate mantle
#

im talking about my charger

quiet ice
#

Even if unplugged due to capacitors