#help-development

1 messages · Page 1896 of 1

glossy venture
#

no

lost matrix
#

Nope
homes:<UUID>

glossy venture
#

i have something that loads from the database every 100 ms, but only if a request is made

#

and saves to the database every 200 ms when a write is made to the runtime data

young knoll
lost matrix
#

Not really.
Data bound to worlds
worlddatamanager:<UUID>

young knoll
#

Hmm

#

So would this end with a single json file per player?

glossy venture
#

i was thinking of doing like an accumulative iteration that it goes like foo and then foo.bar and then foo.bar.amogus, which then stores the values for those nodes if they define any behaviour (set any permission value for themselves or their children, or define content)

lost matrix
# young knoll So would this end with a single json file per player?

Depends how you structure your data. I personally have every player bound data in one class PlayerData
So i will also just have one file per player.
But you can also have multiple Manager classes like
HomeManager containing a Map<UUID, HomesDomain>
or
QuestManager containing a Map<UUID, QuestDomain>
Then you will either have them all in one File:
homemanager:data
or one file per player:
homes:<UUID>

young knoll
#

Fair enough

#

I wonder if should load each addon as an actual plugin

hollow arch
#

Heyo, wasn't there a way to reset the current special formatting in a CompontentBuilder - such as hover/click events etc so that when I call append() on it again, none of the previous formatting applies?

#

ah nvm reset() it is lol

tall nova
#

How would I make a player glow with NMS in 1.18

tall dragon
#

why would you want to use nms for that

tall nova
#

So I could do it for specific players

hollow arch
#

You can tho

tall dragon
#

yea, you can

tall nova
#

How

blazing scarab
#

Really?

hollow arch
#

player#setGlowing

tall nova
#

bruh

#

that does it for all players

hollow arch
#

No, only 1/12th of the time, it's a prank by spigot

tall nova
#

?

hollow arch
#

It's a joke, it does work lol

blazing scarab
#

i think he meant to show glowing for specific players only

hollow arch
#

oh

hollow arch
#

Yeah nah best of luck

blazing scarab
#

Send a metadata packet with glowing flag then

tall nova
#

hmm

blazing scarab
#

And listen to outgoing metadata packets

blazing scarab
#

We need server.sendEntityChange

lost matrix
#

EntityMeta packet

tall nova
#

Ah alright

maiden briar
#

Guys, I have someone who sais that UUID's won't exist below 1.7. Is that true?

#

Pls ping me

tall nova
#

@lost matrix @blazing scarab

    public void setGlowing(Player player, Player... players) {
        Entity handle = ((CraftPlayer) player).getHandle();
        DataWatcher dw = new DataWatcher(handle);
        dw.a(new DataWatcherObject<>(0, DataWatcherRegistry.a), (byte)0x40);
        PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(player.getEntityId(), dw, true);
        for (Player glow: players) {
            ((CraftPlayer) glow).getHandle().b.a(packet);
        }
    }``` In theory this would work?
maiden briar
#

I did decompile 1.5, and I saw a method Entity.getUniqueId()

young knoll
#

That doesn’t necessarily extend to players

#

Everything was name based before 1.7

tall nova
# tall nova <@!220605553368498176> <@!383968850183454721> ```java public void setGlowin...

For lower versions it would look like

    public void setGlowing(Player player, Player... players) {
        Entity handle = ((CraftPlayer) player).getHandle();
        DataWatcher dw = handle.getDataWatcher();
        dw.set(new DataWatcherObject<>(0, DataWatcherRegistry.a), (byte)0x40);
        PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(player.getEntityId(), dw, true);
        for (Player glow: players) {
            ((CraftPlayer) glow).getHandle().playerConnection.sendPacket(packet);
        }
    }```
little elm
#

Hi. I am coming across this issue where:

  1. I write something to my custom config file. If I open it with a text reader app, everything is there as expected.

  2. When a player types a command /getinformation, I use FileConfiguration#get(path) and send it to a player's chat. However, the message sent to the player says "null" where there should be values from the config.

  3. Interestingly, when I "/reload confirm" the server, and the player runs /getinformation again, the player receives the values they are supposed to receive.

Why does it say null for the values, and what about /reload confirm fixes it?

tacit drift
#

or you are doing something wrong about the config

little elm
#

thank you!!!

#

Unfortunately, it's still not working. Is there some function I must call before calling getString in order to "load" the proper config file?

#

Im not sure why it says null when I can literally open the config file using a text editor to see that everything is there as expected

#

And on top of that, /reload confirm somehow fixes the issue

lost matrix
lost matrix
young knoll
#

You can also just read them from the YamlConfiguration instance

onyx shale
#

unless your testing your own shit

#

then use reload

glossy venture
# little elm Unfortunately, it's still not working. Is there some function I must call before...

Make a reload() method which you can then call to store the necessary information in fields, preferably in an easy to use class, a simple example:

public class MyConfiguration {
  public static String a;
  public static int b;
  // ...
  public static void load(FileConfiguration config) {
    config
    a = config.getString("a");
    b = config.getInt   ("b");
  }

  public static void save(FileConfiguration config) {
    config.setString("a", a);
    config.setInt   ("b", b);  
  }
}
#

and then in your plugin class call MyConfiguration.load(this.getConfig()) and MyConfiguration.save(this.getConfig())

#

when you need them to load and save

tacit drift
#

useless

#

first of all, those methods wont update the config file in any way

glossy venture
#

i forgot to add save() to save

quaint mantle
#

Use a library like DazzleConf if you want type-safe configs

tacit drift
#

all you have to do in order to have a config for your plugin is add config.yml in the resources folder of your project and add getConfig().options().copyDefaults(true); saveConfig();
to your onEnable method

glossy venture
#

true

#

but you may want to store data from the configuration into fields

#

especially with more complex objects

#

you might want to 'compile' them into java objects

frigid rock
#

yo guys, i was making a rtp function for my plugin, but i need a cooldown for it

#

i tried, but it doesnt work properly

frigid rock
#
 public RandomTpEvent(me.takao.twcore.TWCore TWCore) {
        this.TWCore = TWCore;
    }

    ArrayList<String> rtpCooldown = new ArrayList<>();

   @EventHandler
    public void onMove(PlayerMoveEvent e){
        Player p = e.getPlayer();
        if(rtpCooldown.contains(p.getName())){
            p.sendMessage("on cooldown");
        }else{
            if(playerOnRTPRegion(p)){
                randomTP(p);
                rtpCooldown.add(p.getName());
                Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(TWCore, new BukkitRunnable() {
                    @Override
                    public void run() {
                        rtpCooldown.remove(p.getName());
                    }
                }, 100);
            }
        }
    }```
glossy venture
#

you want them to teleport to a random location when they move?

frigid rock
#

and when they go in that region, they get teleported to a random location

tacit drift
quaint mantle
#

Idk i hate string keys spaghetti

glossy venture
#
/**
* The delay you want to have in milliseconds.
*/
final static long delayMs = 1000; // 1s

/**
* Stores the last teleport time of all players.
*/
final static HashMap<UUID, Long> times = new HashMap<>();

/* Some method, in your case `onMove` */ {
  // check if the time between the last teleport and now
  // is greater than the delay (has enough time passed)
  if (System.currentTimeMillis() - times.getOrDefault(p.getUniqueId(), 0) < delayMs) {
    // they are on a cooldown
  } else {
    // put their new time
    times.put(p.getUniqueId(), System.currentTimeMillis());
  }
}

@frigid rock

#

i added comments

#

read them

frigid rock
#

oh

#

lemme try

#

thanks!

glossy venture
frigid rock
#

i get an error

#

i think that the error its there

young knoll
#

Map doesn’t have an entry

#

Also your () are messed up

frigid rock
frigid rock
young knoll
#

If your map doesn’t have an entry for that key

#

Things are gonna break

glossy venture
#

Ill update it

#

I fixed it

amber vale
#

Hello! Is there a way for a plugin to detect which part players get hit in? For example like what leg, what arm etc.

lost matrix
# frigid rock wdym?

Your map does not contain a value for this key.
Which means it returns a
Long with the value null
unboxing this to a long results in a NPE

frigid rock
amber vale
frigid rock
glossy venture
frigid rock
#

okk

#
 final static long delayMs = 1000;
    final static HashMap<String, Long> times = new HashMap<>();

    @EventHandler
    public void onMove(PlayerMoveEvent e){
        Player p = e.getPlayer();
        if(System.currentTimeMillis() - times.getOrDefault(p.getName(), 0L) < delayMs){
            p.sendMessage("on cooldown");
        } else{
            if(playerOnRTPRegion(p)) {
                randomTP(p);
            }
            times.put(p.getName(), System.currentTimeMillis());
        }
young knoll
#

If they aren’t in the map that default of 0 will cause issues

glossy venture
#

You need to put the player only if they are in the region

lost matrix
young knoll
#

Doesn’t computeIfAbsent add to the map

glossy venture
#

Move the times.put inside the if(playerInRegion) { ... }

frigid rock
#
   final static long delayMs = 1000;
    final static HashMap<String, Long> times = new HashMap<>();

    @EventHandler
    public void onMove(PlayerMoveEvent e){
        Player p = e.getPlayer();
       if(playerOnRTPRegion(p)){
           if(System.currentTimeMillis() - times.computeIfAbsent(p.getName(), 0L) < delayMs){
               p.sendMessage("on cooldown");
           } else{
                   randomTP(p);
               }
               times.put(p.getName(), System.currentTimeMillis());
           }
    }```
#

like this?

young knoll
#

That’s not how computeIfAbsent works

glossy venture
#

No, go back to the previous version

frigid rock
#

yeah hang on

glossy venture
#

And all you have to do is put the times.put(...) command inside of the if statement checking if they are in the region

#

Because otherwise the cooldown reset whenever they move, even if they are not in the region

frigid rock
#

oh yeah i was putting it in the wrong place

#

thats why

glossy venture
#

Yeah

frigid rock
#

works fine now

#

thank you so much ^^

glossy venture
#

Nice

#

Np

lost matrix
#
  private static final long TP_COOL_DOWN = 1000;

  private final Map<UUID, Long> lastTeleportTimestamps = new HashMap<>();

  @EventHandler
  public void onMove(PlayerMoveEvent event) {
    Player player = event.getPlayer();
    if (!isInRegion(player)) {
      return;
    }
    UUID playerID = player.getUniqueId();
    long lastTeleport = lastTeleportTimestamps.getOrDefault(playerID, 0L);
    long timePassedSinceLastTeleport = System.currentTimeMillis() - lastTeleport;
    if (timePassedSinceLastTeleport < TP_COOL_DOWN) {
      return;
    }
    tpPlayer(player);
  }

The very first check should be if a player is in a region.
In your tpPlayer() method you should put
lastTeleportTimestamps.put(playerID, System.currentTimeMillis());

young knoll
#

No reason to computeIfAbsent

#

Since that will put the result in the map

hardy swan
#

computeIfAbsent put results in map?

#

damn im tricked for years

young knoll
#

Mhm

hardy swan
#

Ok I know why I haven't got into any issues without knowing that

#

I always use merge :p

granite burrow
#

hey why doesnt it detect my tab completer?

#

The file exists, ive never had this issue before

eternal oxide
#

invalidate caches and restart

round elbow
#

how can I load a world from a different folder than the main directory?
i am working on a plugin that requires maps and i have a folder for the maps but i can't find a way to load worlds from the maps folder

granite burrow
eternal oxide
#

Bug in InteliJ

#

happens at times

granite burrow
#

ahh okay, glad that I know about it now and that you knew how to fix it

#

thank you so much

eternal oxide
#

Eclipse has teh exact same issue, but not as often

granite burrow
#

ah that mightve been the issue I was having then, I ended up switching to intelij cuz of that issue. I didnt ask about it

#

but never the less im happy with intelij

warm mica
#

it's quite common with intellij tho

eternal oxide
#

I have, but its extremely rare with Eclipse

restive mango
#

Any of you guys know a way to save a list of blockstates to a file and then read them from that file?

quaint mantle
#

whats the command to learnjava

#

;learnjava

eternal oxide
#

?

quaint mantle
#

the command where you type learn java which brings up some links

#

i forgot the prefix

eternal oxide
#

its ?

quaint mantle
#

!help

quasi flint
#

?learnjava

undone axleBOT
quaint mantle
#

ah thnx

quasi flint
#

np

restive mango
#

Is this for me

glossy venture
#

no

#

i think they just wanted the links

quasi flint
#

they wanted to get them links

ancient plank
#

Is blockstate serializable 🤔

#

Seems not

dusk flicker
#

anythings serializable if you break it hard enough

quasi flint
#

just punch at it till it works

ancient plank
#

There seems to be a "getAsString" method which is defined as a serialized string

quaint mantle
#

lol

ancient plank
quaint mantle
#

Is there something I can make that can catch and "IndexOutOfBoundsException" issues?

late sonnet
quasi flint
#

catch(Exception e) {return;}

quasi flint
wicked lake
#

Ew blanket error handling

visual tide
waxen plinth
#

Best error handling

hollow arch
#

am I being dumb? A new player object should be created every time someone relogs, right?

quaint mantle
#

yes

hollow arch
#

oh bruh I think it's because I disabled online mode for my local server when the auth servers went down

#

ty

vernal minnow
#

I have a class that takes inventories. If I make an instance of the class, and create the inventory with the instance, and set the boolean in the class that stores whether you can close the inventory to false, how can I then in a listener (which is in another class ) access this boolean and check if it is this instance that I used to create the inventory?

quaint mantle
#

Like getBool?

#

Create ur own method

vernal minnow
#

i have created isClosable() but when i want to get the bool how i make sure, that is it of that instance i created it?

ornate heart
#

Anyone know what could be causing this error:

Caused by: java.lang.IllegalStateException: Entity EntityWitherSkull['Wither Skull'/1741, uuid='9b25fe78-a9cb-42e4-b5d8-f3e20cee011e', l='ServerLevel[world]', x=29988909.40, y=565.60, z=29943732.44, cpos=[1874306, 1871483], tl=0, v=false] is not in the region
undone axleBOT
ornate heart
bold copper
#
 //spigot code
 //player.spigot().sendMessage()

 /** @deprecated */
 @Deprecated
 public void sendMessage(@NotNull BaseComponent... components) {
    throw new UnsupportedOperationException("Not supported yet.");
}

please tell me what to replace it with? and will it work on 1.17?

spiral light
eternal oxide
spiral light
bold copper
spiral light
#

you could try to update your server version

spiral light
bold copper
eternal oxide
#

Its deprecated in Paper because they want you to use Adventure components

buoyant viper
#

paper moment

bold copper
ornate heart
ornate heart
spiral light
bold copper
restive mango
#

@ancient plank I think I might have already tried this, but I’ll double check. I don’t think it’s serializable but default, so I was wondering if there’s like… some kind of constructor that we know of which can do it

spiral light
buoyant viper
#

what if u asked for paper help in paper

quaint mantle
#

colorful gigachad

hasty prawn
quaint mantle
ornate heart
bold copper
quaint mantle
# quaint mantle i accidentally turned mention off
public class InventoryPermissionManager {
    private static final Map<Inventory, Boolean> INVENTORIES = new HashMap<>();

    /*
        Default: true
    */
    public static boolean canClose(Inventory i) {
        return Optional.ofNullable(INVENTORIES.get(i)).orElse(true);
    }

    public static void setCanClose(Inventory i, boolean canClose) {
        INVENTORIES.put(i, canClose);
    }
}
quaint mantle
#

Component smh

ancient plank
bold copper
vale cradle
#

so inventories could be actually garbage collected with no worries ;p

quaint mantle
#

smart mister

#

ive never used a weak map

#

but now i know when to

vale cradle
#

yeah, It's pretty handy when you want to store your own metadata of objects without worrying of their references

#

java.util.WeakHashMap

quaint mantle
#

🆘 STATIC MUTABLE STATE 🆘

paper viper
#

i preferred if you created an inventorymanager class and just passed that into the listener class

quaint mantle
ancient plank
#

League of Legends

paper viper
#

or smthing

quaint mantle
#

"laughing out loud"

ancient plank
#

but you typed LoL which is League of Legends !

#

laughing out loud is lol !

#

smh

golden turret
#

lol

warm mica
buoyant viper
#

or .getOrDefault

warm mica
#

Or that

spiral light
#

Kinda need help with Type Parameters...
if i have this interface and want T to be List<String>.... how would that look like if i dont want only T to be List :?

ivory sleet
#

Wym?

spiral light
#

interface KeysResult extends Result<List<String>> {}

ivory sleet
#

I mean <T> is essentially a type constructor.

#

ah

spiral light
#

<String> will not work

ivory sleet
#

Well

#

Obv not

spiral light
#

yes ^^

ivory sleet
#

So what’s the issue?

buoyant viper
#

^

ivory sleet
#

I mean if I understood you correctly you might want a KeysResult<T> extends Result<List<T>> (so you can constructor any type of list later)

spiral light
#

this doesnt work either

ivory sleet
#

It does

buoyant viper
#

do u have the right List imported?

golden turret
#

what about List<Object>

spiral light
#

util

#

kinda messed up my class

ivory sleet
#

List<Object> is just a type and then he wouldn’t be able to pass List<String> etc

#

(Not at compile time if List<Object> was passed)

quaint mantle
#

List<?>

spiral light
#

oh wait maybe fixed

buoyant viper
#

glad u guys understood his issue cuz i dont

ivory sleet
#

Tbf I don’t either

#

I’m just guessing

spiral light
#

well i am just guessing too

buoyant viper
spiral light
#

kinda worked to use E instead of T

buoyant viper
#

that part does not matter

ivory sleet
#

I mean the name of a type parameter can be whatever you want ^

quaint mantle
#

That one checkeframework annotation called T

ivory sleet
#

🥲

spiral light
#

yes

blazing scarab
buoyant viper
#

hmm

ivory sleet
quaint mantle
#

no shit that was really annoying with C annotation import while i did some generic stuff

#

Why the fuck checker framework needs an annotation to define temperature

graceful turret
#

p.setVelocity(p.getLocation().getDirection().multiply(3).setY(2)); i'm trying to bounce player in direction where he looks, i also want to player fly up - this code doesn't do this

spare prism
#

Is there a way to check player's first join date using Spigot API?

vernal minnow
#

is there a way, that the InventoryCloseEvent triggers only one and not a trillion times when closing an inventory

#

?

spiral light
#

just register it only 1 time

vernal minnow
#

i have it but when i close an inventory the listener calls the methon a bunch of times

kind hatch
#

an*

buoyant viper
#

?jd for self

kind hatch
vernal minnow
#

yes i have an if for the inventoryholder

kind hatch
buoyant viper
#

might be a new-ish method

spare prism
#

Why does it throws me an java.util.ConcurrentModificationException?:

    private void updateData() {
        Iterator<FrienPassPlayer> iterator = cachedOnlinePlayers.iterator();
        while (iterator.hasNext()) {
            FrienPassPlayer entry = iterator.next(); // exception line
            if(entry.getUuid().equals(uuid)) {
                iterator.remove();
                cachedOnlinePlayers.add(this);
            }
        }
    }
ivory sleet
#

whats cachedOnlinePlayers?

spare prism
ivory sleet
#

use:
ListIterator<E> it = blah.listIterator();

#

then just
it.add(blah);

buoyant crater
#

Is there any chance to pay at spigot using paysafecard tho?

unreal quartz
#

Where has the dog gone @ivory sleet

ivory sleet
#

sadly I don't have any pics of him on my new pc and phone is ded

spare prism
ivory sleet
#

no

#

you have to use iterator.add()

#

not cachedOnlinePlayers.add()

spare prism
#

oh

#

sorry

#

ty

ivory sleet
#

have a good time

spare prism
quaint mantle
#

hmm

ivory sleet
#

EntityDamageByEntityEvent

#

yeah try that

fervent gate
#

Anyone have any experience with LibsDisguises?

#

Or disguising an entity as a player skin

hasty prawn
#

setDamage

spiral light
#

@ivory sleet were you hacked or smth ? O.O

hasty prawn
#

Yeah the no dog pfp is depressing

spiral light
#

why is there a red profile image

ivory sleet
#

oh well no not hacked

wary harness
#

Hi there so I am doing some testing for backpack plugin

#

I am spawning armorstand

#

on top of player

#

and then using custom item model as head on that armorstand

#

so armorstand is passenger

#

question is would this be possible with packets

#

so it would be client side only

#

and will that armorstand ride player if it is spawned with packets only

crisp forum
#

I have a yml file that contains:

effects:
  speed:
    duration: 10
    level: 2
  jump:
    duration: 10
    level: 3

how can I get all properties (speed, jump) of the "effects"?

vernal minnow
#

Can you get somewhere a list with all ItemStacks types in it?

spiral light
wary harness
#

or would I need to update it all the time

spiral light
wary harness
#

you maybe able to point me

#

to some tutorial

#
        EntityArmorStand stand = new EntityArmorStand(s);

        stand.setLocation(loc.getX(), loc.getY(), loc.getZ(), 0, 0);
        stand.setCustomName(name);
        stand.setCustomNameVisible(true);
        stand.setGravity(true);
        stand.setSmall(true);
        stand.setInvisible(true);


        PacketPlayOutSpawnEntityLiving packet = new PacketPlayOutSpawnEntityLiving(stand);
        ((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
#

I have found this on forum but that will create

spiral light
#

so it already spawns ?

wary harness
#

entity

#

I currently spawn it with spigotapi

#

if u can see here

spiral light
wary harness
#

That is some example from forum

spiral light
#

if you dont want to use packets and instead API you can also use
Player#hideEntity() for each player that should not see htis

wary harness
#

xd

spiral light
#

then.... why use packets ?

wary harness
#

preformance

#

and u don't deal with really entity

#

at least I was thinking so

#

but this example ```WorldServer s = ((CraftWorld)p.getWorld()).getHandle();
EntityArmorStand stand = new EntityArmorStand(s);

    stand.setLocation(loc.getX(), loc.getY(), loc.getZ(), 0, 0);
    stand.setCustomName(name);
    stand.setCustomNameVisible(true);
    stand.setGravity(true);
    stand.setSmall(true);
    stand.setInvisible(true);```
#

still need to create

#

armor stand

#

so I am again I think in same position

spiral light
#

hmmm you can set persist to false for bukkit entity and you dont have to deal with save/load things ....

#

using packets will break every update

wary harness
#

persist to false?

#

Can you explain what you mean by that

spiral light
#

and it might be fast very bad performance too

#

if you use Entity#setPersistent(false) or smth like that the entity will not remain in the world ...

quaint mantle
#

like, the armoststand is, like, notging for the server

wary harness
#

intresting

quaint mantle
#

Yoy will not recieve a huge performance boost from packets

wary harness
#

ok I will try this

#

thanks for info

glossy venture
#

where can i find a guide on how to contribute to spigot? (spigot, bukkit & craftbukkit)

glossy venture
#

oh thanks

#

where can i find the CLA page

#

on jira

#

because i need that to get access to the repositories

#

i think

spiral light
#

i am wondering what you want to add ^^

glossy venture
#

ive just been thinking about contributing for a while

#

i didnt know exactly what

buoyant crater
#

Is there any chance i could pay on spigot using paysafecard?

spiral light
#

spigot is free O.o

glossy venture
#

i think they mean buying plugins on spigot

#

although they are in the wrong channel then

hoary pawn
#

if i have a itemstack item and i want it to send a cmd everything someone hits a player with it, can i do that without raytracing?

spiral light
#

EntityDamageByEntityEvent

hoary pawn
#

ahh thanks

#

that might help

tardy delta
#

does anyone has a kinda good chatchannel api?

#

im creating things on my own and i want to take a look at some examples

humble prairie
#

Does anyone know what jdbc connector spigot 1.8.8 uses?

quaint mantle
tardy delta
#

i'll take a look at that thanks

#

also another question, is there something better to save data in the player's metadata instead of the pdc?

tardy delta
#

i saw supervanish using it to save the vanished state for the player, but for what is it used?

sullen marlin
#

?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

little gulch
#

is it possible to check if a class exists using just a string

#

(but searching in one package)

young knoll
#

Class.forName

worldly ingot
#

Class.forName() will throw an exception if it doesn't exist

#

Good ole try/catch

little gulch
#

ill try that 1sec

#

my IDE highlighted it in red

worldly ingot
#

Then you're either not importing Class, or commandname isn't a String

little gulch
worldly ingot
#

Your IDE should auto import it

#

Actually, it's even in java.lang. No need to import

foggy estuary
#

?paste

undone axleBOT
eternal oxide
worldly ingot
#

FeelsIJMan

foggy estuary
worldly ingot
#

Giants don't even render anymore, right?

#

Since like 1.12 or something?

#

Or am I misremembering

foggy estuary
#

oh fr?

hasty prawn
#

They do

young knoll
#

They should

#

They just have no AI

worldly ingot
#

Maybe that was a bug at one point Hmmm

hasty prawn
#

^

#

Well that's horrifying, giants existing but you can't see them monkaS

little gulch
#
private void addCmd(String commandname) {
        this.getCommand(commandname).setExecutor(new Class.forName(commandname));
}
``` btw heres the full function thats supposed to handle it, it might make it clear whats wrong with full context
worldly ingot
#

No need for new

#

It's a static method

little gulch
#

ohh

worldly ingot
#

Though that won't work. You need an instance of that class, not the Class

#

You might as well just pass in the CommandExecutor instance 😛

little gulch
#

i am just trying to make it more easy to add a new command here

#

what would i do to fix it

eternal oxide
#

its not a good idea as you would also be breaking naming convention of classes

young knoll
#

You’ll need to do some more reflection stuff to make that work

foggy estuary
ancient plank
#

they will always exist 😔 forever without AI

#

😔

young knoll
#

Just give them AI

waxen plinth
#

giant.setAI(true);

#

👍

young knoll
#

lol

hasty prawn
little gulch
#

ill just use the normal command adding method for now

foggy estuary
#

but fr does anyone know why my code isnt making the giant spawn?

crisp forum
#

I have a yml file that contains:

effects:
  speed:
    duration: 10
    level: 2
  jump:
    duration: 10
    level: 3

how can I get all properties (speed, jump) of the "effects"?
for example in DeluxeMenus there are items: and It gets everything inside items: and adds them to menu

hollow bluff
#

Tried a for loop and looping through the effects list?

restive mango
#

@ancient plank yeah I’ve thought about Json but I’ve never used it before so I dunno how to build a constructor

crisp forum
balmy gale
#

how do i fix this and do i need to? Unboxing of 'data.get(new NamespacedKey(Main.instance, "key"), PersistentDataType.INTEGER)' may produce 'NullPointerException'

restive mango
#

@ancient plank imma just use world edit roflmao

ancient plank
#

xd

restive mango
#

I am already using world edit for it

#

It’s just that I want a more elegant system instead of defining a cube

#

Like… I wish there was a way to define a precise set of coordinates for worldedit

#

Oh well

balmy gale
#

//set <x,y,z>?

restive mango
#

@balmy gale can you do that with the worldedit Java interface Lul

balmy gale
#

i didnt read the whole conversation lol

#

probs should do that

restive mango
#

It doesn’t have any docs that are good

balmy gale
#

ok

ancient plank
#

😔

restive mango
#

It makes me sad

ancient plank
#

me too

vocal cloud
#

Make your own library call it "world edit but if it was actually good"

lost matrix
#

Whats the problem with we?

restive mango
#

Know any good documentation for it?

lost matrix
restive mango
#

Oh me likey

#

I always tried making do with this

#

Which was painful

lost matrix
#

Yeah thats what the page leads to

lost matrix
restive mango
#

Chat when I get home

#

See you soon

muted quiver
#

Question if this design pattern makes sense for developers.

I am planning to work on a quest plugin system essentially where players have quests. I was planning to do the following:

Have a QuestManager for each player so if certain events happen it can manage that users quest, if a quest is complete, etc.

In the quest manager have a List of Quests from an interface so new quests can be made. IQuest then for example KillPlayerQuest.

Then was going to have like a Reward for each quest. (e.g. Money, Rank)

So like Maybe i should make a IQuestReward? And have like RewardMoney, RewardRank, etc?

Are there any design methods I should look into for this? Am i on the right track? Any Suggestions

ivory sleet
#

I mean that just sounds like architecture planning, like if we talk design patterns you might wanna look into the structural ones

muted quiver
#

Yeah im aware of factory etc

ivory sleet
#

Anyways I rarely plan ahead, since it’s really hard to write the most suitable clean code architecture before you get it to work

#

Usually the semantic refactors are done post getting something to work

muted quiver
#

I was just thinking of the properties of what it needs before i write it

#

so i don't have like a god class

ivory sleet
#

Well that’s just business requirements

#

Yeah

muted quiver
#

appreciate it thx

ivory sleet
#

Anyways I have become very dependent on facade patterns

#

So you have one class which is the face for a very complex implementation (usually encapsulating several other components)

muted quiver
#

Yeah that was kinda the Idea

#

Have like a facade class called QuestManagerController that would make all the interacts for each player

ivory sleet
#

Hmm yeah maybe

muted quiver
#

im just bouncing ideas in my head nothing serious lol

ivory sleet
#

Anyways what can I say? Prefer composition to inheritance. And make it decoupled and modular (SoC)

loud garden
#

Hi there 🙂 i'm trying to do a plugin (1.18.1) where i wan't to us the .serialize() method on an ItemStack. But right there is my problem so if this ItemStack have some enchantments it throws me a NotSerializeException.
I never worked bevore with this method and also didn't tried in a earlier version. Do somebody knows something about if this is a bug or should i do my own method to serialize ItemStacks with enchantments ?

muted quiver
#

@loud garden I have a sample Serializer i've used previously not long ago if u want a code snippet ill take a look about enchants though one moment.

#

@loud garden how are you serializing the data?

loud garden
#

Well im using the .serialize method on the ItemStack its selfe wich gives mi a hashmap<String,Object>

muted quiver
#

this is a snippet of how you should serialize it

#
            ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
            BukkitObjectOutputStream dataOutput = new BukkitObjectOutputStream(outputStream);

            dataOutput.writeInt(items.length);

            for (ItemStack item : items) {
                if (item != null) {
                    Bukkit.getLogger().info(item.toString());
                    dataOutput.writeObject(item.serialize());
                } else {
                    dataOutput.writeObject(null);
                }
            }

            dataOutput.close();
            return Base64Coder.encodeLines(outputStream.toByteArray());
#

i encoded it with like base64

loud garden
#

Well i will try that tomorrow foe sure :) need to go to sleep 😂. Thanks for your advice and help ^-^

muted quiver
#

No problem i have a class that worked for serialization if u need 1

loud garden
#

I will come back to it if i can't get it done 😁

granite burrow
#

hey how can I make is so that when a player in survival places down a spawner it turns into the give spawner name rather than a pig?

eternal oxide
granite burrow
#

alright

little elm
patent horizon
#

what is the param type if i want to pass a class instance (like if i want to run a function like method(new Class(), "arg1", "arg2"))

little elm
#

If it is not possible, what other persistent data storage method is there? For instance, how does /sethome store and read the coordinates?

patent horizon
#

pretty sure you can serialize locations in yaml configs

little elm
#

Thank you. What does this mean?

patent horizon
#

it means you can pass a location object through the YamlConfiguration and end up with this in the config:

homeName:
  location:
    ==: org.bukkit.Location
    world: world
    x: 100.0
    y: 200.0
    z: 300.0
    pitch: 500.0
    yaw: 400.0```
little elm
#

Oh wow thanks for that. I didnt know this and was storing everything in strings lol

patent horizon
#

if as 7smile7 said, you should never read from config at runtime?
i think you misunderstood this

#

or if what you're saying is true, he's wrong

#

how else would you grab data if you couldn't read from configs during runtime

#

unless they're just a fan of caching everything when the plugin loads

young knoll
#

I wouldn’t load the file after startup

#

But once it’s loaded it’s just reading from a map

patent horizon
#

well

#

actually nvmd you right

#

if a file changes and you read data from a version of the file that was loaded when the server started up, will the data be updated?

little elm
#

Btw thanks for the help but it somehow got fixed!

#

Somehow, passing the Location through YAML fixed it. So I must've been doing the serializations wrong

lost matrix
patent horizon
#

so you would only load the file once, but load the YamlConfiguration anytime you need to call data from the file?

little elm
#

Also another question, for messages like

================================
Hello player, have a nice day

is there a way to determine how many = signs I need in order to perfectly fit into a player's chat width settings? so that they dont end up with a message like

=====

=====
Hello Pl
ayer, ha
ve a nice
day ===

====

patent horizon
#

i think there is a chat width thing

little elm
#

ty!

patent horizon
#

since you can grab it with skript

lost matrix
#

Usually you want to read the File into a YamlConfiguration once when the plugin is enabled.
Then store all data from this YamlConfiguration in proper data structures.

patent horizon
sterile token
#

I recommend using my custom file handler

patent horizon
#

chat width is a client setting which doesnt get sent to the server

sterile token
#

Here you have it

patent horizon
#

sry my mistake

#

or use redlib's config manager

#

B)

sterile token
#

Wally

#

How do you do to appear your up time on discord?

#

On Mines intellij doesnt appear

ivory sleet
#

IJ Plugin

sterile token
#

I have it

#

But it doesnt show up time

#

I think its bug

ivory sleet
#

Well you’re offline

toxic hornet
#

can anyone help me setup my minecraft network? DM me if you can help? (I have servers just don't know how to use bungeecord)

wary harness
#

Hey

#

any one could tell me how would I avoid

#

player hitting armor stand

#

which is passenger

#

problem is survival players can't brake block

#

because they have armorstand riding them

#

I am using armor stands

#

for custom backpack

#

I saw it on other server they use armorstand

#

but player can normally hit blocks

undone axleBOT
toxic hornet
#

Ok

young knoll
#

Set the armorstand as a marker

wary harness
#

on top of it

#

pa.setMarker(true);

#

when I do that

#

one from top falls down

#

so miny one will fall down dismount

#

this is problem which I got

#

there is no mounting point

#

if someone can help please ping me

#

off for today lost my head with this 😂 😭

woeful crescent
#

hey guys- ik this isn't exactly spigot, but is there any way that I could delete a file that starts with the same name as another file up to a certain character? this might not be the best way to do it; i'm actually trying to replace an old version file automatically, as just downloading it won't work due to differing versions.
ex: downloading ultrasponge-1.10 would not replace ultrasponge-1.0

#

Any help?

#

i don't want to use hashes as that is tooo slow and the names are already pretty much the same

woeful crescent
#

shell file lmao, forgot to say that 🤦‍♂️

twilit wharf
#

any api's to easily communicate between servers on a bungeecord network? (besides bungeecord messaging channels)

glossy scroll
#

Redis

twilit wharf
#

preferably without another program running

glossy scroll
#

bungee messaging the best you got

twilit wharf
#

alright

upper vale
#

mysql messaging also works, idk if a mysql database is considered another program?

#

redis would probs be better though if its just messaging

glossy scroll
#

yea redis isn't heavy on connections either

ivory sleet
twilit wharf
#

I will have a look

ivory sleet
#

You already asked in HelpChat? thonk

dusk flicker
#

redis is the best

#

and easy too (not to mention nuts fast)

young knoll
#

🥜 speed

carmine urchin
#

If you are making string constants like prefixes for messages, is it better to store them in a class or enum?

ivory sleet
#

Idm

#

depends on design mostly

carmine urchin
#

ah ok

granite burrow
#

Is there anyway that I can make it so that a player can connect 2 fences together

#

So far I only got it to do this by putting in invisible bees, but is there an easier way to do it

granite burrow
young knoll
#

You can probably force a lead onto them

granite burrow
#

Hey so I'm trying to put a lead on a slime, why does this not make the lead attach to me?

#

ah nevermind needed to delay it

quaint mantle
#

i care the least about this one

young knoll
#

Right but why

#

getOrDefault

vocal cloud
analog prairie
#

Can I get player's Inventory with list?

young knoll
#

What

#

Into a list? Sure just call arrays.asList on the getContents array

#

Do note that will make an immutable list tho

quaint mantle
#

Its not immutable but yea

young knoll
#

Fine, fixed sized

analog prairie
#
 [ItemStack{SAND x 64}, ItemStack{DIRT x 4}, ItemStack{WOODEN_SWORD x 1, UNSPECIFIC_META:{meta-type=UNSPECIFIC, Damage=29}}, ItemStack{BEEF x 4}, ItemStack{LEATHER x 2}, ItemStack{SPRUCE_LOG x 1}, ItemStack{GRASS_BLOCK x 64}, ItemStack{SPRUCE_PLANKS x 12}, ItemStack{SPRUCE_PLANKS x 64}, ItemStack{GRASS_BLOCK x 64}, ItemStack{GRASS_BLOCK x 64}, ItemStack{GRASS_BLOCK x 64}, ItemStack{GRASS_BLOCK x 64}, ItemStack{GRASS_BLOCK x 64}, ItemStack{GRASS_BLOCK x 16}, ItemStack{SAND x 41}, null, null, null, ItemStack{STICK x 3}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]
#

Can I turn it to jsonArray

#
"item":"SAND",
"amount":"64"
},
{
"item":"GRASS_BLOCK",
"amount":"64"
}...```
muted sand
analog prairie
#
ItemStack[] itemStacks=event.getPlayer().getInventory().getContents();
JsonArray playerItem = new JsonArray();
for (ItemStack itemStack1 : itemStacks) {
  JsonObject jsonObject = new JsonObject();
  jsonObject.addProperty("Type", String.valueOf(itemStack1.getType()));
  jsonObject.addProperty("Amount", itemStack1.getAmount());
  playerItem.add(jsonObject);
}
System.out.println(playerItem);
#

This is error

quaint mantle
#

Is it possible to make the piglins attract to a different block like Dried Kelp Block ig?

analog prairie
#

Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.getType()" because "itemStack1" is null

young knoll
#

I mean it tells you

quaint mantle
analog prairie
#
ItemStack[] itemStacks=event.getPlayer().getInventory().getContents();
JsonArray playerItem = new JsonArray();
for (ItemStack itemStack1 : itemStacks) {
  if(itemStack1==null) return;
  JsonObject jsonObject = new JsonObject();
  jsonObject.addProperty("item",itemStack1.getType().name());
  jsonObject.addProperty("amount", itemStack1.getAmount());
  playerItem.add(jsonObject);
}
System.out.println(playerItem);
#

This didn't out print anything

quaint mantle
#

because the itemstack is null

#

it returned

#

do continue instead of return

analog prairie
#

Thanks

quaint mantle
#

GG

buoyant viper
#

Paper monkepog

analog prairie
#

Which event is the player crouching?

young knoll
#

PlayerToggleSneakEvent

analog prairie
analog prairie
#

Which event to use when the item on the player changes

granite burrow
#

hey is it possible to make it so that a crafting recipe will only care about every part of an item minus the name? So like it will care about a special tag, the lore, the enchant, but will only check if the name contains the important part

young knoll
#

No

granite burrow
#

dam that sucks

#

Is it possible to only check if the item has the same namespace key and not care about the names of stuff? Just so I can make the recipe pop up in their recipe book as not red

young knoll
#

No

#

The only options are material and exact choice afaik

quaint mantle
granite burrow
#

I got it to give me the item, I just didnt want it to be red in the crafting book

young knoll
#

Not much you can do there

#

The crafting book is mostly client side

granite burrow
#

onlything would be packets or smt huh

quaint mantle
tardy delta
#

is getting a value from a player's persistent data container a heavy operation?

quaint mantle
#

Or idk

young knoll
#

I believe all pdc stuff is cached into a map in memory

#

So not really

quaint mantle
#

Maybe you'e have to do some hackery.. Resending recipes based on materials you have in inventory

quaint mantle
#

it is efficiently cached

drowsy helm
#

its basically just a hashmap

#

pretty efficient

young knoll
#

What would we do without maps

tardy delta
#

ok

hasty prawn
tardy delta
#

crying in my bed

delicate cargo
#

what args do i use with spawnparticle to prevent particle motion?

ivory sleet
#

You can change speed

young knoll
#

They have an extra double that normally controls speed

ivory sleet
#

However the client may still disregard that

delicate cargo
#

okay

upper osprey
#

Hi, im try using code to hide player but optifine not hide

delicate cargo
#

are you saying that optifine doesnt hide the player?

upper osprey
#

That's right, only they can see it and others can't see it

undone pebble
#

you're sure it's not lunar doing it?

upper osprey
#

i tried using optifine and it's similar to lunar

wary harness
#

Any one can tell me how to prevent armorstand which is passenger to block player interaction

#

If I make it marker

#

that helps

#

but I got one more armor stand on top of current one

#

and he falls down then

#

is I make frist armorstand marker

worn tundra
#

What are you making? @wary harness

wary harness
#

like back pack plugin

worn tundra
#

And the back pack is visually on an armorstand, attached to a player?

wary harness
#

yep

#

like there is 2 armorstands

#

custom item is on second one

#

on top

#

but I can hit first one

worn tundra
#

And currently those invisible armorstands interrupt player interaction (right & left-clicking)?

wary harness
#

if I make first one passenger top one falls of

#

yep

#

first one is in player face

#

xd

#

let me show

#

sec

worn tundra
#

The solution is

armorStand.setMarker(true);

btw @wary harness

wary harness
#

on top of player

#

riding each other

worn tundra
#

Yeah?

wary harness
#

if you make first one on top of player marker

#

top one will fall of

#

it wont stay

#

riding armor stand 1

worn tundra
#

A marker can't be a passenger?

wary harness
#

looks like not

#

it is weird

worn tundra
#

But how can the first one work then?

#

Maybe try adding a delay in there?

#

Between making them markers

wary harness
#

hm

#

I will try

#

I really don't want to do this with packets

worn tundra
#

You don't?

#

I don't think you have to

wary harness
#

so just make new Runnable

#

which applays second

worn tundra
#

What?

wary harness
#

armor stand as passinager a bit later

worn tundra
#

Schedule a runnable yeah

wary harness
#

will give it a try

wary harness
#

this is result

#

they are in side each other

#

now

worn tundra
#

Play around with that

#

I know nothing about markers

rapid vigil
#

Hello, I have a question real quick, is there a difference between Map<>() map = new HashMap<>(); and HashMap<>() map = new HashMap<>()?

young knoll
#

Map is preferred

quaint mantle
#

No need to explicitly bind map to implementation

rapid vigil
quaint mantle
#

Unless you need type specific methods

young knoll
#

Basically it makes it easy to swap the implementation

rapid vigil
red sedge
#

hey so

#

how can I strip colors

#

and have them inside the string?

#

so like ChatColor.GREEN would show as &2 or smth

young knoll
#

You would need to manually replace them afaik

#

There is only a way to translate to color codes and remove them entirely

red sedge
#

yeah but how do i get those values

#

i meant like

#

uh

#

yk uh

#

convert the display name to a string with colour codes

young knoll
#

§ is the color character used

#

You can probably just replace it with & via string.replace

red sedge
#

so i just replace that with &?

#

yep works

#

btw why does itememta#setLore doesnt work

young knoll
#

Did you set the meta back after

red sedge
#

yep

#

oh nvm

#

i was setting the wrong var

red sedge
#

um sorry is there a way I can get the data type from a namespace key in a pdc

young knoll
#

No

#

You need to know the data type as far as I know

red sedge
#

well what if i dont?

#

im trying to get all the data values and keys from a pdc

young knoll
#

Well you can get the keys

#

But idk about the types

red sedge
#

yeah but i need the keys and the values

#

and well a way to get em bac

spiral light
#

You can get them with just looping all persistendatatypes ... Or just guessing what it could be

red sedge
#

looping all persistendatatypes?

#

how?

#

theres only getKeys mthod from what i can see

tall dragon
#

or you can save all your stuff in 1 custom persistent data type

#

and boom ur done

spiral light
#

Create an array of PersistentDataTypes

red sedge
#

ohh

spiral light
red sedge
#

im guessing it would return null if the data type is wrong?

spiral light
#

Think sk

red sedge
#

anyways ill try it

#

thanks

young knoll
#

The other alternative is

#

||NMS||

spiral light
young knoll
#

Heh

spiral light
#

Why do you want to get it ?

#

How do you try to access it ?

tall dragon
#

he doesnt, spigot requires it

spiral light
#

Ah I see

#

Was ist the error?

hybrid spoke
#

you got a stacktrace for us?

spiral light
#

I think it is not static ?

hybrid spoke
#

public *static* HanderList...

spiral light
#

Did you look at some other classes?

hybrid spoke
#

he did everything right

young knoll
#

That looks consistent with my event class

hybrid spoke
#

except that he has 2 static handerlist getters

#

but that shouldnt do anything

young knoll
#

You sure you are using the updated jar

#

And nothing is being cached

spiral light
young knoll
#

They have that as well

hybrid spoke
spiral light
#

Oh it's not on the image ...

#

But there is a static method

hybrid spoke
#

yeah he has that too

chrome beacon
#

Is that your event

#

You need to add your handlerlist method

#

?eventapi

undone axleBOT
hybrid spoke
chrome beacon
hollow arch
#

There isn't a way to set the size or title of Inventory-s without creating a new one, right?

hybrid spoke
#

at least i dont think so

lost matrix
hollow arch
#

Yeah, non-hacky way

#

Tyty

hybrid spoke
#

not sure about that

chrome beacon
#

Uh you sure the code is up to date with what you're running

hybrid spoke
#

but that will not modify the container

#

and as smile said its still sending a new one

fervent gate
#

How can I spawn a player using nms?

spiral light
#

Packets

fervent gate
#

So I can't spawn a player as a mob?

young knoll
#

No

dense geyser
#

what would be the best way of storing a mailbox for a player, so when they log in, they get sent all the messages in it (like buycraft package stuff or punishments), I was thinking of saving a db table with the uuid and a json serialized version of a basecomponent, but idk

young knoll
#

You can just save strings if you don’t need any fancy formatting

tardy delta
#

does anyone has a usermanager class to load users from a database where i can take a look at?

dense geyser
#

@tardy delta what are you looking for in particular?

tardy delta
#

well my users are like player wrappers with additional data and i'm looking for a good way to save and load them from db

#

in an async way

tardy delta
dense geyser
#

the way I do it is when they join, I run the data-getting on async and fire a JoinEvent when the player gets in with that data, which means sometimes the player gets in before their data is loaded depending on your db solution. As for bans or vital login data, I get the data async but hold their login until I get a response, if it times out it lets them in anyway

are you looking for a description or methodology (code)

dense geyser
tardy delta
#

oh beh

young knoll
#

I would load the data earlier

#

Maybe the async prelogin event

#

Which is even already async

tardy delta
#

so you can do it sync in there?

#

sync*

young knoll
#

Yes

#

Well, you can do the calls normally

#

It’s sync to that thread, but async to the main thread

#

Just be careful using the API from said thread

dense geyser
#

depends what data you're loading though and how much, if you've got something that blocks logins, you dont want it loading everything then it just disappearing but otherwise, the asyncplayerloginevent is better

dense geyser
#

what db solution are you using

tardy delta
#

mysql

dense geyser
#

ew, I can't really help you there not too sure if my method works with mysql

#

thats a yaml?

red sedge
tardy delta
#

its json

dense geyser
#

json, yaml, yml pAH

quaint mantle
tardy delta
#

reflection..

agile sinew
#

How can I add attributes in item with original attributes

young knoll
#

What version

agile sinew
#

1.17.1

young knoll
#

Welp, rip

red sedge
young knoll
#

You’ll have to use NMS or keep a map of the default attributes

late sonnet
#

the default attributes are not show currently?

agile sinew
#

I can do it if I use nms?

young knoll
#

Yes

agile sinew
#

how to

young knoll
#

You need to manually add the default attribute and then add your custom ones

agile sinew
#

Oh

red sedge
quasi flint
#

bad idea

#

code wont work anyhow if u just try catch

tardy delta
compact crane
#

Does anyone use the Spigot WebAPI to read out the buyers? Does anyone know or has an example code.

red sedge
red sedge
hardy swan
#

I do not recommend using try catch as flow control

red sedge
#

yeah unless you have a better way

#

im just gonna stick with it

hardy swan
#

wait what are trying to achieve here

#

get all data of a certain type from a pdc?

tardy delta
#

lmao someone wrote return()

young knoll
#

return(return(return()))

red sedge
#

just return

#

stop trying

tardy delta
#

well with an object in it

fervent gate
young knoll
#

Did ya run buildtools with --remapped

fervent gate
#

yes

buoyant viper
#
  1. did u run BuildTools
  2. i think spigot means u dont also need spigot-api
hardy swan
warm mica
#

@fervent gate Are you using intellij? You'll have to right click the project and maven -> reload project

buoyant viper
#

oh wait isnt it ServerPlayer not EntityPlayer

young knoll
#

Probably

fervent gate
#

Is it?

#

it is 1.18

young knoll
#

EntityPlayer was the spigot mapping I assume

left swift
#

It should be ServerPlayer

fervent gate
#

Thx

left swift
red sedge
#

Quick question how can I remove smth from the ram

buoyant viper
#

what

young knoll
#

You don’t

#

Java is a garbage collected language, it’ll deal with it

buoyant viper
young knoll
#

Ur a garbage language

buoyant viper
#

wowowow

young knoll
#

<3

hardy swan
#

it's true

quaint mantle
buoyant viper
#

u literally just pop up out of nowhere wtf

hardy swan
#

imagine having to deal with malloc and be a pro

red sedge
buoyant viper
#

every time i try to use it i still end up with garbled data even when im SURE i overwrote it

#

so i just use calloc instead

young knoll
#

What the hell is a memory allocation

#

Is this something I’m too garbage collected to understand

buoyant viper
young knoll
#

Just don’t use those languages

#

Duh

hardy swan
#

must use to get bragging rights

young knoll
#

Use assembly if you want those

buoyant viper
#

mov

#

jmp

#

cmp

golden turret
#

how to do a code without bugs and erros

young knoll
#

I’m making a spigot fork that wraps the entire server in that

hybrid spoke
glossy scroll
quasi flint
hardy swan
warm mica
#

java will remove it automatically for you

fervent gate
#

Can you change the plugin version in intelliJ, is that just changing things in the POM?

buoyant viper
#

pom + plugin.yml i think

#

unless u make maven automagically set the plugin.yml one

hardy swan
#

plugin.yml should be the final say, but yea, you can reference the project's version via ${project.version} in plugin.yml to refer to the project's version you set in pom.xml

fervent gate
#

Using the $project.version in plugin.yml

#

I don't see the MC version in the pom.xml, what should I actually change there?

young knoll
#

You don’t

#

You change the project version

#

Idk the maven format for it but yeah

fervent gate
#

Yea, I can't seem to find that

young knoll
#

?paste the Pom

undone axleBOT
fervent gate
ivory sleet
#

🥴

young knoll
hardy swan
fervent gate
#

That is the plugin version, but not the MC version,

#

I want to change it from 1.12 to 1.17

young knoll
#

That’s a separate thing

#

api-version

buoyant viper
#

api-version

fervent gate
#

Just in the plugin.yml?

#

Mk, thx

young knoll
#

<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.12.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

#

Change that too

supple token
#

Wrong message

young knoll
#

Ikr

fervent gate
#

changed it to spigot

young knoll
#

Don’t forget to change org.bukkit as well

buoyant viper
#

n the sad truth is that spigot isnt the baseline sadge ungodly people still using craftbukkit

fervent gate
#

I don't, just default generated

buoyant viper
#

eh i meant servers

young knoll
#

That’s why you use the bungee ChatColor

#

Give them a nice error

supple token
#

Does anyone know how to fix this?

#

Its my own jda plugin