#help-archived

1 messages · Page 36 of 1

zenith siren
#

Yea, I can try again to be sure

wanton delta
#

So i'm updating something from 1.12 to 1.15

#

and i'm trying to find a replacement nms method that has changed or relocated

#

i mayve found it but im not exactly sure if its the samething

#

would anyone know what that does

#

by chance

#

Entity#a

zenith siren
#

@upbeat wyvern, yep. I wrote item.setDisplayName("test") and I still got kicked with that message

upbeat wyvern
#

and when you remove that line, does the error occur ?

#

@zenith siren

zenith siren
#

Nope

upbeat wyvern
#

the problem seems to be comming from your client - have you something more detailled in your game logs ?

frigid ember
#

I have a question. I have always wanted to make a server and i have in the past, is it still worth making one in 2020 through? I was thinking of making a mini games server and i would start of with 2 mini games and work my way up from there i dont really have any cool ideas for mini games so i would use mini games already out there. Would this be worth making and would i even get any players also would the server be able to pay for its self or even make profit?

half marsh
#

I'll also need some help if anyone has the time, we're working on a server which has about 15-30 ish people on at a time, it's got 10GB of ram(we're trying to get more) but we are lagging insanely hard with tps between 1 and 8. We just don't know why, if anyone could look at the timings report with me that would be awesome. https://timings.aikar.co/?id=8503508bcaef4ee3989163c185bc85e2#timings
Basically from what I understand a lot of the tps lag was coming from guardians or endermen spawning, but we disabled those since then and it still hasnt done anything

#

We figure that even though 10gb isnt optimal it shouldnt be lagging this hard

frigid ember
#

@half marsh Might be some plugins you have causing it

zenith siren
half marsh
#

I've looked at those but im also just not sure what to be looking at, i know some plugins like essentials or mcmmo are causing somewhere like 300ms of delay, but we just dont think that makes sense considering last time we made a server like this it went fine

pale plaza
#

Hey I have been searching for a plugin what allows you to blow up things in warter but I cant find any plz dm a link to any and if anyone says search on Google I have and not found any what work

upbeat wyvern
#

@zenith siren okay i have an idea - maybe try to init item again, set the properties to an empy array, set the gamemode and the ping

rotund fulcrum
#

yo so i am kinda confused, i port forwarded and everything but it aint letting me start

abstract hemlock
#

And there are servers that support asynchrony, or at least in some way multithreading, for example, chunk loading for each player in their own thread. What could be adequately scaled to classic Dedicate?

rotund fulcrum
#

ty

#

ill try it

subtle blade
#

C0nn0r, do you have another server running on that port already?

rotund fulcrum
#

No.

subtle blade
#

If you've closed your server without running the stop command, it's possible it may still be running in the background

#

(i.e. hitting the X button on the console window)

rotund fulcrum
#

My co-founder runs my other factions server.

zenith siren
rotund fulcrum
#

@subtle blade My co-founder runs the other server.

lofty otter
#

whats the difference between getName and getDisplayName in ProxiedPlayer?

rotund fulcrum
#

Our IPs aren't the same, but our ports are.

wanton delta
#

I am trying to make arrows go through players... but only when the arrow comes from a certain player. does anyone know of a way to do this?

rotund fulcrum
#

25565 is the default one, so, no surprise there.

zenith siren
#

You can set the displayname but not the name @lofty otter

lofty otter
#

so if im just reading

zenith siren
#

Just like spigot

lofty otter
#

are they the same

#

i want the players normal username

#

the one they have with mojang

wanton delta
#

i thought about using ProjectileHitEvent but setting the colision in the event wont take effect until the next time it triggers

lofty otter
#

so I just use getName right?

zenith siren
#

Yes

rotund fulcrum
#

@rigid notch lmk when you've found the link 😄

wanton delta
#

does anyone know if ProjectileHitEvent fires before or after ProjectileLaunchEvent?

subtle blade
#

wot

wanton delta
#

oh

#

i meant

#

silly je

subtle blade
#

lol

wanton delta
#

EntityDamageByEntityEvent

#

thats what i meant

upbeat wyvern
#

@zenith siren what happend if you set the username to "test" ? rather than something with "[" ?

subtle blade
#

PHE is before afaik

rotund fulcrum
#

@rigid notch wdym?

wanton delta
#

hmmm

rotund fulcrum
#

like wdym shared hosting?

subtle blade
#

hits then damages

rotund fulcrum
#

paying for one to host 2?

#

or...?

#

no

#

i dont think so, he hosts my other server

wanton delta
#

what im trying to do essentially is cancel the projectile hit event

rotund fulcrum
#

that's his job is to host the factions, im hosting skyblock

#

wdym same host

#

IP?

#

port?

wanton delta
#

or allow the arrow to travel through under certain conditions

frigid ember
#

@subtle blade Is it possible I am able to delete my account please?

subtle blade
#

You can report your own account on the forums and request deletion. md_5 is the only one that can do it

#

Though really, we discourage any deletion as we use your account for archiving purposes if you've contributed to the forums

rotund fulcrum
#

the port is the same but we aren't on the same host

subtle blade
#

Otherwise it leaves gaps in threads

radiant pollen
#

@rotund fulcrum You're not on the same network?

rotund fulcrum
#

no

#

not on the same IP

#

we live in the same country, but the states aren't near

#

how would i do that

zenith siren
#

Still got it @upbeat wyvern, I just want to say thank you for sticking around

wanton delta
#

is there such thing as a packet i can send that makes players collidable or not?

zenith siren
#

But the error remains

radiant pollen
#

@rotund fulcrum make sure the port in your server.properties is the port that you opened

rotund fulcrum
#

opened in what?

#

im confused because i've never hosted before lol

radiant pollen
#

the port that you forwarded

rotund fulcrum
#

oh, yeah it is, let me double check!

#

@radiant pollen

tiny dagger
#

Why is everyone looking now to port forward their server?

rotund fulcrum
#

I've done it, just got an error

#

not at all

#

latest

[17:27:13] [Server thread/INFO]: Starting minecraft server version 1.8.8 [17:27:13] [Server thread/INFO]: Loading properties [17:27:13] [Server thread/INFO]: Default game type: SURVIVAL [17:27:13] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-db6de12-18fbb24 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT) [17:27:13] [Server thread/INFO]: Debug logging is disabled [17:27:13] [Server thread/INFO]: Server Ping Player Sample Count: 12 [17:27:13] [Server thread/INFO]: Using 4 threads for Netty based IO [17:27:13] [Server thread/INFO]: Generating keypair [17:27:14] [Server thread/INFO]: Starting Minecraft server on IPADDRESS:25565 [17:27:14] [Server thread/INFO]: Using default channel type [17:27:14] [Server thread/WARN]: **** FAILED TO BIND TO PORT! [17:27:14] [Server thread/WARN]: The exception was: java.net.BindException: Cannot assign requested address: bind [17:27:14] [Server thread/WARN]: Perhaps a server is already running on that port? [17:27:14] [Server thread/INFO]: Stopping server [17:27:14] [Server thread/INFO]: Saving players

upbeat wyvern
rotund fulcrum
#

yes

#

self-host off of my computer files

abstract hemlock
#

@rotund fulcrum Are there any recommendations how to live when the server is 2 ghz but multi-core?

rotund fulcrum
#

are you asking me for recommendations? if so, can't give rn receiving help myself

abstract hemlock
#

It’s sad because there is no way to find a server with a normal frequency and there are more than enough cores (((

#

Everyone is asleep

radiant pollen
#

@rotund fulcrum why is the ipaddress set to 25565?

#

Can you show us your server.properties?

rotund fulcrum
#

@radiant pollen didn't want people seeing my IP

#

lol

radiant pollen
#

well is the ip address in the server.properties empty

rotund fulcrum
#

no it would be [IPADDRESSHERE]:[PORT]

#

no

wanton delta
#

@upbeat wyvern doesnt really accomplish what i need

rotund fulcrum
#

it isnt

#

it isnt empty

radiant pollen
#

try making it empty

rotund fulcrum
#

it has my ipv4

radiant pollen
#

with default port

rotund fulcrum
#

why

#

wouldn't that not work?

#

but i want people to connect

#

people are going to be playing

#

they wont be able to connect to my localhost

#

oh

#

wat

#

i didnt know dat

#

ok

#

ok saved it in Visual Studio Code

#

now i start

#

yep it works

#

but it's on localhost

#

no one will be able 2 connect

#

how

#

don't think that is a reliable way of doing this

#

tbh

radiant pollen
#

if you have it port forwarded, it should work

rotund fulcrum
#

i do

radiant pollen
#

ask someone to connect then and try.

#

honestly can't remember

wind dock
#

so i was wondering
could running a server on my hardware possibly decrease its lifetime?
or stress it out to the point where something dies?
I was having some issues with my pc not shutting down and a very slow windows launch after running some stuff with heavy load on my server

radiant pollen
#

@wind dock no.

silk bane
#

using hardware typically contributes to decreasing its lifetime

frigid ember
#

don’t overclock and you’re good

silk bane
#

best to just not use your computer at all

radiant pollen
#

It'll use resources and if you leave it on too long and it overheats maybe. But that's not a result of running a server, that's a result of a crappy setup tbh.

rotund fulcrum
#

there is something in my task manager in background processes

#

called "Start"

#

tried closing it, it just reopens

radiant pollen
#

don't just close random tasks because you don't know what they are...

#

that's a windows process

subtle blade
#

best to just not use your computer at all
I agree. Let's all just shut off our computers

radiant pollen
#

it is earth day... maybe we should?

zenith siren
#

Yes

rotund fulcrum
#

🌎

#

Eart.

#

This is Eart.

#

He my friend.

radiant pollen
#

Why does AWE spam my chat with the GC when no one is running any commands? :/

silk bane
#

it's punishment for using AWE

radiant pollen
#

wtf else am i supposed to use

subtle blade
#

lol

silver pollen
#

world edit

rotund fulcrum
#

IT WORKED

#

OMG OMG

radiant pollen
#

Told you.

rotund fulcrum
#

IT AUTO CONFIGGED

subtle blade
rotund fulcrum
#

YAY!!!!!

zenith siren
#

GG

radiant pollen
#

Yeah, it kinda does that. we said it would. ;']

rotund fulcrum
#

GG

zenith siren
#

XD

gusty crane
#

gg

rotund fulcrum
#

another server has been made

#

:)

radiant pollen
#

dude you've barely started

#

but good luck

silver pollen
#

^

rotund fulcrum
#

i have another server

#

that my cofounder hsots

radiant pollen
#

@silk bane what should I use instead?

rotund fulcrum
#

so i'll have a jumpstart

radiant pollen
#

FAWE doesn't work.

silver pollen
#

just use the regular worldedit

radiant pollen
#

I want to use limits per group.

rotund fulcrum
#

how 2 change my server name

#

when you add server

radiant pollen
#

WorldEdit doesn't support that.

silver pollen
#

yes it does

radiant pollen
#

no?

rotund fulcrum
#

how would you change your server name

silver pollen
#

just use perms

zenith siren
rotund fulcrum
#

oh wait i dont set that

#

players do

#

ok

zenith siren
radiant pollen
#

@silver pollen That doesn't solve my problem.

silver pollen
#

what is your problem?

#

not in a mean way lol

radiant pollen
#

I want different world edit limits per group. eg donators can have a higher block limit than defaults.

silver pollen
#

oh ok - have you tried to use other builds for fawe

radiant pollen
#

FAWE doesn't have a stable release for 1.15.2. So I used AWE, which does.

#

I have everything setup right, it just spams with garbage collection even though there should be nothing to collect atm.

silver pollen
#

what is the exact spam?

radiant pollen
silver pollen
#

how often does that occur?

radiant pollen
#

Every 11 seconds.

#

The time changes, but the memory amount is always 542MB.

silver pollen
#

ok i dont know then

#

I don't know if it is open source or not, but if it is you can just make the runnable have a longer delay. I don't know much about garbage collection

radiant pollen
#

Might just reset my config. Maybe I messed with something.

upbeat wyvern
#

@zenith siren found it

#

the problem come from the value of display name

#

the object isn't a string but a "chat" object

zenith siren
#

Wow

#

You're a god

dusty topaz
#

@upbeat wyvern I couldn't find it on the wiki, whats it under

upbeat wyvern
#

it's the wiki from minecraft protocol

dusty topaz
#

yeah, what page

upbeat wyvern
#

the fact is we need something like

item.setDisplayName("{\"text\": \"content\"}");```
#

yes

#

it works

#

there should be an implementation of Chat in bungee

zenith siren
#

Yep it works

#

Thank you so so so much

dusty topaz
#

how did you know this was PlayListItem packet?

#

it's not listed as that on the wiki

zenith siren
#

I told him

#

Oh

upbeat wyvern
#

in spigot it's PacketPlayOutPlayerInfo

#

so i looked in the protocol for something similar

zenith siren
#

Really quick question, what actually defines the player when doing Action.REMOVE_PLAYER

#

The UUID?

dusty topaz
#

probably

upbeat wyvern
#

yes only the uuid

#

@zenith siren java item.setDisplayName(ComponentSerializer.toString(TextComponent.fromLegacyText(username))); this should work

zenith siren
upbeat wyvern
#

yeah but there are some little problems with that, like if the name breaks the json

#

normally this shouldn't happen

zenith siren
#

I'll use the ComponentSerializer

#

Again, thank you so much for your help and time 😊

wanton delta
#

err

#

should this work like this

#
        Team team;
        if (entityhuman instanceof EntityPlayer) {
            EntityPlayer thatPlayer = (EntityPlayer)entityhuman;
            team = thatPlayer.getBukkitEntity().getScoreboard().getPlayerTeam(thatPlayer.getBukkitEntity());
            if (team == null || team.allowFriendlyFire()) {
                return true;
            }
        } else {
            OfflinePlayer thisPlayer = entityhuman.world.getServer().getOfflinePlayer(entityhuman.getName());
            team = entityhuman.world.getServer().getScoreboardManager().getMainScoreboard().getPlayerTeam(thisPlayer);
            if (team == null || team.allowFriendlyFire()) {
                return true;
            }
        }

        if (this instanceof EntityPlayer) {
            return !team.hasPlayer(((EntityPlayer)this).getBukkitEntity());
        } else {
            return !team.hasPlayer(this.world.getServer().getOfflinePlayer(this.getName()));
        }
    }```
#

context

#

ugh

#

idk how to give context

frigid ember
#

hello spigot, if you want to make an agency with me that will be in management and marketing then dm me right now so we can chat about it. thanks.

wanton delta
#

?services

worldly heathBOT
upbeat wyvern
#

@wanton delta what is the method a ?

dusty topaz
#

it's obfuscated

wanton delta
#

im trying to figure out the logic behind how an arrow detects if it goes through a player if it has friendly fire

compact junco
#

Does anyone know how I make my custom /help command take higher priority than the standard /help that comes with spigot?

wanton delta
#

and that was the method

compact junco
#

Replacing it in the commands.yml file does not seem to be working

wanton delta
#

this being the shooter

#

and entityHuman being the person who is being shot

upbeat wyvern
#

what is the class ?

wanton delta
#

EntityArrow

#

just gonna repaste

#
    public boolean a(EntityHuman entityhuman) {
        Team team;
        if (entityhuman instanceof EntityPlayer) {
            EntityPlayer thatPlayer = (EntityPlayer)entityhuman;
            team = thatPlayer.getBukkitEntity().getScoreboard().getPlayerTeam(thatPlayer.getBukkitEntity());
            if (team == null || team.allowFriendlyFire()) {
                return true;
            }
        } else {
            OfflinePlayer thisPlayer = entityhuman.world.getServer().getOfflinePlayer(entityhuman.getName());
            team = entityhuman.world.getServer().getScoreboardManager().getMainScoreboard().getPlayerTeam(thisPlayer);
            if (team == null || team.allowFriendlyFire()) {
                return true;
            }
        }

        if (this instanceof EntityPlayer) {
            return !team.hasPlayer(((EntityPlayer)this).getBukkitEntity());
        } else {
            return !team.hasPlayer(this.world.getServer().getOfflinePlayer(this.getName()));
        }
    }```
#

oh im sorry

#

that method is in EntityHuman

#

called by EntityArrow (in my version line 180)

#

i am mainly confused why its getting the team of just one player

#
            if (team == null || team.allowFriendlyFire()) {
                return true;
            }```
#

seems counterintuitive

upbeat wyvern
#

i think true means the arrow hit

dusty topaz
#

because if they're not in a team it wants to hit

#

or if the team allows friendly fire

#

it wants to hit

upbeat wyvern
#

can I have your link ? i cannot find a readable version of the file online

wanton delta
#

true means arrow is hit yes

#

my... link?

dusty topaz
#

if you follow what i mean

#

teams can ignore friendly fire protection

#

which is what that checks for

wanton delta
#

yes i know

dusty topaz
#

so how is it counter intuitive

wanton delta
#

because its only grabbing the team of the shot player

#

and isnt comparing it against the shooter

#

oh wait

#

nvm

#

i see where i got confused

#

if the team allows friendlyfire itll shoot the player no matter what

#

ofc

dusty topaz
#

yea

upbeat wyvern
#

@wanton delta so you're trying to "change" the behavior of that method ?

wanton delta
#

nope

#

i thought i had to

rotund fulcrum
#

what would be counted as your public IP address? i apparently used a local one when i hosted so no one connected

wanton delta
#

google what is my ip

rotund fulcrum
#

IPv4 or IPv6

#

@wanton delta

#

assuming IPv4

upbeat wyvern
#

did you find how to make the arrow go through the player ? @wanton delta

keen hemlock
wanton delta
#

what do you need help with?

#

Crouched means you are pressing the shift button

#

Swimming means you are in the swimming positions

keen hemlock
#

Yeah but what is the difference between setting the pose at index 6 and setting the flag on index 0

wanton delta
#

hmm let me see the decompiled class

subtle blade
#

One can be crouched but not sneaking

wanton delta
#

this is the constructor i see

subtle blade
#

You can be in the crouched position but not holding the sneak key

wanton delta
#

oh yea that makes sense

subtle blade
#

Sneaking under something and letting go of sneak is a good example of this

#

It will keep you crouched

wanton delta
#

oh i also looked at the wrong class

#

lmao thats not happened before

subtle blade
#

I think the same applies to the swimming position tbh. If you stand under a trapdoor and flick it on, it will throw you into the "swimming" position

#

Though there's no true keybind for this

#

Same logic though

keen hemlock
#

So, for example, If I would see an entity crouched I would set the entity pose and not the flag "crouched"?

wanton delta
#

correct

subtle blade
#

Bukkit does have a Pose API last I recall

keen hemlock
#

I have to do it packet side

#

wait

subtle blade
#

Oh you can't set the pose 😦

#

Just getting

keen hemlock
subtle blade
#

Though if you wanted to distinguish between the two when getting that information, you have the getPose() for crouching and Player#isSneaking() if they're holding the sneak button

#

o wat

silk bane
#

that's nms

subtle blade
#

Oh it is, okay lol

keen hemlock
#

Yes of course

silk bane
#

the server continuously updates the pose

#

so a set would be pointless

keen hemlock
#

that's true

#

Okay now everything is clear, thank you all 🙂

velvet fox
#

Is there an event called when, let's say, a torch/lever/sign is broken upon it's anchor block being broken? Like if I have a sign on a piece of stone, if I break the stone, is there an event that is called for that sign being broken?

subtle blade
#

Yes? I think that's a BlockPhysics event?

#

Though there may be a more specific event

velvet fox
#

Thanks, will look into it 🙂

frigid ember
#

@subtle blade Hi there I'm trying to confirm my email on the Spigot Forums and when I press on confirm from my email, it just redirects me another page saying this:

"SpigotMC - High Performance Minecraft - Error
Security error occurred. Please press back, refresh the page, and try again."

subtle blade
#

What email service are you using? Outlook, Google, ...?

frigid ember
#

Gmail.

subtle blade
#

I'm not sure. I don't handle email confirmations or anything so that's likely something for md_5 to answer. Though he's not around atm

frigid ember
#

@subtle blade Ooo, does he come on this discord?

subtle blade
#

Occasionally, yes. You might see him send messages in #general from time to time though I think the best point of contact would be to send an email to support@spigotmc.org

#

I don't know the response time but that's the best spot to ask

frigid ember
#

I will do that now. I will try another browser to before I send an email.

subtle blade
#

Yes! Definitely try that 🙂

pale plaza
#

Is there any plugin what allow players to use tnt to expload blocks under warter

#

Water

#

I try google cant find any

dusty topaz
#
        PacketPlayOutPlayerListHeaderFooter a = new PacketPlayOutPlayerListHeaderFooter();
        try {
            Field field = a.getClass().getDeclaredField("header");
            field.setAccessible(true);
            field.set(a, IChatBaseComponent.ChatSerializer.a("{\"text\":\"test\"}"));
            field.setAccessible(false);
        } catch (Exception err) {
            err.printStackTrace();
        }

        ep.playerConnection.sendPacket(a);
#

This just kicks me - no console error

#

am unsure why

hoary parcel
#

try setting a footer too

#

client log?

frigid ember
#

@subtle blade Solved it! 🙂

subtle blade
#

Perfect! Was it just the browser?

dusty topaz
#

nothing in log

#

literally nothing

hoary parcel
#

you have debug client log?

dusty topaz
#

ah

#

i do not

frigid ember
#

@subtle blade Yes, well I just exited out of the browser and ran CCleaner and did the activation in the same browser. I think it was the cookies or cache. 😛

hoary parcel
#

client can log every packet

dusty topaz
#

let me turn thato n

hoary parcel
#

oh pls no copy my access token

#

lmao

dusty topaz
#

haha

rotund fulcrum
#

what server hosters would you recommend?

let's go off of this base...

say i only had 15 dollars a month, what would you recommend for server hosting?

I can go off of that ty

dusty topaz
#

ugh, i can't find this option

#

i want the old old client back 😠

#

oh nevermind

#

it was right in front of me

hoary parcel
#

thats my log4j config

rotund fulcrum
#

anyone know any good and cheap server hosters?

hoary parcel
#

good, cheap, choose one

dusty topaz
#

could get a decent sized ovh box for $15 a month?

#

(vps)

#

not box

hoary parcel
#

oh fuck its 2am already

dusty topaz
#

nothing popping up

hoary parcel
dusty topaz
#

ah ok

#

-Dlog4j.configurationFile=D:\config.xml isn't working -.-

#

i don't know if i'm tired, stupid or both

mossy crane
#

my plugin acts like it's not there. it's literally one eventhandler

#

som1 halp me pls

frigid ember
#

@rotund fulcrum I use OVH SSD VPS 3 and it’s pretty good, 80gb ssd 8gb ram and 2 vcores for $15 a month (or 14 if you buy yearly)

dusty topaz
#

@mossy crane show code

mossy crane
#
package tech.sshdoes.sandblock;

import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class SandBlock extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
        getServer().getConsoleSender().sendMessage(ChatColor.DARK_AQUA + "SandBucket has started - Made by SSH#4388 (https://github.com/ssh-sysadmin)");
        // Plugin startup logic - Made by SSH#4388
    }

    @EventHandler
    public void onBlockPlace(BlockPlaceEvent e) {
        Player p = e.getPlayer();
        Block b = e.getBlockPlaced();
        if(b.getType() == Material.QUARTZ_ORE){
            Location loc1 = b.getLocation();
            Location loc2 = loc1.subtract(0, 1, 0);
            Material underQuartz = loc2.getBlock().getType();
            if(underQuartz == Material.QUARTZ_ORE)
                loc2.getBlock().setType(Material.SAND);
            }
            else{
                return;
            }
        }
    }

#

oh

#

I think I see it

#

I didn't register the eventhandler

dusty topaz
#

you dont register the listener

mossy crane
#

listener/eventhandler

#

same ol, same ol

dusty topaz
#

sure 😄

mossy crane
#

Let's see if it works

#

nop

dusty topaz
#

show it again..?

mossy crane
#

it's the same but the eventhandler is registered

dusty topaz
#

okay, so show it

mossy crane
#
package tech.sshdoes.sandblock;

import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class SandBlock extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
        getServer().getConsoleSender().sendMessage(ChatColor.DARK_AQUA + "SandBucket has started - Made by SSH#4388 (https://github.com/ssh-sysadmin)");
        getServer().getPluginManager().registerEvents(this, this);
        // Plugin startup logic - Made by SSH#4388
    }

    @EventHandler
    public void onBlockPlace(BlockPlaceEvent e) {
        Player p = e.getPlayer();
        Block b = e.getBlockPlaced();
        if(b.getType() == Material.QUARTZ_ORE){
            Location loc1 = b.getLocation();
            Location loc2 = loc1.subtract(0, 1, 0);
            Material underQuartz = loc2.getBlock().getType();
            if(underQuartz == Material.QUARTZ_ORE)
                loc2.getBlock().setType(Material.SAND);
            }
            else{
                return;
            }
        }
    }
dusty topaz
#

is the plugin enabled?

mossy crane
#

yea, ofc

#

wait

#

i meant of course

#

not the usual "of fucking course"

dusty topaz
#

then your logic is wrong in your method

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

o

#

What's broken with it?

dusty topaz
#
    public Location add(@NotNull Location vec) {
        if (vec != null && vec.getWorld() == this.getWorld()) {
            this.x += vec.x;
            this.y += vec.y;
            this.z += vec.z;
            return this;
        } else {
            throw new IllegalArgumentException("Cannot add Locations of differing worlds");
        
#

(or subtract, which does the same but minusing)

#

you're not getting the block below

#

you're just modifying the location object to think the y is 1 lower

mossy crane
#

oke

#

so

#

I want to get the position of the "block" below

dusty topaz
#

no you don't

mossy crane
#

y

dusty topaz
#

because you can just get the block below

#

instead of getting the position of it

mossy crane
#

o shit

#

how

dusty topaz
#

loc1.getBlock().getRelative(BlockFace.down)

#

or something similar

mossy crane
#

At:

             Location loc2 = (Location) loc1.getBlock().getRelative(BlockFace.DOWN);
mossy crane
#

should I just use this:

            Location loc2 = loc1.getBlock().getRelative(BlockFace.DOWN).getLocation();
dusty topaz
#

no

#

you literally have the block

#

why get the location

mossy crane
#

I don't want the block

#

I want the location so I can place a block there

dusty topaz
#
            Material underQuartz = loc2.getBlock().getType();
            if(underQuartz == Material.QUARTZ_ORE)
                loc2.getBlock().setType(Material.SAND);
            }
#

what there needs the location

ocean hamlet
#

where can u toggle on verbose in luvk perms

rotund fulcrum
#

@frigid ember link?

ocean hamlet
#

well somebody earlier today told me to toggle on that setting

#

but he didnt specify where to toggle it on

dusty topaz
#

Using default game log configuration client-1.12.xml (outputs XML) ahhhhh

subtle blade
#

What Avro is saying is that this:

            Location loc1 = b.getLocation();
            Location loc2 = loc1.subtract(0, 1, 0);
            Material underQuartz = loc2.getBlock().getType();
            if(underQuartz == Material.QUARTZ_ORE)
                loc2.getBlock().setType(Material.SAND);
            }```
can be simplified to this:
```java
Block underQuartz = b.getRelative(BlockFace.DOWN);
if (underQuartz.getType() == Material.QUARTZ_ORE) {
    underQuartz.setType(Material.SAND);
}```
mossy crane
#

you

#

are

#

right

subtle blade
#

😄

mossy crane
#

but

#

i

#

like

#

to have as many variables as physically possible

subtle blade
#

Lol

mossy crane
#

SO

#

end code:

#
    @EventHandler
    public void onBlockPlace(BlockPlaceEvent e) {
        Player p = e.getPlayer();
        Block b = e.getBlockPlaced();
        if(b.getType() == Material.QUARTZ_ORE){
            Location loc1 = b.getLocation();
            Block loc2 = loc1.getBlock().getRelative(BlockFace.DOWN);
            Material underQuartz = loc2.getType();
            if(underQuartz == Material.QUARTZ_ORE)
                loc2.setType(Material.SAND);
            }
            else{
                return;
            }
        }
subtle blade
#

The else { return; } is also useless by the way 🙂

mossy crane
#

I'm adding a loop

#

but later

#

so I need to cancel that loop if the block isn't air

subtle blade
#

It would likely be useless there as well ;P

mossy crane
#

why tho

#

would the loop keep going?

#

no workie

#

imma gonna try the shortened version

#

yeaaaaaa

#

doesn't work

near lodge
#

what doesn't work?

mossy crane
#

the plugin

#

still acts like it isn't there

near lodge
#

Did you register the listener?

mossy crane
#

yupp

radiant pollen
#

Does the plugin show up in the plugin list?

mossy crane
#

yup

#

I also got my little plugin startup message

near lodge
#

Can we see your code?

mossy crane
#
package tech.sshdoes.sandblock;

import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class SandBlock extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
        getServer().getConsoleSender().sendMessage(ChatColor.DARK_AQUA + "SandBucket has started - Made by SSH#4388 (https://github.com/ssh-sysadmin)");
        getServer().getPluginManager().registerEvents(this, this);
        // Plugin startup logic - Made by SSH#4388
    }

    @EventHandler
    public void onBlockPlace(BlockPlaceEvent e) {
        Player p = e.getPlayer();
        Block b = e.getBlockPlaced();
        if (b.getType() == Material.QUARTZ_ORE) {
            Block underQuartz = b.getRelative(BlockFace.DOWN);
            if (underQuartz.getType() == Material.QUARTZ_ORE) {
                underQuartz.setType(Material.SAND);
            }
        }
    }
}
near lodge
#

Should work

mossy crane
#

doesn't

near lodge
#

try adding a System.out.println("test")

#

on your event listener

mossy crane
#

oke

#

so, the event registers

#

and it sees that a block is placed

near lodge
#

You are using a quartz ore block and not a quartz block right?

mossy crane
#

yup

near lodge
#

and sand and not red sand

mossy crane
#

wait

#

do I have to have sand in my invintory?

near lodge
#

no

mossy crane
#

oke

near lodge
#

below the block you're placing

mossy crane
#

it's supposed to place sand

near lodge
#

Oh yeah sorry, I read it the other way

radiant pollen
#

The logic you have now asks if you place quartz ore on quartz ore, it sets the quartz underneath to sand

mossy crane
#

you

#

are correct

#

That is not what I want

#

But I'm confused on how what happens

wanton delta
#

if I have a spawn living entity packet, is there a way to put that living entity on a scoreboard team

#

(can also do this via packets)

near lodge
#

I believe by sending the add to team packet with the entity id

#

let me check

wanton delta
#

i dont think there is an add to team packet

near lodge
wanton delta
#

the scoreboard team packet has a string collection

#

could i use the fake entity's uuid?

#

im not sure if its different considering its a player spawn

near lodge
#

you send the TeamPacket with the mode being 3 (add players to team) and send the entity UUID

unreal hedge
#

Btw you should prevent nesting if statements, if you can help it 😛

near lodge
#

why so @unreal hedge ?

wanton delta
#

u talking to me?

unreal hedge
#

no

wanton delta
#

o

unreal hedge
#

notyou12 lol

wanton delta
#

yea

mossy crane
#

?

wanton delta
#

it looks nicer

#

easier to read

#

and can actually optimize your code

near lodge
#

depends on the case

mossy crane
#

it's simple

near lodge
#

And it doesn't optimize code

wanton delta
#

depending on what youre doing it can

mossy crane
#

question: how do I make a loop?

wanton delta
#

foreach?

#

or regular for?

#

either way google is your answer :p

near lodge
#

@wanton delta Tell me where it would optimize your code

mossy crane
#

you're speaking gibberish

unreal hedge
#

Pretty much yeah, makes your code more readable.

wanton delta
#

im not speaking gibberish 😳

near lodge
#

I agree with it being more readable

wanton delta
#

@near lodge just curious, im pretty new to ProtocolLib, is there a way to set the mode for a protocol lib packetcontainer?

unreal hedge
#
    @EventHandler
    public void onBlockPlace(BlockPlaceEvent e) {
        Player p = e.getPlayer();
        Block b = e.getBlockPlaced();
        if (b.getType() == Material.QUARTZ_ORE) {
            Block underQuartz = b.getRelative(BlockFace.DOWN);
            if (underQuartz.getType() == Material.QUARTZ_ORE) {
                underQuartz.setType(Material.SAND);
            }
        }
    }```

What I tend to do out of habit, usually people initialize variables at the top but I only initialize them when needed, for instance after the first if statement, I'd initialize player lol
wanton delta
#

otherwise i can just do it the normal way

near lodge
#

I've never used ProtocolLib

#

Only the raw packets

#

So I can't help you with that

keen moth
#

What do you mean by mode?

mossy crane
#

@unreal hedge idek why I initalized player

wanton delta
#

thats ok

mossy crane
#

I'm not using it

unreal hedge
#

Me neither lol

mossy crane
#

so

#

how do I loop the placing sand part

#

I want to loop a whole if statement

#

until that if statement just doesn't work

#
            if (underQuartz.getType() == Material.AIR) {
                underQuartz.setType(Material.SAND);
            }
#

Is what I want to loop

unreal hedge
#

How many times?

near lodge
#

And why?

mossy crane
#

until UnderQuartz.getType isn't air

near lodge
#

So a task?

mossy crane
#

?

#

sure?

unreal hedge
#

Pretty sure when you set a block to sand via a plugin, it won't fall unless you update its block state

mossy crane
#

it does

#

I checked

unreal hedge
#

Oh okay, nice

near lodge
#

you can set whether or not to update physics

mossy crane
#

default it does ig

near lodge
#

setType(material, true) //updates physics

#

the boolean is whether you want to update physics or not

unreal hedge
#

Well you have two options. Use a loop and check how much blocks of sand you'll need then create a task, or just create the task and constantly check.

near lodge
#

Wait I think I get what you are trying to do

unreal hedge
#

Also, is it important that the sand falls? Or could you just have all of the air blocks instantly set as sand?

mossy crane
#

it needs to fall

#

it's so that a cannon refills itself

#

so it places sand until it has sand right under it

#

then, once it has air under it, it starts again

unreal hedge
#

Yeah, you'll need to create a task/scheduler

mossy crane
#

can you help me with that?

mossy crane
#

i don't want it to cancel itself

unreal hedge
#

So you want it to keep going, on and on forever?

mossy crane
#

yes

#

until the quartz is broken

unreal hedge
#

See, there's a condition

#

When the quartz breaks

mossy crane
#

wait

unreal hedge
#

Then you'll want to cancel it.

mossy crane
#

I figured it out

#

So, I make a while(activated=true)

unreal hedge
#

🤦‍♂️

mossy crane
#

then I make another thing to check if the quartz block is there

#

to set it to false if it isnt........

unreal hedge
#

I'll just let you find out the hard way lol

mossy crane
#

plsno

#

pls help me

#

@unreal hedge How do I make a schedueler

unreal hedge
#

I am lazy, you can't expect me to explain all that 😦 And I can barely remember half of it lmao, only just getting back into this 💩

mossy crane
#

I got this: int taskid = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask

unreal hedge
#

Yes, you use that id when you want to cancel the task

mossy crane
#

It's asking for something tho

#

like inside the ()

unreal hedge
#

Yes, those are called parameters.

mossy crane
#

yea, what do I put for them

unreal hedge
#

You see how Bukkit.getServer().getScheduler() returns BukkitScheduler right?

mossy crane
#

it does?

unreal hedge
#

Yes, it is an instance of a class.

mossy crane
#

oh, oke

unreal hedge
#

So you then check the apidocs

#

For that class

#

You then, check for the method you're trying to use and see what the parameters are (and the description)

wind dock
#

Does anyone know anything about dynmap here?

#

So I did wb fill

#

With word border plugin

#

For dynmap

#

But then I accidently uh shut down my pc

#

Do I need to wb fill AGAIN?

#

Or can I just do dynmap fullrender

ashen ember
#

you should run /wb fill again, if it didn't complete it will continue from where it left off

wind dock
#

@ashen ember it completed

#

But I shut down the pc

#

(I'm running on own hardware)

#

So do I need to wb fill again?

ashen ember
#

so long as it saved the world it should be okay but i would run the fill command again to be sure

wind dock
#

But uh fill takes 5 years(exaggeration but it takes a LONG time)

#

It saved the world

#

Definetly

ashen ember
#

but if it hasn't finished you will have to do it again anyway and if it saved when it was rendering it wont take so long if its only got say 6% left to render

#

if its saved then your good to render your map

wind dock
#

Alright

#

What does wb fill do?

#

Exactly?

#

All I know is that I use it before dynmap fillrender

ashen ember
#

renders your minecraft map out so its pre rendered, your server wont have to generate chunks when players walk out into it

wind dock
#

Oh, so that explains why my server folder is so big nos

#

Now*

ashen ember
#

yeah, dynmap will be even bigger too, i think its default config is HD now

wind dock
#

This is supposed to take up a lot of ram/cpu right

ashen ember
#

rendering the map yeah, dynmap not so much

wind dock
#

Oh

#

The wb fill is the rendering part? @ashen ember

#

Cause that heck ramped up my cpu fan

ashen ember
#

yeah that fully renders the world upto your set border

#

once its done your server wont have as much work to do when players are exploring out also

wind dock
#

Using this for an smp earth map as well lol

ashen ember
#

the only downside to pre-rendering is if in a future version of MC they add a new biome for example, you would have to extend the border and render more or have a new world for it

wind dock
#

Last thing-this seriously lagged out my pc is this normal

#

The wb fill

ashen ember
#

now that's done just run /dynmap fullrender <world>
Shouldn't take up much power but will take time

wind dock
#

Oh ok

#

But is the lagging/having problems with my pc to be expected @ashen ember

ashen ember
#

when rendering your Minecraft Map lagg should be expected yeah

wind dock
#

Oh ok

#

@ashen ember should I use low res?

#

For dynmap?

#

Or hd?

ashen ember
#

i would use HD, looks a lot nicer

ebon locust
#

is there a problem going on with the downloads?

wind dock
#

Is hd 3d?

ashen ember
#

32, 2d and caves

wind dock
#

Oh

#

Is the performance Impact/time difference big?

ashen ember
#

not really, i've run HD maps on a low connection in the past and its always been fine

#

there is something in the settings where you can add compression to the rendering, i had mine set to 80

#

how big did you set your world border?

wind dock
#

Thanks!

ashen ember
#

np

wind dock
#

Uh 1 sec

ashen ember
#

i just ask because of the storage it takes up rendering HD maps, i rendered a 6000 x 6000 world with it on 0 compression and the size was between 15GB - 20GB of 5kb image files, so long as you have storage you are all good but because there's so many tiny files moving them around can be a pain, its good for hosting though as it only requests the small images to make up the map image as you zoom so the browser isn't loading all the offscreen stuff and becoming leggy

wind dock
#

I sent u dimensions @ashen ember

ashen ember
#

ah 👍 didn't notice

wind dock
#

I have my server on a 1 terabyte hdd

#

So I think I should be fine?

#

Even though my limit for it is maybe 150gb

ashen ember
#

yeah

wind dock
#

Do you think 150gb is fine?

#

Of a limit?

#

I have like 50 plug-ins

ashen ember
#

from what you sent your world is just over 10000 x 10000, id think mabey 30GB + another 20 for nether and end at most

#

you should be fine

#

thats HD with no compression

wind dock
#

Oh ok

#

@ashen ember so how much would you recommend?

#

Like what would be a reasonable amount for my world

#

My server files*

ashen ember
#

what do you mean?

wind dock
#

Like

#

If you were me

#

What would be the limit

#

You would cap for the storage

ashen ember
#

you mean trim the world so it isnt so big?

wind dock
#

Uh no

#

Like what would be a reasonable amount of storage space to allocate for the server

#

If I'm using 50 plug-ins and dynmap and such

ashen ember
#

oh, i use a 120GB SSD and have maps stored on a 1TB Hard Drive

winged sparrow
#

80 gb probably

wind dock
#

Like I mean

#

How much space do you predict I will need

#

For 50 plugins and dynmap and stuff like that

winged sparrow
#

Plugins are usually a couple kilobytes or megabytes

wind dock
#

How much space should u allocate

#

I*

ashen ember
#

i would just use whatever is available, your maps are likley going to take up around 40GB on HD if your minecraft world is 10000 x 10000

wind dock
#

Oh ok

#

Thanks

ashen ember
#

np, if you have any problems after rendering you can DM me & i'll help out best i can

wanton delta
#

hi does anyone know a way to convert EnumChatFormat to ChatColor

#

eh for now im just using ChatColor.getByChar(chatFormat.character)

wanton delta
#
 WrappedDataWatcher wrapped = new WrappedDataWatcher();

        wrapped.setObject(MetaIndex.ENTITY_META.getIndex(), WrappedDataWatcher.Registry.get(Byte.class), (byte) 64);
        PacketConstructor packetConstructor = ProtocolLibrary.getProtocolManager().createPacketConstructor(PacketType.Play.Server.ENTITY_METADATA, 0, new WrappedDataWatcher(), Boolean.valueOf(true));
        PacketContainer glowingPacket = packetConstructor.createPacket(player.getEntityId(), wrapped, Boolean.TRUE);```
#

does anyone know of a way to increase the length of a glowing affect using packets like this?

#

(0x40 is the byte flag for glowing)

unreal hedge
#

@wanton delta is this to add glow to an item?

wanton delta
#

nope spectral glow

#

i think ive figured it out

#

i think im sending other metadata packets that override it

unreal hedge
#

Probably something in an update I'm not familiar with lol, nvm

wanton delta
#

nope spectral glow

#

nope spectral glow

#

woah internet issues i guess lol

unreal hedge
#

Yeah, I wasn't familiar with Spectral arrows, I don't know much from versions above 1.8, I'm only getting back into developing after a good while

knotty karma
#

is there a way to generate vanilla structures in a custom generator? I can't seem to find anything

frigid ember
#

Anyone know how the clearlag interval works?

#

Is it ticks or like seconds?

knotty karma
#

don't use clearlag. If you have item lag, decrease the despawn time @frigid ember

#

anti-lag plugins that actually work are SAML, LimitPillagers, and VillagerOptimizer (although villageroptimizer is relatively ineffective now that 1.15.2 is a thing_

keen sky
#

I'm trying to upload files from a server that I have to Multicraft, but when I enter the server in minecraft I get this: if you wish to use ip forwarding please enable it in your bungeecord config as well

#

is spigot

proven fossil
#

enable ur ip

#

so u can join

#

if you wish to use ip forwarding please enable it in your bungeecord config

keen sky
#

who i can

proven fossil
#

in ur config

keen sky
#

i try all

#

hmm

storm tulip
#

Im having issues with other plugins having libs loaded.

#

I shade it and relocate the lib toooo

keen sky
#

when i try open my server dont upload nothing

#

and give me a message; loss conection

sleek falcon
#

can somebody help me with placeholder api and bossbar?

buoyant path
#

[23:49:38 WARN]: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: User siuyyxmg_iron already has more than 'max_user_connections' active connections
How can I fix this? I'm using async threads and opening new connections for all my SQL tasks

obtuse rose
#

[23:49:38 WARN]: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: User siuyyxmg_iron already has more than 'max_user_connections' active connections
How can I fix this? I'm using async threads and opening new connections for all my SQL tasks
@buoyant path try using a connection pool

#

HikariCP is a good one 👍

buoyant path
#

What exactly do they do and why couldnt I just change that value

sturdy inlet
#

could someone tell me why this command doesnt work //set %10stone,30%cobble_stone,15%grass_block,%20gravel

#

in world edit

obtuse rose
#

%10stone hmm?

upper hearth
#

Also %20gravel

sturdy inlet
#

?

upper hearth
#

percent in the wrong spot

#

After the number

sturdy inlet
#

oh lol thanks

obtuse rose
#

What exactly do they do and why couldnt I just change that value
@buoyant path connection pool 🤷‍♀️
also, yes you can change max connection if you own the mysql server

buoyant path
#

Yeah i see what u mean now

obtuse rose
#

better use connection pool though

buoyant path
#

but i cant so

#

Is there like a 1 class resource for it?

#

using a api seems like trouble lol

obtuse rose
#

??

sturdy inlet
#

//set stone%10,cobblestone30%,grass_block%15,gravel%20 it still no work

subtle blade
#

10%, not %10

sturdy inlet
#

oh

subtle blade
#

I believe 10%stone is correct

#

(so on and so forth)

sturdy inlet
#

still no work

#

//set stone10%,cobblestone30%,grass_block%15,gravel%20

#

could you write it for me xD

upper hearth
#

//set 10%stone,30%cobblestone,15%grass_block,15%gravel

sturdy inlet
#

oh thanks

upper hearth
#

Numbers first, percent middle, then the block name

sturdy inlet
#

ok thank you havent used world edit in a while

subtle blade
#

Used literally every option except the correct one 😅

sturdy inlet
#

ik

#

like 10 attempts

upper hearth
#

The right way is always the last one you try

ornate chasm
#

What's the best way to move a plugin to local dev server after maven build automatically?
Do I have to make a script that watches for changes and copies it or is there an easier and better way?

#

Rather don't change the output dir in the pom

stable egret
#

is there anyway to stop world saving when /stop command is executed?

plush hinge
#

Please help me I just lost my world of minecraft just by changing version

subtle blade
#

As mentioned in #general, if you didn't backup your world, you can't

stable egret
#

hey

#

Please help

#

is there any plugin to stop world saving when shutdown

subtle blade
#

Why in the world would you ever want to do that

velvet halo
#

Some hubs don't save the world they have loaded in on shutdown

#

or mini games

stable egret
#

yea

#

my minigame's feature not working and the developer is not online

velvet halo
#

Stops the world from being griefed or changed which can be nice.

stable egret
#

yea

obtuse rose
#

@velvet halo I've made a plugin that do runtime injection into Minecraft's code to do that before
unfortunately Mojang change world saving stuff and now it seems like the way to do it is to patch the server even before it started

subtle blade
#

I've made a plugin that do runtime injection into Minecraft's code to do that before
That almost sounds like a really, really bad idea

#

Probably because it is a really, really bad idea lol

obtuse rose
#

Why lol

subtle blade
#

Anything that changes code at runtime is going to inevitably break something

obtuse rose
#

no, you can't inject it while it's running duh

#

you need to inject into a class which have not loaded yet

subtle blade
#

I understand that, but the same applies ;P

obtuse rose
#

not really 🤷‍♀️

#

Bytecode modification is actually quite common

#

even FAWE uses it

tiny dagger
#

I guess it's fine if you know what you're modifying does

obtuse rose
#

^

sleek falcon
#

can somebody help me with placeholder api and bossbar? That's the code and it shows up as (picture below) I've been trying for hours now and I can't get it to work

modern monolith
#

Parse the placeholder in chat

sleek falcon
#

What do you mean?

modern monolith
#

/papi parse me %mcmmo_level_fishing%

sleek falcon
#

I've already done /papi ecloud download mcmmo

#

doing "/papi parse me %mcmmo_level_fishing%" shows the level in chat

#

but how would I have the level show up in the bossbar? I did the same thing with TitleAPI and it works, but I can't get it to work with any bossbar

#

but not the bossbar

warped shuttle
#

Will papi automatically update that?

#

because when a player first joins their mcmmo profile isn't loaded

#

it takes a few seconds

velvet halo
#

Schedule a task to update the bossbar later

#

¯_(ツ)_/¯

sleek falcon
#

alright ill try that

velvet halo
#

Is there an event for mcmmo that checks when experience is gained?

warped shuttle
#

Yea, theres also a profile load event

#

McMMOPlayerProfileLoadEvent

#

Listening to that vs onJoin would be better

velvet halo
#

^

warped shuttle
#

also also, if you've already got mcmmo as a dependency why are you using papi to access their power level?

#

could just use mcmmos functions for it

sleek falcon
#

I don't know how lol, i just started about a week ago and don't really know much about developing, but i'm starting somewhere, thanks guys

warped shuttle
#

mcmmo doesn't really have a great api right now but you'd just need to look through the source for their user manager

#

i guess papi works though so nbd

sleek falcon
#

Okay, so I listened to McMMOPlayerProfileLoadEvent instead of onJoin, and it takes about 3 seconds before it loads the bossbar, but it still doesn't show the level

#

and @velvet halo there is an event that checks when experienced is gained

velvet halo
#

then update the bossbar whenever that happens, easy peasy

#

Check for the type

pastel condor
#

when you compile mcmmo yourself because you don't want to pay 🙂

sleek falcon
#

wdym?

velvet halo
#

You can close the repo and build it yourself

#

clone*

warped shuttle
#

kinda a weird thing to flex lol

#

😎 👊 when you don't support developers 👊 😎

obtuse rose
#

you should update that every X second anyway though?

warped shuttle
#

he's listening to the levelup event too

obtuse rose
#

ah

warped shuttle
#

that's just for first join

obtuse rose
#

meh, is load event got invoke when load or loaded though

warped shuttle
#

You can cancel it so its while loading, but you can also call #getProfile on it

#

which forces the rest of the load

#

I think it's a issue with the mcmmo papi extensions on ecloud, it's got a lot of issues

#

You should try with electroniccats new mcmmo placeholders

obtuse rose
#

it might be better to runtasklater on loading event?

#

like update bossbar a sec later then

warped shuttle
#

Yea, if he was using the mcmmo way of getting profiles I'm pretty sure it would work but with papi you'll probably need a task

sleek falcon
#

for runtasklater, what's the delay in? ms?

#

or

warped shuttle
#

should be ticks

sleek falcon
#

alright

#

alright it works! Thanks i used runtasklater

#

lol i thought it was ms and put 2000 and was waiting forever

warped shuttle
#

lol

#

glad it works :)

sleek falcon
#

😄

nova venture
hoary parcel
#

Use one of the hundrets http clients for java

#

Okhttp is a decent one

bronze marten
#

Pls do it async

#

No url requests on main thread

#

👀

stark lodge
#

I have this plugin and I think I have everything set up correctly, but when I put it on the test server it doesn't recognize the command

bronze marten
#

Did u put it in plugin.yml

stark lodge
#

yes

#
main: com.lonnonjamesd.Launch.Main
name: LaunchPlugin
version: 0.1
author: LonnonjamesD
api-version: 1.15

Commands:
  Launch:
    aliases: lch```
bronze marten
#

And then in ur main class getCommand(“Launch”).setExecutor()?

stark lodge
#

what

#

I only have one class

bronze marten
#

The one that extends JavaPlugin

stark lodge
#

yes

bronze marten
#

In ur onEnable put that?

stark lodge
#
    // Launch command!
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if (label.equalsIgnoreCase("launch") || label.equalsIgnoreCase("lch")) {
            if (sender instanceof Player) {
                Player player = (Player) sender;
                
                // /launch
                if (player.hasPermission("launch.use") || player.hasPermission("launch.*")) {
                    if (args.length == 0) {
                        // launch normally
                        player.sendMessage(ChatColor.LIGHT_PURPLE + "Zoom boy");
                        player.setVelocity(player.getLocation().getDirection().multiply(2).setY(2));
                        
                        return true;
                    // launch [number]
                    } else {
                        // launch with the arg they sent
                        
                        player.sendMessage(ChatColor.DARK_PURPLE + "Zoom boy");
                        player.setVelocity(player.getLocation().getDirection().multiply(Integer.parseInt(args[0])).setY(2));
                        
                        return true;
                    }
                } else {
                    player.sendMessage(ChatColor.DARK_RED + "You don't have access to that boy!");
                }
            } else {
                Player player = (Player) sender;
                player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&oConsole Goes Flying!"));
            }
        }
        
        return false;
    }
    
}```
#

no I didn't

bronze marten
#

Its better if u check with cmd.getName tbh

pale plaza
#

thats the error

bronze marten
#

Caused by: java.lang.NoSuchFieldError: GRAY_WOOL

#

@pale plaza

pale plaza
#

Huh what that

stark lodge
#

@bronze marten idk much about plugin stuff

#

so how would I make it so this works

pale plaza
#

@bronze marten would you know how to fix

bronze marten
#

@pale plaza


22.04 20:42:08 [Server] INFO Caused by: java.lang.NoSuchFieldError: GRAY_WOOL
22.04 20:42:08 [Server] INFO at conj.shop.events.listeners.Editor.editItem(Editor.java:103) ~[?:?]
#

Line 103 of Editor

stark lodge
#

so make more than one file?

#

make 2 calsses

pale plaza
#

ok what do i do to fix

bronze marten
#

Yes thats always a great idea @stark lodge

stark lodge
#

ok

bronze marten
#

@pale plaza dont use GRAY_WOOL, as it doesnt exist

stark lodge
#

does it have to extend anything

bronze marten
#

CommandExecutor iirc

#

Its also in the tutorial wiki tbh

#

implements CommandExecutor

pale plaza
#

@bronze marten I guess that a plugin ??? as i dont think i have any plugin like thta

#

that

stark lodge
#

it no work

bronze marten
#

@pale plaza ah, report the plugin to the dev then. You might as well check your config then if it contains GRAY_WOOL or sth

pale plaza
#

Ok Thanks

bronze marten
#

Thats just a nullpointer @stark lodge ?

#

In ur class Main on line 10

stark lodge
#

this.getCommand("launch").setExecutor(new Launch());

#

epic

vale slate
#

Never say just a NullPointer

stark lodge
vale slate
#

have you registered your command in your plugin.yml

stark lodge
#

yes

bronze marten
#

@stark lodge I think its caps sensitive

stark lodge
#
main: com.lonnonjamesd.Launch.Main
name: LaunchPlugin
version: 0.1
author: LonnonjamesD
api-version: 1.15

Commands:
  Launch:
    aliases: lch
    usage: "/launch <number>"```
bronze marten
#

Ur command is Launch in plugin.yml

vale slate
#

it is indeed

bronze marten
#

Btw, eclipse

#

Helo

#

😳

vale slate
#

Eclipse is great

stark lodge
#

^

bronze marten
#

Smh

stark lodge
#

nvm that, same error

#

I changed Launch to launch

#
package com.lonnonjamesd.Launch;

import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {
    
    @Override
    public void onEnable() {
        // startup, reloads, plugin reloads
        this.getCommand("launch").setExecutor(new Launch());
    }
    
    @Override
    public void onDisable() {
        // shutdown, reloads, plugin reloads
    }
}
#
public class Launch implements CommandExecutor {
    
    // Launch command!
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if (sender instanceof Player) {
            Player player = (Player) sender;
            
            // /launch
            if (player.hasPermission("launch.use") || player.hasPermission("launch.*")) {
                if (args.length == 0) {
                    // launch normally
                    player.sendMessage(ChatColor.LIGHT_PURPLE + "Zoom boy");
                    player.setVelocity(player.getLocation().getDirection().multiply(2).setY(2));
                    
                    return true;
                // launch [number]
                } else {
                    // launch with the arg they sent
                    
                    player.sendMessage(ChatColor.DARK_PURPLE + "Zoom boy");
                    player.setVelocity(player.getLocation().getDirection().multiply(Integer.parseInt(args[0])).setY(2));
                    
                    return true;
                }
            } else {
            player.sendMessage(ChatColor.DARK_RED + "You don't have access to that boy!");
            }
        } else {
            Player player = (Player) sender;
            player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&oConsole Goes Flying!"));
        }
        return false;
    }
}```
pale plaza
#

player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&oConsole Goes Flying!"));
}

bronze marten
#

Mmh why is ur plugin.yml in the src folder tw

#

Put it in resources

pale plaza
#

Is it case sens cuz that got caps XD

vale slate
#

it's eclipse style this is fine

stark lodge
pale plaza
#

Typo???

#

Tbh I cant spell XD

vale slate
#

you shall not capitalize package names by the way

stark lodge
#

ok

#

still nothiung

vale slate
#

System.out.println((this.getCommand("launch") ==null));

#

could you put this in line 9

stark lodge
#

it returned true

bronze marten
#

I still think ur plugin yml is not binded in the jar

#

Use the resources folder?

stark lodge
#

where is that

bronze marten
#

Then maven compile with resources?

vale slate
#

there is none in eclipse

bronze marten
#

Bru

stark lodge
#

we're superior

vale slate
#

only if you use mvn or gradle

bronze marten
#
main: com.lonnonjamesd.Launch.Main
name: LaunchPlugin
version: 0.1
author: LonnonjamesD
api-version: 1.15

Commands:
  Launch:
    aliases: lch
    usage: "/launch <number>"```

@stark lodge commands is also with cap here

vale slate
#

could you send me your jar file

stark lodge
bronze marten
#

we're superior
@stark lodge and, no.

#

👀

vale slate
#

could we end this discussion there is no use to this

#

it is in the jar

stark lodge
#

ok

#

ye

#

also probably not right channel to ask in

vale slate
#

I am away for some time now, sorry

frigid ember
#

@stark lodge which channel do i ask in

fading owl
#

General

#

I would assume

velvet halo
#
public class JsonStorage {

    private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();

    public static void write(Path path, Object object) {
        try (BufferedWriter bufferedWriter = Files.newBufferedWriter(path, StandardCharsets.UTF_8, StandardOpenOption.CREATE_NEW)) {
            GSON.toJson(object, bufferedWriter);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static <C> C read(Path path, Class<C> clazz) {
        try (BufferedReader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8)){
            return GSON.fromJson(reader, clazz);
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }
    }
}
``` Pretty happy with this class, does anyone has any more recommendations?
open inlet
#

Hello I have a problem that I have not been able to solve for several days. On my 1.12.2 server I wanted to put a texture pack for all players. However if I launch with spigot no problem the texture pack is downloaded. But if I restart the server without spigot, no trace of the resource pack. I only use spigot for worldedit, otherwise my server is in vanilla with commands blocks.

#

The pack is in direct download in dropbox or minepack but every time I am in vanilla it does not ask to be downloaded.

#

Can someone please help me?

fair trench
#

Not really spigot related, but is there a worldguard flag to disable magma block damage ?

#

or any other way i can disable it ?

worn gate
#

il need help

hollow rivet
#

there;s the mob-damage flag

worn gate
#

A team of hackers are crashing my server with this command : //eval java for(i=0;i<256;i++){for(j=0;j<256;j++){for(k=0;k<256;k++){for(l=0;l<256;l++){ln(pi)}}}}... Is they a way of blocking this command ?

hollow rivet
#

i use the ChatControl plugin to block that

fleet crane
#

remove the permission

#

why tf would you give untrusted people worldedit

worn gate
#

they had no permissions

hollow rivet
#

i'm not sure if its still the case but WE Still runs the calculation even if you dont have the perm

worn gate
#

default

keen moth
#

Deny them worldedit.calc

hollow rivet
#

u have to block the command before it hits WE

worn gate
#

they aren't in wolrdedit.calc

fleet crane
#

lol thats terrible from worldedit

hollow rivet
#

yea its been an issue for years

#

u can crash servers with a lot of WE commands

worn gate
#

How can i stop it ?

hollow rivet
#

sec @worn gate

worn gate
#

//calc for(i=0;i<256;i++){for(j=0;j<256;j++){for(k=0;k<256;k++){for(l=0;l<256;l++){ln(pi)}}}}
//calculate for(i=0;i<256;i++){for(j=0;j<256;j++){for(k=0;k<256;k++){for(l=0;l<256;l++){ln(pi)}}}}
//calc for(i=0;i<256;i++){for(j=0;j<256;j++){for(k=0;k<256;k++){for(l=0;l<256;l++){ln(pi)}}}}
//calc for(i=0;i<256;i++){for(b=0;b<256;b++){for(h=0;h<256;h++){for(n=0;n<256;n++){}}}}
//solve for(i=0;i<256;i++){for(b=0;b<256;b++){for(h=0;h<256;h++){for(n=0;n<256;n++){}}}}
/worldedit:/calc for(i=0;i<256;i++){for(b=0;b<256;b++){for(h=0;h<256;h++){for(n=0;n<256;n++){}}}}
/worldedit:/solve for(i=0;i<256;i++){for(b=0;b<256;b++){for(h=0;h<256;h++){for(n=0;n<256;n++){}}}}
/worldedit:/eval for(i=0;i<256;i++){for(b=0;b<256;b++){for(h=0;h<256;h++){for(n=0;n<256;n++){}}}}

#

all commands which can be used

hollow rivet
#

i dont have time to fully run u through the plugin but if you download it and take a poke around.

#

also theres way better ways to do regex but thats another story lol

worn gate
#

And i just found a way with Wurst Hacked client to get op. Is they a way to block this ?