#help-archived

1 messages ยท Page 35 of 1

chrome lark
#

best practice would be to use a permission plugin which is actually maintained, LP is the main one, pex2 is a WIP, but, they offer cool features for looking up what permissions you're missing and stuff

narrow crypt
#

I want to make it storm more often, what would be the way to go? i was thinking of weatherChange event and then give it a chance to set it to storm?

#

@ocean hamlet if you use luckperms, toggle verbose on and execute the command you wish to

#

luckperms will send you all the perms the plugin checks

old barn
#

Does anyone tell me how to check if the player has the armor and the inventory empty? I've tried everything but I can't

old barn
#
for(ItemStack it : player.getInventory().getContents())
{
    if(it != null) 
}
for(ItemStack it : player.getarmorcontents())
{
    if(it != null)
}
if(it !=null) {
e.setcancelled(true);
}

I tried this code already, but I can't

velvet fox
#

Does anyone know how to get all directions that a lever could be facing? I've tried using Switch and Directional, and they both work to the point that they will return NORTH, EAST, SOUTH, WEST when #getFacing() is called, but if the lever is on the top or bottom of a block it returns EAST. Is there another class I should be using to get the face?

Block leverBlock = leverLocation.getBlock();
Switch leverData = (Switch) leverBlock.getBlockData();
BlockFace face = leverData.getFacing();
tiny dagger
#

values()?

frigid ember
#

I have a problem

#

Can someone help me?

#

Pls

tiny dagger
#

?ask

worldly heathBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.

frigid ember
#

sic my ass

velvet fox
#

Don't ask to ask, just ask ๐Ÿ™‚

frigid ember
#

can someone help me please!

vale slate
#

well, post your problem

tiny dagger
#

i love this guy

frigid ember
#

ok

#

I put world guard protection on the spawn, and I made crates, but players didn't have access to those crates.

velvet fox
#

Go to the EngineHub discord for world guard questions, you can probably get better help there

vernal spruce
#

do you also allow interact in the region? @frigid ember

ocean prism
#

Hi, I have a little problem, I had a loop for but I had a java.util.ConcurrentModificationException in my console, so I used an iterator but I feel like I'm misusing it because I still have it, anyone have an idea?

vale slate
#

you can't edit a list you're currently iterating over

ocean prism
#

Oh

#

What should I change it to?

vale slate
#

shadow the list, iterate over that and remove from the original one

obtuse rose
#

you need to use iterator.remove() instead

#

you can remove it from list if you remove it that way

#

but only the one being iterate over though

#

I mean.... idk I'm not good at explaining xD

vale slate
#

oh yes now I remember

ocean prism
#

All right, I think I understand, that means the iterator will understand that I'm on the point since it doesn't ask for an argument.

chrome lark
#

there is the removeIf methods, which is likely much better for that specific case

zenith siren
#

Does anyone have a good tutorial for sending packets from a bungee plugin

chrome lark
#

But, using an iterator is basically the good ol' goto there

ocean prism
#

Yeah I did that, it was just to understand the iterator in the first place.

obtuse rose
#

@ocean prism if you do iterator.remove() it will remove the current object that you just got from .next()

#

but if you just want to remove, removeIf probably cleaner

vale slate
#

there are computing functions for lists like the removeIf function, they are lightly more efficient

frigid ember
#

๐Ÿ˜ฎ

tiny dagger
#

there is also the way of creating an imutable list loop from it and remove from main way i think ๐Ÿค”

ocean prism
#

All right, thank you all ๐Ÿ˜„

#

I didn't understand Fr33styler

vale slate
#

should i report them here?
@iron ravine well copy a message link or screenshot and then ping one of the staff

#

there is also the way of creating an imutable list loop from it and remove from main way i think ๐Ÿค”
@tiny dagger I already said that it's the very old way

tiny dagger
#

it's not that efficient really so better go with the other 2 way

obtuse rose
#

removeIf theoretically should be more efficient than that I believe @tiny dagger

cobalt thistle
#

bah la fait pas mdr

ocean prism
#

So, it works but half lol, I certainly don't have ConcurrentModificationException anymore, I don't have console errors anymore but it doesn't do what I do, and when I make sure I don't have this basic error (i.e. wait) it does everything correctly

#

@cobalt thistle t'es un rigolo toi mdr

#

My code, i've iterator.remove();

tiny dagger
#

then it's something from you side, add debug messages if you can't figure out

ocean prism
#

The problem is that nothing happens, the only change is that I don't have any console errors.

tiny dagger
#

so you want to remove filestates that are not accepted right?

#

well it does that from my point of view

ocean prism
#

Yes, but, uh, maybe I'll give you a little context so you'll understand:

silk gate
#

@iron ravine do it on the site

#

still report them on the site

ocean prism
#

I do a RESTful api, which allows my program to retrieve internal json information from a url, roughly that's it, but before I had a simple loop in my method, and as soon as I asked to return the information during this manipulation, I had a ConcurrentModificationException in the console which canceled the method, so I used an iterator to fix it, problem being that when I call the method during the manipulation I don't get an error in the console but the method always cancels itself. @tiny dagger

silk gate
#

(as in pm someone)

vale slate
frigid ember
#

Did they purchase spartan?

#

doesn't look like main account anyway :/

finite belfry
#

is there any auto update plugins out there?

vale slate
#

so a plugin looking for other plugins updates?

frigid ember
#

Installer i guess

#

but that was very broken the last time I used it

#

crashed the server 99% of the time

#

cc

#

i am new in spigot

#

Im making a messaging system, that has like threads so you can do /reply [threadid] ok etc when you're offline
Like on the forums with the conversations, what is a good name to call it, a thread, conversation or what

#

please can you tell me some sites you are using to create server

finite belfry
#

so a plugin looking for other plugins updates?
@vale slate yes

vale slate
#

there are a lot out there, but they are not what you would consider good or helpful

bronze marten
#

autoupdate is bad for production

finite belfry
#

ok

digital peak
#

Hey, just out of interest how would I go about changing my name on the forums? Do I need to donate? If so, how much?

#

Would be great if y'all could ping me ๐Ÿ™‚

tiny dagger
#

10 bucks minimum

digital peak
#

Ah okay, are there any other perks of donating?

tiny dagger
#

not sure

#

themes

#

a forum for donors only

sick spear
#

hey, i've been trying to understand why im getting this error on my plugin although couldnt get anything on it, can anyone help me?

error: ```java
15:48:38 [WARNING] Error enabling plugin BedMC
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at net.md_5.bungee.api.plugin.PluginManager.enablePlugin(PluginManager.java:328)
at net.md_5.bungee.api.plugin.PluginManager.loadPlugins(PluginManager.java:235)
at net.md_5.bungee.BungeeCord.start(BungeeCord.java:272)
at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:62)
at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)
Caused by: java.lang.IllegalStateException: JavaPlugin requires org.bukkit.plugin.java.PluginClassLoader
at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:50)
at org.bedmc.bungee.BungeeMain.<init>(BungeeMain.java:5)
... 9 more

Bungee just keeps giving me this error and never initializes the plugin.
tiny dagger
#

Caused by: java.lang.IllegalStateException: JavaPlugin requires org.bukkit.plugin.java.PluginClassLoader
at org.bukkit.plugin.java.JavaPlugin.<init>

#

i think this is straight forward

sick spear
#

yeah i read that although i tried importing pluginclassloader although i get this

tiny dagger
#

don't import bukkit into main class of bungee plugins to begin with

sick spear
#

oh

#

sorry im still new at this if im doing alot of basic mistakes ๐Ÿ˜…

#

so where do I import it?

boreal tiger
#

you dont import it because its a bungee plugin

tiny dagger
#

there is for sure a bungee tutorial

#

it's not the same as bukkit

sick spear
#

oh, yeah im watching one, although he never mentioned anything about classloader

tiny dagger
#

it's the thing you extend your plugin

#

and don't watch

#

look on the spigot forum

tiny dagger
#

blic class TestPlugin extends Plugin {

#

import net.md_5.bungee.api.plugin.Plugin;

#

@Override
public void onEnable() {
// You should not put an enable message in your plugin.
// BungeeCord already does so
getLogger().info("Yay! It loads!");
}

#

this is the main thing

#

there is nothing more to it

#

well from here is to make what you proposed

rotund fulcrum
#

I need help with EssentialsX

#

It won't let me sell music discs on signs

sick spear
#

oh alrighty, thanks! Sorry for the simple mistake just a bit confused with the bungee api

rotund fulcrum
#

help

restive shard
#

Hello ๐Ÿ˜„

#

mob.setSpawnedType(EntityType.ZOMBIE); do i have to do switch or enum, or list to check args?

unreal hedge
thorny quartz
dusty topaz
#

How come Bukkit.broadcastMessage(event.getItem().getType().toString()); is broadcasting SUGAR_CANE_BLOCK when I'm using 1.15 holding sugar cane

#

SUGAR_CANE_BLOCK shouldn't exist, right?

#

ah, it was to do with not setting api-version: 1.15 in plugin.yml ... nevermind

restive shard
#

anyone can help me with regards to the question i asked earlier?

#

mob.setSpawnedType(EntityType.ZOMBIE); do i have to do switch or enum, or list to check args?
@unreal hedge

frigid ember
#

I don't understand your question @restive shard

restive shard
#

oh

frigid ember
#

Because if it returns true when amount is less than one, I'd need to check the amount anyway. Just confused.

dusty topaz
#

Checks if the inventory contains ItemStacks matching the given ItemStack whose amounts sum to at least the minimum amount specified. is the updated javadoc one

#

in spigot 1.15

restive shard
#

what i mean is, i want to do
/spawner (args)
i would need to open a if else statement to check for every mob in minecraft. i.e. (EntityType.CREEPER, EntityType.ZOMBIE)

#

is there any easier way?

ocean prism
#

Hey, Is it possible to create a command that if it already exists does not replace it?

frigid ember
#

use EntityType.valueOf(STRING) @restive shard

#

Hey, Is it possible to create a command that if it already exists does not replace it?
@ocean prism it's possible, personally am not sure how, but essentials has (or used to have) a config option to enable their cmds to override or not override other commands

#

ty @dusty topaz appreciate it

dusty topaz
#

@ocean prism getServer().getPluginCommand("");

#

Will be null if command isn't registered

frigid ember
#

Make sure your plugin loads after the rest though I think? ^

ocean prism
#

I think I misspoke what I want ๐Ÿ˜…

dusty topaz
#
if (getServer().getPluginCommand("test") == null) {
  getCommand("test").setExecutor(new TestCommand());
}
#

Is this what you want?

ocean prism
#

I want to make a help command, but it already exists by bukkit, I would like that if I create a help command, the ones that bukkit does run but my command does as well

dusty topaz
#

Listen on the CommandPreProcess event and check if the message is /help (or whatever) and then run yours

ocean prism
#

Yes nice

dusty topaz
#

but don't cancel the event and the server will run the other one too

ocean prism
#

okok thanks u ๐Ÿ˜„

dusty topaz
#

Is there an event called for when sugar cane breaks on its own?

#

I'm trying to allow for sugar cane to be grown on something like obsidian

#

I can place it down using this:

#
    @EventHandler
    public void onInteract(PlayerInteractEvent event) {
        if (event.getAction() == Action.RIGHT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_AIR) {
            if (event.getItem() != null && event.getBlockFace() == BlockFace.UP) {
                if (event.getClickedBlock() != null && event.getClickedBlock().getType() == Material.OBSIDIAN) {
                    if (event.getItem().getType() == Material.SUGAR_CANE || event.getItem().getType() == Material.CACTUS)
                    event.getClickedBlock().getLocation().getBlock().getRelative(BlockFace.UP).setType(event.getItem().getType());
                }
            }
        }
    }
#

But neither BlockPhysicsEvent or BlockFromToEvent call when it spontaneously breaks

wanton delta
#

I dont think you can prevent it

#

What you could do (this might be a little hacky) is send a packet to make the client think theyre placing it on obsidian but the real block is sand

nova mantle
#

Hello, why I don't have my plugins in my purchased resources? anyone to help me

vernal spruce
#

@nova mantle contact support on forum

unreal hedge
#

@nova mantle Contact the author of the plugin you purchased in Spigot messages

vernal spruce
#

mhmm best way to save an object containing loc,type,level,level? Atm can't think anything else but in 1 config alone

#

it's a custom block so it iwll always be loaded

rotund fulcrum
#

trying to host 1.8.8 but whenever i try to open the server.jar it doesn't show up

#

the window never comes open

#

help

vernal spruce
#

how you open it?

rotund fulcrum
#

just straight from file

#

file explorer

vernal spruce
#

you dont..

rotund fulcrum
#

i have java

#

what?

#

everyone else just opens it from File Explorer

#

ยฏ_(ใƒ„)_/ยฏ

vernal spruce
#

we dont..

keen compass
#

don't double click it

vernal spruce
#

place this into notepad then save as start.bat

rotund fulcrum
#

???????????????????///

vernal spruce
#

java -Xmx4G -jar server.jar -nogui
PAUSE

#

server.jar being your file

keen compass
#

you need to run it from command prompt or some other command line

rotund fulcrum
#

notepad

#

which notepad

vernal spruce
#

doesnt matter

rotund fulcrum
#

ok

vernal spruce
#

it will give you the optino to save as.. and manually type start.bat

#

also change Xmx based on how much ram you wish to allocate

unreal hedge
#

@vernal spruce store in a data file or database with the location coords as the primary key.

vernal spruce
#

thats the thing im already doing it

#

i avoid database to let everyone use it

#

even if they dont have sql

unreal hedge
#

Generally people give support for both, it just depends really

vale slate
#

^

unreal hedge
#

Like are people going to need that block information on other servers in the same network, or information to show on a website?

#

Prolly not in your case

#

So go ahead, make it flatfile

vernal spruce
#

yeah its not per player or anything so i can't make a custom config for each..

#

i mean i could but i dont see why..

unreal hedge
#

Yeah, just a data file will do

keen compass
#

if you don't need it human readable, suggest going with memory mapped files

unreal hedge
#

Even considering they'll always be loaded when the server is online, you'd have to account for restarts therefore saving it. I can't really think of any other ways of saving that data

#

As for the type, level and level, is there a way you can just work that out based on the time the object was placed?

vernal spruce
#

i can rather save it like

#

locaiton,data:1,1,3

#

to save even more..

unreal hedge
#

It'd be much less resource consuming storing the time and location and not having them loaded in memory

#

Instead, calling upon them when needed.

#

Well I guess it depends, idk the context well enough

vernal spruce
#

theyr loaded into memory as theyr gonna each do something

unreal hedge
#

Yeah fair enough

vernal spruce
#

so i have a "lava crucible" from one of em modded packs

#

meaning it has to stay loaded so the loop transforms its "contents"

unreal hedge
#

I was just thinking if you had like millions of entries, defs don't store in memory lmao

#

But yeah I get ya

vernal spruce
#

nah at most like 100-200

unreal hedge
#

Alright, nice

keen compass
#

memory mapped files will do you justice in this instance. Memory mapped files are separate from the JVM therefore doesn't have any impact on the application. Also, you allow the OS to handle write and reads which is faster. If the server crashes the OS will handle saving the file. Also memory mapped files can be shared between processes as well.

soft fable
#

question, i wanna give a little chance to gain a bit of hunger in hit. how is that made?

vernal spruce
#

with like 15sec loops to avoid crowding

#

mhmm im gonna look into mapped files then

unreal hedge
#

EntityDamageByEntityEvent & Math.random() * 100

#

All I'm gonna say @soft fable you should be able to work out the rest :3

keen compass
#

you also don't have to load the entire file into memory either you could optionally just load parts of it at a time

soft fable
#

ok thanks!

unreal hedge
#

If you want to account for arrows, snowballs etc, then that's on you

keen compass
#

but if you are only going to have like 100-200 lines of entries, at most you are looking 10mb of ram being used on it

vernal spruce
#

it's usually loaded at the start of the server where there is no activity

unreal hedge
#

I guess that event would work for those instances as well, if it doesn't matter who the shooter was

keen compass
#

the only downside of memory mapped files is that you need to determine ahead of time how much ram to allocate to the file

#

can't change it afterwards without unloading it and then re-loading it back into ram

vernal spruce
#

ouch..

keen compass
#

but, 100mb of ram will be plenty though

unreal hedge
#

My question is

#

Do they really need to be blocks?

keen compass
#

and in todays age of ram, 100mb is nothing XD

unreal hedge
#

Can't you make them invisible noAI entities

#

And let the jar handle the rest? ๐Ÿ˜‚

#

People would also be interacting with entities less than they would be with blocks.

broken topaz
#

hello??

unreal hedge
#

G'day

vernal spruce
#

hmm it could work

#

but at that point the ideea why even bother with entities do it packet based gets around..

fleet burrow
#

I have an object that is storing lots of items.
I have a GUI that uses those items and builds an inventory, like a chest players can take items out of that inventory.
Do I need to handle the item takes and entries using InventoryClickEvent to update the items in the object according to amount taken etc... ?
Because I tried that and it didn't work and was hell

vernal spruce
#

i can do it through packets but theyr so annoying to work

unreal hedge
#

So I am guessing with your lava crucible, you listen for players to drop their items into the lava?

vernal spruce
#

it opens a gui wich they can interact with

unreal hedge
#

I'll be doing something similar eventually, with Greek deity themed shrines, to replace crates.

vernal spruce
#

showing lava level,cobble level.. heat source under

unreal hedge
#

The word crates just sickens me now, overused and unoriginal

#

Oh okay

#

That makes sense

vernal spruce
#

it tries to be immersive without using a texture pack..

unreal hedge
#

You could have an NPC that's called "The Blacksmith" lol, or an invisible entity and wait for it to be interacted with

vernal spruce
#

already did a plugin spawning a fake player wich gave quests so it wouldnt be that hard

#

dem packets..

unreal hedge
#

@fleet burrow Are you trying to do something similar to PlayerVaults?

vernal spruce
#

all that work just to avoid having dependencies

#

playvaults in theory seems quite easy to pull off,ur just reading/writing a players own file..

unreal hedge
#

Well it's worth it, you can let Spigot handle the storage/loading of the data (the entities), all you need to do is listen for interactions for that particular entitiy's UUID

#

Ikr, I haven't looked into those infamous duplication glitches associated with it though

#

Something about using it while standing on a lilypad? ๐Ÿ˜‚

vernal spruce
#

it shouldn't matter depending on how you save it..

fleet burrow
#

@fleet burrow Are you trying to do something similar to PlayerVaults?
@unreal hedge not really but in theory, yes

vernal spruce
#

i save my guis storage on closeevent,setting them all null then getting each slot and saving it..

#

but theyr not often changed(rewards for things)

fleet burrow
#

well

vernal spruce
#

@fleet burrow go more in depth

fleet burrow
#

List<PlayerFuel> fuelsWithEnoughEnergy = machine.getFuels().stream().filter(fuel -> fuel.getEnergy() >= machine.getFuelDeficiency()).collect(Collectors.toList());
Does this give me a clone?
if I do fuelsWithEnoughEnergy.get(0).setEnergy(something)
Will it change it here machine.getFuels() ?

unreal hedge
#

Pretty sure it should clone

dusty topaz
#

It's a new list yeah @fleet burrow

fleet burrow
#

๐Ÿ‘

#

what about before I collect

#

if I use findAny

unreal hedge
#

Test it ๐Ÿ™‚ If not, then you've learnt it doesn't and to just simply use .clone()

#

If it isn't clonnable, try to make it clonnable

fleet burrow
#

It will be kind of hard to test that

dusty topaz
#

no it won't

unreal hedge
#

Arvo, you tried making a modular project before?

keen compass
#

modular projects are fun

unreal hedge
#

I've considered using Spring before, not too sure where to start with my minigame framework that I'd like to make.

#

The reason why I want to make it modular, is at this stage I'm just guessing what I'd reuse with the first minigame I'm making on my network.

#

There'll likely be much more I'll need to add to the framework in future.

fleet burrow
#

it's a reference in both cases

unique oyster
#

how can i test if a blockdata represents a tilestate?

fleet burrow
#

the list is a clone but the inner vallues are not

#

which makes sense when I think about it now

hollow drift
#

Does anyone have a suggestion on how to uniquely identify a server?

Like I am saving data to a shared database for a server cluster, but some of that data is server-specific. Where could I get an id or tag of some kind to differentiate servers? Does such a thing exist?

#

(short of forcing users to put an id in a config file)

unreal hedge
#

uhh

#

Its IP address? ๐Ÿ˜‚

#

IP + port ofc

hollow drift
#

Well by "server" i really mean "server instance"

#

oh yeah but port+IP could work

#

(they may be running on the same physical machine)

unreal hedge
#

Mhm x)

hollow drift
#

though it'd be a shame to lose data if an admin wants to re-arrange internal ports (e.g. behind Bungee) ๐Ÿคทโ€โ™‚๏ธ

unreal hedge
#

Is it more relevant for the IP address/port they use to connect?

#

Or for every single server instance on a bungee network for instance?

hollow drift
#

Well I think most often that's all transparent- yeah every instance on a network

unreal hedge
#

Just do that, save backups regularly.

hollow drift
#

Basically think of something like LogBlock but working across multiple servers at once

#

I'd prefer something independent of any sort of server config (like port#) but I don't think such a thing exists

#

I was considering using the UUID of the default world...

unreal hedge
#

You could do what Votifier does ๐Ÿคทโ€โ™‚๏ธ

hollow drift
#

Which is.. ? ๐Ÿ˜„

unreal hedge
#

Private token and a public token, get the server owner to verify each instance.

hollow drift
#

ah yeah

unreal hedge
#

Even if they change their port, you still have that same instance.

hollow drift
#

Mhmm, that could work but I'd prefer zero admin interaction (I know, I'm being a pain lol)

unreal hedge
#

Only way for that to occur is the IP/ports and save regular backups

#

If they change their port of their server, that could be an issue

#

But at least you'd have backups if they contact support lol

unique oyster
#

how can i test if a blockdata represents a tilestate?

hollow drift
#

yeah- the backups dont' super help, if they change the port then I need some way to fixup all the data

#

heh .. yeah

#

Hm well it occurs to me the data is really per-server/world .. so maybe I just switch to world uuids

unreal hedge
#

Wouldn't hurt ๐Ÿ˜›

#

But what if someone purposely tries flooding your database with fake world UUIDs?

hollow drift
#

I mean no one but a server admin would have access like that

vernal spruce
#

man.. just finished with creating a gui based of holders,and it's so nice

hollow drift
#

if they want to crash their own db, by all means ๐Ÿ˜„

unreal hedge
#

Oh, it's just their database lmao, my mind just had diarrhea for a second.

wraith beacon
#

so i wasted an entire night trying to figure out why my spigit minecraft server wasn't working right

#

is it really cause it doesn't support bedrock clients connecting to it?

vernal spruce
#

are you expecting a c+ based client to connect to a java server?

wraith beacon
#

or i'm just an idiot?

unreal hedge
#

Spigot servers don't support bedrock clients I believe

wraith beacon
#

yeah, i didn't relize spigot was java haha

vernal spruce
#

we have no crossplay yet(unless screwing with things)

wraith beacon
#

atleast i figured it out before i spent all day today troubleshooting it

vernal spruce
#

and also bedrock has pretty much no modding..

unreal hedge
#

Bedrock to java edition is like apple to samsung

wraith beacon
#

yeah, i know ๐Ÿ˜ฆ but i have a 5 year old that plays xbox minecraft i want to have his older siblings and myself play on pc

vernal spruce
#

heard client runs smooth af,but bedrock server has shite performance..

wraith beacon
#

so i'm forced into cross platform.

vernal spruce
#

you gonna have to setup a bedrock server

#

and have the bedrock edition on pc

wraith beacon
#

yeah, i had one setup, but then i was looking for mods and came across spigot, installed that in the same folder... and yeah, been wondering why i couldn't connect to it ever since till this morning.

vernal spruce
#

yeah sadly dont expect much on bedrock

#

you can't mod it like java..

unreal hedge
#

Yea

vernal spruce
#

beside the usual spigot,forge is not working on bedrock to have modpacks..

wraith beacon
#

sigh, i seen some youtube videos on how to mod it, but it requires making all the files urself after executing the mods on a local client.

vernal spruce
#

so no more cool things

wraith beacon
#

very tedious. lol

vernal spruce
#

and not rly worth bothering i think... better to stick to vanilla..

gloomy flower
#

(I'm running a bungee cord network fyi)

slim hemlock
#

is there really no way to know if an item has no more durability?

#

without hardcoding the durability

unreal hedge
#

Why not hook up another monitor or connect remotely to the TV with a virtual PC

#

Then let your son connect his xbox controller into your pc

#

Then you both technically have a computer you can use for Java edition servers ๐Ÿ˜‚

vernal spruce
#

@slim hemlock doesnt the new damageable let you know?

slim hemlock
#

you have get has and set

#

there is no "max"

#

and you can't rely on it hitting 0 because it counts up, not down

#

so I'm at a bit of a loss

old barn
#
for(ItemStack it : player.getInventory().getContents())
{
    if(it != null) 
}
for(ItemStack it : player.getarmorcontents())
{
    if(it != null)
}
if(it !=null) {
e.setcancelled(true);
}

not work, why?

slim hemlock
#

why is Damageable so weird

#

@vernal spruce I don't want to listen to when something breaks, I want to apply custom damage and know when it's supposed to break in vanilla terms

#

because rn you can just keep piling it on forever

#

setting custom damage will never break the item

unreal hedge
#

The only way an item would exist with no durability, is if you spawn it in.

#

Otherwise, it'll break as per server functions

vernal spruce
#

well it can depend on how you wish to do it

slim hemlock
#

what I mean is that you can set your item to have whatever durability you want

#

minecraft will never break it when you set it

vernal spruce
#

a work around is setting the item unbreakable then storing durability inside

slim hemlock
#

but I want to break it

vernal spruce
#

so you can handle it

#

call the break event?

unreal hedge
#

So are you suggesting no matter what you set the durability to, the item will not break no matter how long you use it for?

slim hemlock
#

it's for a deathchest plugin, I want to apply a custom durability loss as a death penalty and then put the items in the chest if they still have any durability left

#

right now there's a bug because players have fun just dying over and over again to see the durability bar break

#

it will keep going into the negatives till it's offscreen

unreal hedge
#

๐Ÿ˜‚

vernal spruce
#

well time for u to use deprecated methods

#

to get durability

unreal hedge
#

What you need to do is if the durability is 0 or below

#

Then remove the item.

slim hemlock
#

wrong

#

you count up, not down

unreal hedge
#

Yeah, if it's negative maybe lol

slim hemlock
#

no, see

#

this is what makes this system great

vernal spruce
#

well what even is this?

slim hemlock
#

the bar goes down as the counter goes up

#

oooh that might work

#

thanks

unreal hedge
#

You could also set a minimum durability

vernal spruce
#

the layout its strange doesnt point to something in particular

slim hemlock
#

maximum major

unreal hedge
#

So assure it won't lose anymore durability after that point, otherwise bye bye item

slim hemlock
#

but yeah I was considering that as a last resort

#

bit problematic because people might be using swords with dur X

unreal hedge
#

Deprecated. durability is now part of ItemMeta. To avoid confusion and misuse, getItemMeta(), setItemMeta(ItemMeta) and Damageable.setDamage(int) should be used instead.

#

So you're setting its damage, not its durability

#

So yeah, I get ya

#

Given that each item has a different durability, you could also look at adding a % to the damage instead

slim hemlock
#

glad to see I'm not the only one having a hard time getting the details of this subsystem straight

vernal spruce
#

wouldnt going into nms with nbttag provide the maximum item durability?

unreal hedge
#

See why it's deprecated there as well, then you quickly realize (as I did) you are setting the damage instead.

slim hemlock
#

actually hang on

#

the docs say this returns the max durability for the material

#

that won't fly

#

it doesn't take enchants into account

vernal spruce
#

i think ur over complicating things for not that big of a thing..

unreal hedge
#

All the enchantments do, is give the item less damage every time it is used.

slim hemlock
#

oh it doesn't increase actual durability?

unreal hedge
#

Correct

slim hemlock
#

oh I see

unreal hedge
#

So what is your goal? Do you want to add a particular amount of damage to all items globally? Add a % of damage to all items globally? Or add damage that is equal to uses?

#

Like damage that is equal to 15 uses

slim hemlock
#

that's actually interesting, the implementation of enchants in mc looks like it was conceived by a raving lunatic

unreal hedge
#

Because that damage amount will be different, even for the same materials if they have unbreaking.

slim hemlock
#

uses-based skillage

#

doesn't need to be a pixel-perfect debuff, just a deterrent

old barn
#

How do I check what kind of spawner it is?

unreal hedge
#

It's up to you, if you want to take Unbreaking into account

vernal spruce
#

@old barn cast the state to CreatureSpawner then do getMobType or something similar

slim hemlock
#

ok sanity check I can't be the only one questioning why durability loss is based on chance instead of on fixed values right?

unreal hedge
#

You can see that it is a superclass of BlockState*

old barn
#
for(ItemStack it : player.getInventory().getContents())
{
    if(it != null) 
}
for(ItemStack it : player.getarmorcontents())
{
    if(it != null)
}
if(it !=null) {
e.setcancelled(true);
}

not work, why?

unreal hedge
#

Oh, you want to get the spawner type in the inventory lol

old barn
#

no

vernal spruce
#

nope thats some spaghetti code

#

if(it!=null)?

unreal hedge
#

Now I feel like spaghetti ๐Ÿ˜ฆ

#

So mean

vernal spruce
#

ur doing nothing with that check

old barn
#

I want to check that the player's inventory and armor is empty

stable roost
#

Quick question, I'm a noob here so sorry for the dumbness, my enable-query is set to false, yet I can still see it at mcsrvr.

I restarted the server.

#

Is this behaviour wrong?

unreal hedge
#

if(firstEmpty() != -1){ return;
for(ItemStack item : inv.getArmorContents()){
if(item.getType != Material.AIR) return;
}}
boom, no armor and empty inventory

#

Yeah I was lazy okay

#

Shush

#

If ima spoon feed, that's what you get

vernal spruce
#

dirty spoon feed,shameless๐Ÿ˜‚

old barn
#

if (firstempty() != -1) it works?

unreal hedge
#

Oh wait

#

My bad nuh

#

That wouldn't work

#

My brain go poo poo

#

Oh yeah it would work lol

#

So what that means, is if there is no empty slot

#

It will return -1

#

As for armor, the list won't be empty, it'll just contain air, an armor of air! ๐Ÿ˜ฎ so yeah, if any of the armor isn't air then also return

hollow drift
#

Hmmmm so we used to have Server.getServerId() - where did it go and why did it go away?

#

@deprecated not a standard server property

#

ah, well

#

That would've worked perfectly for me ๐Ÿ˜„

wicked atlas
#

Hey so when a player dies, it has this component in the death message. Does anyone know how to get that component from a player? https://imgur.com/a/fZz3sp3

frigid ember
#

@wicked atlas what do you mean? From a player when they type a normal message?

wicked atlas
#

no I want it from a Player object

#

because I'm making a custom death message-ish thing

#

and want it to behave the same

frigid ember
#

So you want to be able to print out a custom message with the same hover effect?

wicked atlas
#

correct

#

and color and stuff

frigid ember
#

Ah, one moment...

dusty topaz
vale slate
#

yes

wicked atlas
#

yes those

dusty topaz
#

Then read that wiki and you're sorted ๐Ÿ‘

wicked atlas
#

I was hoping I can get the one in the death messages from a player

#

rather than making it manually

vale slate
#

nop

wicked atlas
#

does anyone know how to get a player's team/team's color?

vale slate
#

scoreboard?

naive goblet
#

Isnโ€™t there a cmd for it?

dusty topaz
#

I think he is wanting it in a plugin though

wicked atlas
#

yeah

naive goblet
#

Or accessible with scoreboardmanager then

vale slate
#

^

wicked atlas
#

I'm just reconstructing that component manually

dusty topaz
#

that is how it was likely done initially

naive goblet
#

Use the server instance to obtain the ScoreboardManager then get the scoreboard wanted and call Scoreboard#getTeams

#

There is probably a method to get a specific Team

#

Check the docs

fleet burrow
silk bane
#

intellij is right

#

as usual

radiant pollen
#

@fleet burrow You break in the original if statement, so the if(found) is always false.

fleet burrow
#

but i am setting found in the if

silk bane
#

notice that in the only codepath where found is set to true, you break

fleet burrow
#

oh im stupid

radiant pollen
#

You don't need the found variable at all. You're already breaking.

fleet burrow
#

lmao

#

yeah lol

tiny dagger
#

lol

#

i don't think if this is a good example

#

but does it do that for this too? ๐Ÿค”

fleet burrow
#

why eclipse

#

why lightmode

tiny dagger
#

because it attracts bugs

fleet burrow
#

lmao

#

wait i just got it

subtle blade
#

Yes, same situation, fr33

tiny dagger
#

no but seriously, you don't get eye strain like at all

wind dock
#

so uh

#

im getting thousands of

#

[13:23:39] [Server thread/WARN]: Ignoring unknown attribute 'forge.swimSpeed'

#

flooding my console

#

flooding

#

so uh

#

what do i do?

rotund fulcrum
#

i need help with port forwarding so i have an ip for my server

subtle blade
#

[13:23:39] [Server thread/WARN]: Ignoring unknown attribute 'forge.swimSpeed'
Is it a Forge server? Or was it at one point a Forge server?

frigid ember
rotund fulcrum
#

i need help with port forwarding so i have an ip for my server
@rotund fulcrum

zenith siren
#

This is bungeecord
I keep getting a NPE when trying to send a packet via bungee
This code is triggered via a test command

        PlayerListItem pli = new PlayerListItem();
        pli.setAction(Action.ADD_PLAYER);
        PlayerListItem.Item item = new PlayerListItem.Item();
        String[][] properties = null;
        item.setPing(0);
        item.setUuid(UUID.randomUUID());
        item.setUsername("Test");
        item.setGamemode(0);
        item.setProperties(properties);
        pli.setItems(new PlayerListItem.Item[] {item});
        p.unsafe().sendPacket(pli);
        return;

This is the NPE (it's long): https://pastebin.com/ZCTuePx8

radiant pollen
#

@rotund fulcrum port forwarding depends entirely on your modem/router so we can't really help you

#

@zenith siren We can't tell which line number each line is.

#

Which line is line 87?

upbeat wyvern
#

i think it's line 87 from playerlistitem in bungeecord

radiant pollen
#

Oh yeah you right

zenith siren
rotund fulcrum
#

damnit, see i can't figure out how my router works with this

#

i cant send images

vale slate
#

get verified

agile pumice
#

Does anyone here have a good tutorial for bukkit async tasking?

rotund fulcrum
upbeat wyvern
#

@zenith siren i think its comming from the properties

rotund fulcrum
#

I use Ubee Router

#

I have no idea how it works

#

๐Ÿ™

upbeat wyvern
#

cause line 87 in PlayerListItem use

DefinedPacket.writeVarInt( item.properties.length, buf );
zenith siren
#

@zenith siren i think its comming from the properties
@upbeat wyvern

Is there a way to get valid properties, maybe from the player

agile pumice
#

I tried myself something from some source of tutorials for bukkit async, but it didnt work very well and i think i did not fully get it

upbeat wyvern
#

@zenith siren maybe try with an empty array

#

but not a null object

zenith siren
#

YES

#

Thank you

rotund fulcrum
#

I need help on port forwarding. I use a Ubee router. It looks different than everyone elses. If someone recognizes or could help me with this, it would be greatly appreciated.

wicked atlas
#

but it clearly does exist, otherwise I couldn't have compiled it

frigid ember
#

anyone knows what caused this big lag spikes

broken topaz
#

Can i have help for so i can turn the compass into a go to place if you get me

wanton delta
#

@rotund fulcrum its pretty self explanatory

fast folio
#

Hey, do someone is good at spigot MODDING ? not Plugin but modding

frigid ember
#

@zenith siren

wanton delta
#

Your local ip is what you find doing ipconfig

frigid ember
#

what is playerlistthinty

#

import

wanton delta
#

Start & end port is the same, 25565 i assume

frigid ember
#

playerlistitem

#

what is its import

wicked atlas
#

you can't make mods with spigot

#

look into fabric or forge

wanton delta
#

Protocol is the only tricky one, use Both if you have it, but TCP is fine

#

And fhen set enabled to on

rotund fulcrum
#

Bruh, I have no idea what you're talking about

#

๐Ÿคค

#

This is what I am confused about; my router's website thingy looks different making every single other tutorial on the internet obsolete

#

Sometimes their router has more options or less.

#

Making it simpler or harder for them

#

But I will look harder

zenith siren
#

@frigid ember, that was in bungee and not spigot but it is net.md_5.bungee.protocol.packet.PlayerListItem

rotund fulcrum
#

@wanton delta Under what category is it in ipconfig?

#

There are multiple with multiple IPv4 and IPv6.

#

'Ethernet adapter Ethernet' doesn't show anything

#

below it

#

๐Ÿ˜ฆ

#

OHHH I don't have an Ethernet adapter hooked up.

inland meteor
#

@frigid ember have you pre-loaded your world? It could be users going into new chunks

tiny dagger
#

@rotund fulcrum use ipconfig /all

wanton delta
#

@rotund fulcrum its gonna be your iPv4 address

#

Make sure you choose the one you use

#

For example i have both wifi and ethernet on my pc

rotund fulcrum
#

only wifi

#

๐Ÿ˜ฆ

wanton delta
#

I use erhernet

#

So i would choose the ipv4 that is under ethernet

rotund fulcrum
#

i chose

#

Wireless LAN Adapter Wi-Fi

vale slate
#

meh a server over WiFi

#

?

rotund fulcrum
#

im not close to my router

#

i don't have a giant ethernet cable

#

i can move?

#

do you want me to move?

#

then again, i am using a laptop that has good specs

#

laptops don't have ethernet

red bolt
#

get a giant ethernet cable then

rotund fulcrum
#

laptops don't have ethernet
@rotund fulcrum

sage flame
#

I mean a lot of them do

rotund fulcrum
#

i'd need a USB extender

#

mine dont

#

ethernet cables require a bigger hole

sage flame
#

It doesn't really matter if this is a server for friends or smth similar

rotund fulcrum
#

no

#

it's public

sage flame
#

How many people do you plan to host?

rotund fulcrum
#

oh, i am planning on releasing this off of my factions server

#

which is going to be a skyblock

#

so first day we'll have like 15 players?

#

idk

sage flame
#

Okay then you should use an ethernet cable

rotund fulcrum
#

up to 50 players, but i can't use one

#

๐Ÿ˜ฆ

#

my laptop doesn't allow ethernet

inland meteor
#

unless you have good internet, it is going to lag like crazy

sage flame
#

Your server will probably struggle to keep up on wifi

rotund fulcrum
#

should i just get as close as possible to my router?

#

so the connection is closer?

inland meteor
#

That really wont make a difference in the large scheme of things

rotund fulcrum
#

tru

inland meteor
#

It will struggle no matter what, due to self hosting

sage flame
#

If you must use wifi, what band do you use?

#

like 2.4ghz or 5ghz

rotund fulcrum
#

band?

#

hmm

#

where to check that?

sage flame
#

I'm not sure, mine is set up so that it transmits both and is in the SSID

rotund fulcrum
#

@sage flame think it's 5ghz

#

then again

#

might be different

sage flame
#

Okay, 5ghz is good, it's faster than 2.4. Although that means the range is worse

#

So you will have to be close-ish to the router

rotund fulcrum
#

let me go reconnect, be back in a sec

wanton delta
#

Your laptop is probably not even good enough for a server tbh

rotund fulcrum
#

???

wanton delta
#

Laptop specs

rotund fulcrum
#

k brb

#

loading geforce

wanton delta
#

what

rotund fulcrum
#

geforce experience

wanton delta
#

graphics cards dont affect server performance

rotund fulcrum
#

i go there to update drivers & stuff

wanton delta
#

ok

rotund fulcrum
#

no it holds my specs

#

it has my specs there

wanton delta
#

Theres also computer -> properties but whatever floats your boat

rotund fulcrum
#

oof i run below 5ghz

#

thought i ran 5

#

pooP!

sage flame
#

I'm not talking about clock speed or anything like that

#

It's the wifi transmission frequency, done by your router

rotund fulcrum
#

GeForce GTX 1060 with Max-Q design

you don't care about driver

Intel Core i5-8300H CPU @ 2.30GHz

15.8 GB RAM

1920 x 1080, 60Hz

#

oof

sage flame
#

driver is important, I was just talking about wifi earlier

rotund fulcrum
#

k hold on

#

Driver version 442.59

wanton delta
#

We have no clue what that means

sage flame
#

oh wait no thats not what i meant lol

rotund fulcrum
#

oh

#

lol

#

hold up

wanton delta
#

2.30Ghz o_o

#

How many cores

rotund fulcrum
inland meteor
#

So you're going to be running the server on this laptop... whilst playing too?

rotund fulcrum
#

sometimes moderating

wanton delta
#

You should overclock to 4.00Ghz if your fan can handle it

rotund fulcrum
#

not really playing

sage flame
#

that's not really the best idea (playing and hosting)

rotund fulcrum
#

overclock? hmmmmm my brother said he tried to but it wouldn't let him...

wanton delta
#

Well

vale slate
#

well it is a H CPU

wanton delta
#

Says here u can

vale slate
#

not a K

rotund fulcrum
#

@wanton delta where 2 go to try 2 overclock

vale slate
#

oh damn it laptop

wanton delta
#

Yea idk might melt ur laptop tho so like

#

lmao

rotund fulcrum
#

where 2 do

wanton delta
#

idk

#

Google

rotund fulcrum
#

lol ok

wanton delta
#

โ€œHow to overclock i5-8300Hโ€

#

Just put ur laptop on ice lollll

sage flame
#

ice water bath lmao

vale slate
#

you can't overclock it you just can fix it to 4GHz

wanton delta
#

Oh

#

Misinterpreted

vale slate
#

and this is turbo and should not be done on laptops

rotund fulcrum
#

well idk how to

wanton delta
#

Its a better processor than what i wouldve thought

#

Tbh

rotund fulcrum
#

well idk if...

#

hmmmmmmmmmmmmmmmmm

vale slate
#

it's still not good to run a server on a laptop for obvious reasons

wanton delta
#

Yea

#

Its

rotund fulcrum
#

i will run it on my phone

#

jk

#

lol

wanton delta
#

Not a great idea

rotund fulcrum
#

๐Ÿ˜†

wanton delta
#

Never a good idea to run a production server on home wifi too

vale slate
#

I did that, it is possible

wanton delta
#

Wayyy to vulnerable

rotund fulcrum
#

well idk

vale slate
#

Mine are running in another network, should be fine

rotund fulcrum
#

so should i or should i not

wanton delta
#

you should not

#

Well

#

Not really my place

rotund fulcrum
#

2 questions;

Should I?

Can I?

inland meteor
#

Should you? probably not. Can you? yes

wanton delta
#

Can you? Sure

rotund fulcrum
#

ill test it out then see

#

if it does something then i'll just not

wanton delta
#

Should you? No. Makes u vulnerable to DDoS, laptops arent great for server hosting

#

Laptop might go to sleep

vale slate
#

and they are energy consuming as heck, due to non managed PSUs

wanton delta
#

ya

sage flame
#

I mean sleep can be disabled

inland meteor
#

not to mention, laptop hardware is not built for 24/7 use

sage flame
#

^

wanton delta
#

Yea but laptops

#

If the lid closes

#

Sleep

inland meteor
#

mart you can disable that too lol

vale slate
#

^

inland meteor
#

but still

wanton delta
#

Ive never been able to with my laptop

inland meteor
#

the point stands

wanton delta
#

Or any laptop

inland meteor
#

Try it

#

But just be careful

wanton delta
#

Oh u know what im thinkin of video output

#

I was neber able to connect monitors to a laptop closed

rotund fulcrum
#

Only if I had a desktop ๐Ÿ˜ฆ

rugged dirge
#

Does anyone know how to fix this filezilla error? (sFTP server works fine, the problem is my client)

Status:    Waiting to retry...
Status:    Connecting to ip...
Response:    fzSftp started, protocol_version=8
Command:    open "user@ip" 22
Error:    Could not connect to server
gilded forge
#

you're trying to use an ssh port

#

22 is for ssh

rugged dirge
#

sftp uses ssh port

gilded forge
#

oh really?

rugged dirge
#

yes

gilded forge
#

try port 21

safe mesa
#

is it true that i just deltye the world file to get a brand new seed

gilded forge
#

yes

safe mesa
#

ok

rugged dirge
#

@gilded forge not working

gilded forge
#

try sshing into it

#

what is your sftp server port

rugged dirge
#

22

#

ssh works fine

#

sftp via terminal also works fine

gilded forge
#

change the sftp port to something else like 21 because ssh may be binding to it before the sftp server can

rugged dirge
#

sftp is ssh file transfer protocol, it is supposed to use the same port as ssh

gilded forge
#

I know but just try

#

also if it works over terminal why does it matter?

rugged dirge
#

because filezilla is easier to use

gilded forge
#

yeah I guess

#

try using cyberduck

rugged dirge
#

I mean, if the connection is lost I can just reconnect and I will be in the last directory I was

#

not available for linux :/

gilded forge
#

no as a client

rugged dirge
#

as server?

gilded forge
#

no use cyberduck as a client

#

what is your client OS

frigid ember
#

how to import net.minecraft.server.v1_15_R1 ??

rugged dirge
#

what is your client OS
@gilded forge linux mint

frigid ember
#

( pls ping me pls, fucking really )

subtle blade
#

Depend on the server, not the API

rugged dirge
#

how to import net.minecraft.server.v1_15_R1 ??
@frigid ember add the spigot jar to dependencies as the maven repo does not have NMS

gilded forge
frigid ember
#

thx

subtle blade
#

When you run BuildTools, it will be installed in your local Maven repository

#

If you're using maven, artifact id should be just "spigot" (or "craftbukkit" if you depend on it instead)

gilded forge
#

how do you run build tools with a snapshot

subtle blade
#

You don't

gilded forge
#

but how do some plugins like mcmmo support netherite

subtle blade
#

They don't?

rugged dirge
gilded forge
#

huh

#

Idk man

#

try cyberduck and wine

rugged dirge
#

anyways, there are no public snapshot builds I am aware of

subtle blade
#

For CraftBukkit, no

#

There never have been

#

Pre-releases are generally the only pre-update releases Spigot does

#

Even then they're far-and-few between, unstable and not recommended for production

rugged dirge
#

imagine making a plugin for a snapshot so it breaks with the next snapshot

ember salmon
#

How long does it normally take for spigot to update after a full release?

vale slate
#

<1 month normally

subtle blade
#

Not even that. Within a day or two

#

As snapshots roll out, md's updating

tame hull
#

I know IP spoofing is really difficult to do, but if someone were able to do it they would be able to bypass the BungeeCord firewall configuration correct? If so, is there any way to prevent this? I'm not really worried about it but I was wondering how large servers like Hypixel prevent such attack? Because there will obviously be people willing to spend a lot of time trying to hack such server.

vale slate
#

well use a second proxy

subtle blade
#

Just as a general note, unless you are actively having this issue, don't address it. It's not a necessity for newer or smaller servers

tame hull
#

I'm guessing you would do that to prevent people from seeing your BungeeCord IP?

EDIT: I do understand that this isn't the biggest problem but we're not going to solve it by not talking about it. This could cause major issue's so waiting for it to become a problem sounds pretty risky. But thats just my opinion...

hollow drift
#

Anyone know of any good references (or maybe an open source library) for reading the "Sponge schematic" format?

I'm told it's the new hotness

lone belfry
arctic cloud
#

@tame hull you could make something such as a temporary lobby with nothing where users must go through the website first with the same IP before they actually join, then store the results in a database temporarily and on every join event for the subservers check if they're clear to go with the data from the database

sage citrus
#

Hi, i have problem with the instalation of plugins from Spigot in my Aternos Server

obtuse rose
#

@tame hull hold on, you mean real firewall like iptables? or you mean some IP limit plugin?

sage citrus
#

Today i wanted to install Luck Perms and Block Locker to my server Aternos, anda then, when i go to the Files, there wasnt any carpet

subtle blade
#

I was with you up until

there wasnt any carpet

#

lol

arctic cloud
#

๐Ÿค”

obtuse rose
#

yea, what carpet? ๐Ÿค”

#

also idk what block locker is, use coreprotect ๐Ÿ‘ xD

mossy crane
#

Hey, how do I set a variable to a type of block, ex. a quartz block

sage citrus
#

The is a carpet when you finish to install the plugins

arctic cloud
#

bruh

subtle blade
#

That just raised more questions than it asked

sage citrus
#

And then you can config the plugin after open the server

arctic cloud
#

I think you've got carpets in your head

obtuse rose
#

@mossy crane context, you mean in proper Java plugin right?
It's Material enum

mossy crane
#

thanks

subtle blade
#

(Block#setType())

obtuse rose
#

breh, he want to store block type

mossy crane
#

@obtuse rose Later, I'm gonna come back to you to tell me if my code is shit

subtle blade
#

oh lol. Misread the first bit of that sentence

rotund fulcrum
#

if anyone can walk me through port forwarding, i'd like to try and host a server, most of these tutorials are dumb and don't work, thanks

mossy crane
#

and how do I specify what block I want?

subtle blade
#

?portforward

rotund fulcrum
#

?portforward

subtle blade
#

There's a command for this I swear

rotund fulcrum
#

?

subtle blade
#

?portforwarding

rotund fulcrum
#

?????????

sage citrus
#

can someone help me :'c the problem only appears when i try to install Spigot plugins

rotund fulcrum
#

๐Ÿ˜”

obtuse rose
#

@rotund fulcrum is it for serious server or for fun?

rotund fulcrum
#

serious server

subtle blade
#

?pf

worldly heathBOT
subtle blade
#

THERE IT IS

rotund fulcrum
#

ah yes

#

a jedi's weapon

obtuse rose
#

for serious server, I would not recommend hosting on your own computer/network

subtle blade
#

I only dropped my Jedi weapon twice before picking it up the third time

tame hull
#

@tame hull you could make something such as a temporary lobby with nothing where users must go through the website first with the same IP before they actually join, then store the results in a database temporarily and on every join event for the subservers check if they're clear to go with the data from the database
@arctic cloud That could work. I don't need a solution right now though, but I was wondering if there was any better way to do it.

obtuse rose
#

@tame hull what do you mean by bypass firewall? I think there might be a big misunderstanding here xD

mossy crane
#

@obtuse rose How would I specify what block I want?

tame hull
#

@tame hull hold on, you mean real firewall like iptables? or you mean some IP limit plugin?
@obtuse rose Both could be bypassed using IP spoofing. Its really hard to do though.

#

Lets move to another channel btw, so we don't create a mess here

obtuse rose
#

could you bypass iptables with ip spoofing in TCP level? yes you can
will it "work"? no because you can only send information, but you won't receive response (unless you're that IP, which then it's not IP spoofing)

#

TL;DR; Handshake process will fail

mossy crane
#
    @EventHandler
    public void onBlockPlace(BlockPlaceEvent e) {
        Player p = e.getPlayer();
        Block b = e.getBlockPlaced();
        Material q = Material.QUARTZ_BLOCK;
        if(!b.equals(q)){
            return;
        }

Tell me if this is dogshit

fading owl
#

wut

obtuse rose
#

you're trying to compare Block to Material

fading owl
#

^

obtuse rose
#

you can do

 // Do stuff
}
mossy crane
#

Thx

#

Do I do an else {return;}

naive goblet
#

If you comparing more than 1 Material consider using switch

mossy crane
#

But formatted corrected

#

nop, just need to see if the block is quartz

#

then I'm spawning falling sand until it hits the quartz block

#

Should be ez

fleet burrow
#

Why is this throwing an NPE? (return (R))
The field isn't null..

[23:24:24] [Server thread/INFO]: aadsada
[23:24:24] [Server thread/INFO]: private final java.util.Map org.bukkit.craftbukkit.v1_15_R1.inventory.CraftMetaItem.unhandledTags
[23:24:24] [Server thread/INFO]: unhandledTags```
obtuse rose
#

Note: this is work because Material is enum, don't compare string or any object with ==

fading owl
#

^

naive goblet
#

Enums are constants (:

mossy crane
#

oke

fading owl
#

Enum elements are constants

obtuse rose
#

@fleet burrow which line?

fleet burrow
#

the return (R)

naive goblet
#

Itโ€™s yellow marked innit?

fleet burrow
#

yup

naive goblet
#

What does it say :o

fading owl
#

is it possible fieldName doesnt resolve to a field

fleet burrow
#

Look at the log I sent

obtuse rose
#

that should fail at setAccessible though? @fading owl

fading owl
#

truth

rotund fulcrum
naive goblet
#

heknon add an instanceof check?

#

I mean just to suppress the yellow thingy

fading owl
#

show the stacktrace

fleet burrow
#

lmao Conclure

mossy crane
#
            Location loc1 = b.getLocation();
            loc1.subtract(0, 1, 0);
obtuse rose
#

or just add supress comment thingy?
or annotation up to you xD

mossy crane
#

Would this work?

rotund fulcrum
fleet burrow
#

but that's not the problem lmao

obtuse rose
#

@mossy crane pretty sure it would

rotund fulcrum
#

i think i got the wrong guide or an outdated guide

fading owl
#

heknon

#

post the stactrace

#

u monkey

rotund fulcrum
#

random chimp event

naive goblet
#

^

sage citrus
#

Hey @subtle blade i dm you

fleet burrow
#

not much to show

fading owl
#

in a code block

fleet burrow
#
Caused by: java.lang.NullPointerException
    at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:57) ~[?:1.8.0_221]
    at sun.reflect.UnsafeQualifiedObjectFieldAccessorImpl.get(UnsafeQualifiedObjectFieldAccessorImpl.java:38) ~[?:1.8.0_221]
    at java.lang.reflect.Field.get(Field.java:393) ~[?:1.8.0_221]
    at me.oriharel.machinery.utilities.ReflectionUtils$Fields.getFieldValueOfUnknownClass(ReflectionUtils.java:86) ~[?:?]
    at me.oriharel.machinery.utilities.NMS.getItemStackUnhandledNBT(NMS.java:83) ~[?:?]
    at me.oriharel.machinery.inventory.Listeners.onInventoryCloseHandleFuels(Listeners.java:69) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_221]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_221]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_221]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:315) ~[spigot-1.15.2.jar:git-Spigot-e7dc2f5-ce66f69]
    ... 18 more```
obtuse rose
#

@rotund fulcrum maybe try other more common program if there's any out there ( I haven't try any UPnP stuff)
The thing that allowed you to port forward without router admin access is called UPnP (Universal Plug and Play)

mossy crane
#

Oke

rotund fulcrum
#

is there a guide for specifically UPnP Minecraft port forwarding

#

beacon looks the easiest

fading owl
#

FieldAccessor reference is null

fleet burrow
#

yes but why

#

lmao

fading owl
#

likely because of whatever

#

getFieldValueOfUnknownClass

#

is doing

wet compass
#

Hello. Our server is on 1 core. TPS drops when loading chunks in the under world (map is not loaded). Will there be a difference in server performance if you connect a second core?

fleet burrow
#

it's just normal reflection

obtuse rose
#

@wet compass which server software?

wet compass
#

Didn't understand the question a little bit

fading owl
#

heknon debug the field name

rare meadow
#

Hello, have a question with plugin mycommand (Dynamic icon menu), who knows how to make colored glass pane <next> another colored glass pane ?

rotund fulcrum
#

:bruh:

fleet burrow
#

huh

#

instance is null

#

even though it's not null before I call the method

fading owl
#

step through it

obtuse rose
#

@wet compass spigot? Paper? Other?
What is your CPU usage when TPS dropped?

rotund fulcrum
#

fune ipv4

wet compass
#

@wet compass spigot? Paper? Other?
What is your CPU usage when TPS dropped?
@obtuse rose paper, cpu usage 100%

rotund fulcrum
#

LOL

#

YOUR COMPUTER = FRIED

mossy crane
#

Hey, how would I spawn the falling sand entity?

obtuse rose
#

K get more core xD @wet compass

mossy crane
#

I set the location I want as a variable

#

Or can I just place the block there?

wet compass
#

Can adding a second core?

K get more core xD @wet compass
@obtuse rose

obtuse rose
#

@wet compass that should help yea

frigid ember
wet compass
#

@wet compass that should help yea
@obtuse rose
That is, Java already supports several cores, and not as before one?

obtuse rose
#

Java itself support mult-threading
Minecraft do most stuff on main thread. (Except networking) But for paper, it does load chunk with multiple threads I believe

vale slate
#

Well mc is tickbased

mossy crane
#

@obtuse rose I have 2 questions but they're gonna get drowned out can I DM you?

turbid musk
#

Does anyone have a good MongoDB Tutorial? For just creating a user database to store tokens, rank, and such?

obtuse rose
#

@mossy crane I think ideally spawn falling block would be the best option, but I haven't done that for ages and have forgot how to do it ๐Ÿ˜…

mossy crane
#

I got that

#
  1. How do I make a "loop" that goes back to a certain point
  2. how do I make a VERY small delay
obtuse rose
#

I'm not quite understand both questions

#

For 2 what are you trying to delay though

#

@mossy crane

wanton delta
#

is there a way to make the bounding box of an arrow nonexistant via packets?

mossy crane
#

The block placing

#

So, I place the sand block

#

I want to give it a little bit of time to fall before placing another sand block in the same place

silk bane
#

you can schedule a task

mossy crane
#

that's a whole thing

#

It's in an event

#

Here's my code

wanton delta
#

runtasklater?

silk bane
#

just schedule a task

obtuse rose
#

Yea runtasklater

mossy crane
#

How do I do that

wanton delta
#

?docs

#

bukkitrunnable

silk bane
#

nice

keen compass
#

?jd

worldly heathBOT
wanton delta
#

daoufnas

mossy crane
#

thx

wanton delta
#

thats not intuitive

mossy crane
#

yea

keen compass
#

?jd BukkitRunnable

worldly heathBOT
silk bane
#

nice try

keen compass
#

oh guess it doesn't do a search

#

there is a search bar on the javadocs site

obtuse rose
#

Bukit.getScheduler()
Start reading doc from there
Many useful stuff you should know about scheduler

turbid musk
#

anyone? ๐Ÿ˜ข

upbeat wyvern
#

@turbid musk ?

turbid musk
#

Does anyone have a good MongoDB Tutorial? For just creating a user database to store tokens, rank, and such?

#

I haven't been able to find a sufficient tutorial aside from the MongoDB Docs and one on the wiki page.

upbeat wyvern
#

well mongodb is not a sql database

obtuse rose
#

I don't have, but why don't use SQL though

#

@turbid musk

upbeat wyvern
#

mongo does not have tables but have "collections"

mossy crane
#

@obtuse rose How do I amke an if statement a task?

turbid musk
#

It's a No-SQL Database

#

So everything for the user is stored under a collection

young dawn
silk bane
#

a nice thing about using sql is that the JDBC drivers for MySQL and SQLite are shaded into the server

#

so you don't need to shade more dependencies

upbeat wyvern
#

well @turbid musk - you understand no-sql and you only want a tutorial to explain you how to interract with mongodb in java ?

obtuse rose
#

@mossy crane wrap it in a runnable then schedule it via scheduler, or wrap in BukkitRunnable.

You should read the doc, there's many option you can choose from

mossy crane
#

the docs are shit

obtuse rose
#

Spigot doc is quite nice tbh

turbid musk
#

I have a very light understanding of it @upbeat wyvern. I've messed with the Firebase Collection system prior to looking into MongoDB. Since they're both NoSQL Databases.

obtuse rose
#

@young dawn first one have ECC memory, I would say the first one

upbeat wyvern
silk bane
#

honestly the only tangible difference between performance on those two hosts will be which one oversells more.

zenith siren
#

This is bungeecord!
For some reason the Item#setDisplayName gives me an error whenever I use it in any way. I know it's the displayname because when I remove only remove that method then it works. I don't get any error in console (not one in bungee nor spigot console) but I see this when I get kicked

This is the code: https://pastebin.com/x84W8a7H

upbeat wyvern
#

@zenith siren what is the code ?

turbid musk
#

Yeah. I've read through it a couple times, and followed along with it. I understand how it works. There are two or three things I'm really looking for in a tutorial; reassure I am doing this right, how can I improve/what can I change.

zenith siren
naive stratus
#

What are my options for controlling the Ender Dragon, like targeting and attacking? Don't want to WASD control it.

obtuse rose
#

AFAIK you would need to mess with NMS stuff, it will be quite a pain to do so @naive stratus

naive stratus
#

Yeah I had a feeling that was the case

upbeat wyvern
#

@zenith siren have you tried putting an arbitrary string ? like "test"

#

to see if it works