#help-archived

1 messages · Page 22 of 1

subtle blade
#

Players are allowed to break blocks normally, though yes, the event mentioned above is called to listen for it

wraith dew
#

is the world called 'world' in server.properties @south cedar

vernal spruce
#

too late,brain cant process

#

at this hour

subtle blade
#

Have you registered your listener, Remence

rapid yacht
#

actually I don't know if it's an event, i'm doing player.(whatever comes up)

#

is that an event?

subtle blade
#

No ;P

rapid yacht
#

😦

#

oh im srry

subtle blade
#

You want to force a player to break a block?

rapid yacht
#

I started development yesterday 🙂

vernal spruce
#

@subtle blade what the avg response time from bot,when it comes to sending the message?

south cedar
#

yes

rapid yacht
#

I want to disable block breaking once a player runs a command

south cedar
#

@wraith dew

subtle blade
#

Then you'll want to listen to BlockBreakEvent, yes. There's a wiki on how to listen for events

rapid yacht
#

alright thanks

subtle blade
south cedar
#

level-name=world

wraith dew
#

ok

#

so plugin.entities.get(i) is returning null

south cedar
#

Alright

#

why so?

wraith dew
#

is that a hashmap?

south cedar
#

public static List<UUID> entities = new ArrayList<UUID>();

wraith dew
#

ok

#

are you setting anything to null in /killallquests?

south cedar
#

I'm clearing plugin.entities, although I'm not setting anything directly to null

wraith dew
#

wait is the error thrown after /listquests is run?

#

or /killallquests?

rapid yacht
#

Okay, I have my Listener class

south cedar
#

if I run /listquests no errors
/killallquests error
/listquests error
/summonquest no error/killallquests error
/listquests error
/killallquests error

rapid yacht
#

now how do I actually disable the breaking on blocks

south cedar
#

In that order I run them.

wraith dew
#

ok

#

entitychunks may be returning null

south cedar
#

Just tried
/listquests
/killallquests
/listquests

With no errors

wraith dew
#

when you do killallquests does it clear the hashmap?

subtle blade
#

You would have to keep track of a set of UUIDs for players that have disabled block breaking, Remence. Create a Set<UUID> somewhere (HashSet implementation) and when someone runs your command, add or remove them depending on whether or not they're already in the collection

#

Then in your BlockBreakEvent, if the player's UUID is in that set, cancel the event

rapid yacht
#

Alright, i'll start that

wraith dew
#

@south cedar move this to private dm

south cedar
#

ok

wraith dew
#

too many people are talking

subtle blade
#

I just threw a lot at you lol. You can get more information on HashSets on Google 🙂

#

Java functionality

rapid yacht
#

Don't worry, I'm learning as I go lmao

#

I already know a bit of basic java

subtle blade
#

Good 😄

velvet cipher
#

Can anyone help me with setting up new kits with KITPVP config.yml

velvet halo
#

@south cedar Why the static btw for the arraylist?

south cedar
#

To access them from Quest

velvet halo
#

Use dependency injection

warm carbon
#

yo @velvet halo, are you using a framework for dependency injection?

velvet halo
#

I am using Dagger

#

Not Guice

warm carbon
#

yeah, was just curious

frigid ember
#

When will version Spigot 1.16 be released?

#

Is this a good place for asking Spigot plugin development questions?

subtle blade
#

Dude, vanilla 1.16 isn't even released. lol

vernal spruce
#

yeah..

frigid ember
#

Snapshot :/

subtle blade
#

Sure, Adam. Generally quick and concise ones. If you think it's a bit larger and more in-depth, the forums are likely the better place

#

Spigot's never released a snapshot build

vernal spruce
#

as it should..

subtle blade
#

Nor should they ever. They're unstable and should not be made production

frigid ember
#

as it should..
Yeah, is a good suggestion! Beta Spigot Versions

#

🤔

velvet halo
#

Beta spigot versions are a waste of time

frigid ember
#

Why?

velvet halo
#

Especially since people are going to use it for commercial/production use and then don't know why tf their server is breaking

#

Then they blame it all on spigot

#

Why would you release unstable software?

#

¯_(ツ)_/¯

frigid ember
#

Truth...

#

I'm creating a simple plugin, but getting this in the console when starting my server:

[09:46:21] [Server thread/WARN]: Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!

[09:46:26] [Server thread/WARN]: Legacy plugin Time_Changer v1.0.0 does not specify an api-version.
[09:46:26] [Server thread/INFO]: [Time_Changer] Loading Time_Changer v1.0.0

I am developing the plugin using Spigot-1.15.2 and Java 13, when I first ran the server I used Java 8, but I've since switched to Java 13.

a) Why am I getting this message?
b) How do I/should I specify an api-version?

subtle blade
#

You should include api-version: 1.13 in your plugin.yml

frigid ember
#

1.13? I'm using spigot 1.15.2

vernal spruce
#

its for compatibility

subtle blade
#

It's a minimum version

vernal spruce
#

unless ur using nms it should work..

#

even though bamboo seemd to screwed me over once 😂

frigid ember
#

Ah okay thanks.

#

Now it's just showing [10:00:54] [Server thread/WARN]: Legacy plugin Time_Changer v1.0.0 does not specify an api-version. in the console. This is my plugin.yml:

name: Time_Changer
version: 1.0.0
author: Adam Morris
description: Changes the time in a server via a GUI
main: com.github.aimorris.timechanger.TimeChanger
api-version: 1.13
vernal spruce
#

It usually doesn't matter

#

the plugin still works but its not locked on a version

rapid yacht
#

I'm exporting my plugin with maven, and the second time I export it it gives me the jar, except beside the name of it, it says shaded, what does that mean?

frigid ember
#

Ah okay

velvet halo
#

It means you are shading in libraries into your jar file to optimize your jar a bit more.

#

So it doesn't use all of the source code from the libraries that you use.

#

Only the code that is needed.

rapid yacht
#

so

#

is that a good thing? haha

subtle blade
#

Depends on what you're shading ;P

rapid yacht
#

I don't know what im shading

subtle blade
#

If you're shading any plugins or the server jar, not good. You should only shade a dependency that will not be present on the server at runtime

#

Say, Apache Commons IO

#

(actually that might be on the server lol)

velvet halo
rapid yacht
#

ok hold on

velvet halo
#

Your scope should be set to provided for spigot so it doesnt shade it into the jar

subtle blade
#

(or plugins)

rapid yacht
#

😵

#

literally have no idea what you guys are saying

#

but i'll try 😂

subtle blade
#

Well what's your pom look like?

#

?paste

worldly heathBOT
rapid yacht
vernal spruce
#

ive yet to switch from eclipse

subtle blade
#

Okay so in this case you're fine. You're not shading anything extra

#

In fact, here, you don't even need the shade plugin

rapid yacht
#

Stellrow I switched pretty early on, and IJ is really good dude

#

ohh

vernal spruce
#

i just love the simplicity from eclipse..

#

never had a problem with it

rapid yacht
#

so Choco I thought that the shaded jar was the "updated" version of the plugin

velvet halo
#

I never used eclipse

rapid yacht
#

because the first time I exported it didn't give me a shaded version

subtle blade
#

Lines 32 - 47 can be removed entirely

rapid yacht
#

only the second time

subtle blade
#

You're not shading anything extra

rapid yacht
#

is it recommended that I remove them?

#

will it stop the shading?

subtle blade
#

If you're not using it, yes

#

You have nothing to shade

rapid yacht
#

in what case would I need to shade?

subtle blade
#

You should only shade a dependency that will not be present on the server at runtime

#

Say, Apache Commons IO

#

The server itself will obviously be present at runtime, as will all its dependencies (Guava, Apache Lang 2, GSON, etc.), and all plugins

rapid yacht
#

This is pretty 5Head to me

subtle blade
rapid yacht
#

lmao

vernal spruce
#

aww shit we have twitch emotes?

rapid yacht
#

thanks for the help guys

#

nah he has nitro

vernal spruce
#

dammit

subtle blade
#

I'm 8 million steps above you guys bigbrain

rapid yacht
#

u should add twitch emotes tho... 👀

vernal spruce
#

or at least just 5head and 3head

rapid yacht
#

u only have 2 emotes widepeepoSad

#

do u have the wide peepos?

vernal spruce
#

as those 2 emotes describe a developer the best

subtle blade
#

"Do you have the wide peepos"

#

Who do you think I am?

rapid yacht
#

LOOOLL

vernal spruce
#

Pog

rapid yacht
#

PogU

vernal spruce
#

just noticed we are spamming a very important text channel Pog

rapid yacht
#

spamming an important channel with twitch emotes so its all good 👍

dusty topaz
#

If only I could spam my own emotes 👎

rapid yacht
#

guys my spigot username is so retarded I don't even know if I should link it 😭

#

I wanna change it

mental falcon
#

I don't think if anyone cares tbh

subtle blade
#

That sounded meaner than I think you meant it to be lol

#

but you're right. Not a huge deal

golden vault
#

Is there a way for a plugin to know that an interaction with a sign was canceled by the built in spawn protection?

subtle blade
#

Listen for a higher priority event

hot lodge
#

Can someone help me I run spigot servers in a bungee but in chat it says [Owner] %PREFIX%MyName%SUFFIX%: message

subtle blade
#

You can then check if event.isCancelled() 🙂

golden vault
#

sure but I mean specifically by the built in protection

subtle blade
#

OH by spawn protection

#

Ehm... not sure

golden vault
#

ya

#

it cancels the event with no message to the user so then I get a bug report

#

was hoping to send my own message

south cedar
#

?paste

worldly heathBOT
solar prism
#

an alternative is to listen for blockbreak and check if that location is now air or not

rapid yacht
#

If I change my spigot username do I have to reverify?

golden vault
#

naw what i mean is when someone right clicks a sign to use a shop the built in spawn protection cancels it before any plugins but it does not send a message so people think my plugin is broken.

vernal spruce
#

why arent you setting the protection to like 1 block?

solar prism
#

oh i thought it's breaking a block

#

i mean you can use worldguard to handle spawn protection instead

vernal spruce
#

i think in server-proprieties is the field spawn-protection

golden vault
#

not me the users of SignShop

solar prism
#

so you can use its api to do things

golden vault
#

A server owner installs signhop and ops themselves and they create some signs then their friend that is not opped tries to use the sign but spawn protection stops them. Then the server owner thinks signshop has failed because it is "not working". Then I get a bug report. And I have to tell them to set their spawn protection to 0 or deop and use plugins for perms and spawn protection. What I would like to do is detect when that happens on the server then just print a message to console, an op or the player.

solar prism
#

oh i thought we're talking about your server

golden vault
#

I thought so

#

thanks for trying to help though

solar prism
#

hmm

#

i guess you can read the server.properties file with a bufferedreader or scanner, and check if the spawn-protection is 0 or not

#

this is prob a crappy way lol

vernal spruce
#

can't really think of a solution otherwise

solar prism
#

do events not fire?

golden vault
#

pretty sure they do ( i have only been thinking about the problem while at work, shhh) I can of course check if they are canceled which I already do in order to respect protection plugins. The protection plugins send their own messages usually so it is not an issue, so i dont want to spam them just because the event was cancelled and I don't know why

cloud sparrow
#

check if the sign is in the region of the spawn protection

golden vault
#

ya could do that, I guess the next thing would be can i tell if the protection is enabled, hmmm

#

I think it is only enabled if there are ops?

cedar glade
#

does anyone have a link or know where to find one for the magic spells discord?

frigid ember
#

My Event Handler (in class TimeGUI):

  @EventHandler
  public void onInventoryClick(final InventoryClickEvent e) {
    if (e.getInventory().getHolder() != this) return;
    e.setCancelled(true);

    final ItemStack clickedItem = e.getCurrentItem();

    if (clickedItem == null || clickedItem.getType() == Material.AIR) return;

    final Player p = (Player) e.getWhoClicked();

    p.sendMessage("You clicked at slot" + e.getRawSlot());
  }

isn't working, even though I've registered it in my main class's onEnable:

    @Override
    public void onEnable() {
        Bukkit.getLogger().info("TimeChanger successfully enabled!");

        this.getCommand("settime").setExecutor(new CommandSetTime());

        Bukkit.getServer().getPluginManager().registerEvents(new TimeGUI(), this);
    }

Anyone have any idea why this could be?

#

And I know it isn't working, because when I click something in the GUI, it doesn't get cancelled.

vernal spruce
#

are you supposed to final those things?

frigid ember
vernal spruce
#

hmm check if e.getClickedInventory is null,return

solar prism
#

whats happneing

vernal spruce
#

then check if e.getClickedInventory.equals(inv[your inventory])

frigid ember
#

@solar prism When I click on an item in the inventory, the event handler is not being called.

solar prism
#

any errors?

frigid ember
#

No

solar prism
#

if you System.out.println a message in that event, does it print out in console?

wraith grail
#

How do I do a nullcheck on this?
configsection_wbcworldregistery.getKeys(false)
The method does not return a null for me to check against, so how?
I cannot trust the player to not listen to me when I give instructions in how to use the plugin (so they don't get a NullPointer), so naturally I want to
Code some form of backup so the plugin does not break entirely.

vernal spruce
#

Check if the config contains that path first?

#

its a bit strange telling without knowing what it actually does

wraith grail
#

It does. But I have intentionally cleared the section of all keys (I am testing the code to make sure it does not break).
Here's the Yaml:
wbcworldregistery:
And a example of when it is properly used:
wbcworldregistery: world: enabled: true world2: enabled: false world_big: enabled: true world_biggest_shit: enabled: false

#

Code used to get the section:
ConfigurationSection configsection_wbcworldregistery = getConfig().getConfigurationSection("wbcworldregistery");

vernal spruce
#

Checking if the config contains the path wbcworldregistery should do the trick

rapid yacht
#

Hey, I wanna make it so that in the config.yml there is a part where you can enable/disable join/leave messages using booleans, how can I set that up? I already have 2 classes, one for my join message, and one for my leave message

#

The leave and join messages are all setup btw

frigid ember
#

I just worked out that e.getInventory().getHolder() != this is true.

rapid yacht
#

I just wanna enable/disable them using booleans

wraith grail
#

If I put this in yaml it works perfectly and I get no nullpointers:
wbcworldregistery: world: enabled: true
But that's not what I am concerned about. I want to do some form of nullcheck to protect my plugin from user stupidity.
As in nullcheck
configsection_wbcworldregistery.getKeys(false)

golden vault
#

You could check if the set isEmpty()

frigid ember
#

Do I really need this check? if (e.getInventory().getHolder() != this) return;

wraith grail
#

@golden vault YES! I will test it immediatly.

#

I have a good feeling about it.

#

Solution was just to do
configsection_wbcworldregistery == null

#

in the if statement.

#

could not use isEmpty because ConfigurationSection had no such method.

golden vault
#

I meant on the keys

#

but whatever works

wraith grail
#

configsection_wbcworldregistery.getKeys(false).isEmpty() = nullpointer.
It's that doing that overall (getKeys) when the section has no keys at all seem to end up with a NullpointerException. So I cannot do isEmpty even if I want to because the method getKeys itself instantly triggers a nullpointer.

#

But you led me to a solution anyways. So thanks @golden vault 👍

harsh anvil
#

Then check if it's null first

#

But clearly the section doesn't exist

golden vault
#

yay, I thought you were already checking if the section was null and it wasn't and you were getting an npe on the list of keys.

#

or the key itself

wraith grail
#

Nah I emptied the "section" of all keys intentionally because I am trying to safeguard against user input so they don't end up breaking the plugin and then
coming to cuss at me later on. One should always try to safe guard against user input whenever they can unless it's a vital operation that must fail/crash so you don't get "dangerous" results later on. Atleast I think so. In this case since I got a backup system elsewhere in the plugin (and it's not so vital), I can simply elect to display
a message when this occours "There were no world settings to load from the config".

golden vault
#

yep always assume the user will mess something up either accidentally or on purpose

wraith grail
#

And crash it or disable the plugin or something if the operation absolutely must have user input and cannot provide it's own. In this case, I can provide my own input (the error message in this case).

#

Probably sanitize the input too if it's something small that can be corrected without giving the user a result they did not expect.

vagrant widget
#

Hello guys!

I have a question regarding global bungee-cord bans, so i am making a server and it has been quite a while since i have last done, i have got most of the stuff set like protection and what not, the only thing i am not sure how to do is global bans, for example if someone gets banned from the anti-cheat (NoCheatPlus) in skyblock server, they still can join after that, can anyone please help me figure this out? Thanks in advance!

rapid yacht
#

.

#

o no

#

pls change my nick back

wicked sage
#

lol

slim hemlock
#

wasn't there a hologram api that was fairly popular and worked with a bunch of different versions?

#

one that faked armorstands using packets instead of real armorstands ?

wicked sage
#

you can still use holographic displays no?

golden vault
#

holographic displays

#

lol

wicked sage
#

fastest hands in the east

slim hemlock
#

oh it's still only on bukkit?

dusty topaz
#

@golden vault what would you suggest over holographic displays

wicked sage
#

yeah but it workjs with paper in 1.15

dusty topaz
#

im still using it whenever i work with holos

slim hemlock
#

well if it works... thanks

wicked sage
slim hemlock
#

anyone happen to know if holographic displays allows for dynamic hologram locations?

#

oh there she is

#

#teleport

#

that should do it

#

hm no maven repo

#

nvm found that as well

#

today's theme is "I am blind"

vagrant widget
#

What’s a good anticheat that has auto banning system?

finite belfry
#

help
i downloaded world guard

#

but i didnt work

#

even i /rg doesn't work

#

i need help

vagrant widget
#

Did you download the correct version ?

finite belfry
#

yes

#

my server is 1.15.2 and i downloaded 7.0.2

dusky herald
#

Why would you want an anti cheat with an auto banning system lol

lusty vortex
#

Why wouldn't you 👀

finite belfry
#

answer me pls

lusty vortex
#

U need WorldEdit too

finite belfry
#

i have

dusky herald
#

They would be better as a tool to prevent cheating and handle yourself case-by-case rather than potentially lose players through false positives.

finite belfry
#

i have world edit

#

pls helpppppppppppp

lusty vortex
#

@dusky herald You only know of shitty Spigot anti-cheats 😉

#

@finite belfry Check logs for errors

#

Related to WorldGuard

hot lodge
#

what do I do if I dont have a permissions plugin installed but I need to have a permission to do something do I have to download one or is there a way

#

if I had too would luckperms be better or permissionsex

lusty vortex
#

U could use Bukkit's perm system

#

But I wouldn't bother with it

#

Easier to just use Luck, or PEX

hot lodge
#

which would you recommend

lusty vortex
#

I like Luck

#

Easy as hell to use

hot lodge
#

ok is there a way to do chat prefixs or do I have to use another plugin

vagrant widget
#

@dusky herald because why not

#

Is that bad?

lusty vortex
#

It's not. But you'll need to invest in a pretty expensive anti-cheat

#

If you want something reliable at least

vagrant widget
#

Is there no free anti cheat that does that

#

Or only paid

lusty vortex
#

Only paid

#

I wouldn't ever have autoban enabled for a free anti-cheat

#

Not saying they aren't semi ok, but they false like crazy

vagrant widget
#

I see

finite belfry
#

Related to WorldGuard
@lusty vortex
where can i check logs? sorry i am new

lusty vortex
#

/logs/latest.log

finite belfry
#

thx

#

pls help i cannot find errors in the log

#

@finite belfry Check logs for errors
@lusty vortex help

lusty vortex
#

Jesus lol

finite belfry
#

?

lusty vortex
#

It's fucked

finite belfry
#

what is freaked

lusty vortex
#

Everything LOL

#

Bro it takes like 5 minutes for this thing to even boot up

#

Caused by: java.lang.UnsupportedOperationException: Custom generator is missing required method generateChunkData
at org.bukkit.generator.ChunkGenerator.generateChunkData(ChunkGenerator.java:117) ~[Spigot_Latest.jar:git-Spigot-e7dc2f5-ce66f69]
at org.bukkit.craftbukkit.v1_15_R1.generator.CustomChunkGenerator.buildBase(CustomChunkGenerator.java:137) ~[Spigot_Latest.jar:git-Spigot-e7dc2f5-ce66f69]

#

Disable that custom generator

finite belfry
#

@lusty vortex umm i found on google for 15 mins and still do not know where can i disable it...

frigid ember
#

how to disable the custom generator

#

how

#

man

finite belfry
#

help

#

@dusky herald help

tribal granite
#

so I am wondering, what is the most efficient vote plugin? I know there is voting plugin, but it seems to have some flaws efficiency wise. I also have discovered SuperBVote but haven't tried it out yet. Does anyone have any suggestions for a good vote plugin? Thanks.

finite belfry
#

dude help me first

tribal granite
#

@finite belfry with the timed rewards plugin are you trying to give them money for playing or items?

#

also what does the dynamic icon.jar do?

#

nvm that plugin is from 2014 and most likely doesnt work with your 1.15.2 server and it was bound to have an error after 6 years of mc updates.

#

banhammer has an error in the plugin name

#

legacy plugins is just a warning and can be ignored

#

dude i think you just have outdated plugins @finite belfry

#

and some stuff you did just doesn't make sense. like you have the pex addon but no pex?

finite belfry
#

..........ok

#

@tribal granite i deleted all old and not making sense plugins

#

but dont work

marble wagon
#

is there a beta/prerelease version of spigot for 1.16 available to the public?

final verge
#

no

tribal granite
#

@marble wagon you can run 1.16 but no plugins. you can use datapacks though. you can check out vanilla tweaks if your interested

marble wagon
#

when the 1.16 version comes out, can i just replace the vanila server.jar file in my server directory?

storm vessel
#

Does anyone know of a plugin that I can use to bind console commands to a book ingame? (So when a player clicks the book a command is run and they lose the book. Basically like a voucher)

vagrant widget
#

@marble wagon NuVotifier and GAlistener I think?

frigid ember
#

Did the recruitment forum section get deleted?

tribal granite
#

yes @marble wagon

fleet crane
#

?services

worldly heathBOT
frigid ember
#

Thanks

pale plaza
#

Who know any Good Combat Log Plugins

frigid ember
#

CoreProtect? It logs nearly everything

pale plaza
#

I just need For QWhen in combat if u leave u die

#

NVM

frigid ember
#

Oh, you can code taht yourself. Just use a player disconnect event

pale plaza
#

How

frigid ember
#

Just add a event listener. Im sure you will find everything on the Web 😄

fringe ermine
#

@tribal granite NuVotifier & VotingPlugin

frigid ember
celest garden
#

Hello, can you help me with one minecraft command?

#

I want to kill all phantoms under 4000/-4000 x and z coordinates

#

i made this but it isn't working

#

/execute run tp @e[type=minecraft:phantom,x=4000,z=4000,dx=0,dz=0] 0 -100 0

sick citrus
#

Hey guys. Save for Reflection and NMS, is there a way to get a list of all the currently registered, per-plugin command on the server, including the dynamically loaded ones ?

#

Currently plugin.getDescription().getCommands is the only available option, and it only shows the commands in plugin.yml, I reckon

fleet crane
#

thats the only API supported way of registering commands

raw nacelle
#

@celest garden why not /kill?

#

or /minecraft:kill, not sure how /execute handles plugin commands

hoary parcel
#

the CommandDispatcher once had a method to write to command tree to file

#

does somebody know where that went?

frigid ember
#

Can anyone help me with bungeecord the bungeecord groups arent working

#

can someone help

hoary parcel
#

ha, got it

#

Files.write((new GsonBuilder()).setPrettyPrinting().create().toJson(ArgumentRegistry.a(dispatcher, dispatcher.getRoot())), fileIn, StandardCharsets.UTF_8);

#

wonderful, only 15k lines

tiny dagger
#

Json looks so good but it's so ugly to write in

hoary parcel
#

well, you are not supposed to write it

wicked sage
#

well the isuse is that you're doing it all in a single line of code

#

you're suppoed to keep a single gson object

#

and use methods to make it cleaner

hoary parcel
#

this is debug code, i dont give a single shit how it looks, lol

wicked sage
#

not just keeping making gson objects

#

yeah, i figured that

#

just telling freestyler

hoary parcel
#

its invoked exactly once

#

he was speaking about the actual json file, not the code tho

wicked sage
#

hmm, i dont personally think it's ugly

hoary parcel
#

wonderful

wicked sage
#

in which format will it look cleaner?

#

you're 800 lines in, which no sql storage format wont make it look like that xD

hoary parcel
#

why are you arguing? lol

#

am just trying to visualizing the servers command tree for debug

wicked sage
#

im not arguing :<

#

im just wondering

silk bane
#

btw it's safe to access blockstate asynchronously right?

wicked sage
#

cuz u think that jsons ugly

#

what do you think is better

hoary parcel
#

where did I say that json is ugly?

#

I said that json isnt meant to be edited

naive goblet
#

@silk bane should be I think

silk bane
#

cool

hoary parcel
#

yes, in spigot a blockstate is just a copy

wicked sage
#

ah, i misread. i thought you meant that json is ugly. that's what i was referring to

hoary parcel
#

creation of block states (think chests) can be heavy

silk bane
#

argh

#

i see

#

wait

#

does blockstate really copy the whole chest inventory?

#

it doesn't seem to

dusty topaz
#

use block.getState() to get a snapshot state of a block which will not be modified.

#

from javadoc

#

should do

hoary parcel
#

see CraftBlockEntityState#createSnapshot

#

its saving the TE to nbt and creating a new TE from that nbt

silk bane
#

ah craftblockentitystate also implements blockstate

#

is blockdata cheap to create at least?

#

i don't think blockdata contains the contents of a chest

dusty topaz
#

@hoary parcel isnt that what getState does anyway

silk bane
#

yeah doesn't looks like craftchest stores inventory data

hoary parcel
#

which craft chest? 😂

#

there are 3 vlasses names like that iirc

#

block data, material data and the state

silk bane
#

the one that extends blockdata

#

since creating a blockstate every tick is not happening

#

gonna try blockdata instead

celest garden
#

@raw nacelle no matter if i use tp or kill

#

but i have a problem with set distance

raw nacelle
#

what happens

#

also the chunks will need to be loaded for it to work

celest garden
#

i want to kill all phantoms from x:-4000 z:4000 corner to x:4000 z:-4000 corner

raw nacelle
#

yes

celest garden
#

i want to enable on my server phantoms above 4000 border

#

disable it under 4000

#

but i don't know how to do this

silk bane
#

listen for mob spawn event

#

check coords

dusty topaz
#

wait, @silk bane i swear i know you from somewhere

silk bane
#

nope

dusty topaz
#

i think i do 😛

#

i won't say it though if you don't want me to haha

subtle blade
#

Definitely not PES_Think He's a nobody

#

Never seen him before in my life

raw nacelle
#

is that mr aac himself

celest garden
#

So what should i do?

dusty topaz
#

listen to mob spawn event

#

cancel it if coords are not what you want

raw nacelle
#

make a world guard region

#

disable phantom mob spawning

celest garden
#

is it possible by worldguard?

stable egret
#

hey

#

i need an help

celest garden
#

Thanks, worldguard works

pale plaza
#

Who know Any custom potions Plugin 1,8

#

1.8

spice hedge
#

is #help-archived like a place where I can get help with plugins and skripts? 🙂

hoary parcel
#

yes

pale plaza
#

Who know Any custom potions Plugin For 1.8 Plx

#

Plz

spice hedge
#

Nice

subtle blade
#

Fun fact! Discord has a chat history so we can see your messages forever after they've been sent! You don't actually have to repeat yourself 🙂

pale plaza
#

Sorry

vernal spruce
#

It's funny,it took me 7 seconds to type it in google

subtle blade
#

Was about the say the same ;P Google goes much further a distance than we will

#

"potion plugin Spigot" yields tons of results

pale plaza
#

TAHNKS

#

Thanks

#

@vernal spruce It wont Let Me Make Potions Tho

vernal spruce
#

It looks like it's config based so you have to edit there

pale plaza
#

GOD DAM

subtle blade
#

Dude, you wanted custom potions lol. Do you want these custom potions to be made for you automatically?

#

You have to put some sort of effort into making something custom

pale plaza
#

Yeh What i can do ingame

vernal spruce
#

hmm talking about ingame,i need to start making some sort of inventory-config edit system

spice hedge
#

Hey so I I'm useing buycraft lates version for minecraft 1.8.8 and skript dev25 for 1.8.8
But my server can't run a command in buycraft with skript, I dont understand because many serveres use skript to buycraft.
My skript is custom it made lik this:
Console execute this command in buy "Rank {name} Premium" and it the server gets the command but nothing happens?
https://www.spigotmc.org/threads/buycraft-and-skript-notworking-1-8-8.431254/

vernal spruce
#

sadly not alot of us are using skript... youl have to wait for a answer on the topic

raw nacelle
#

*thankfully

dusky herald
#

Then Console doesnt have access to the command

spice hedge
#

why?

#

and how?

vernal spruce
#

yeah it depends how you look at it @raw nacelle

dusky herald
#

Because, not all commands can be used by console

#

I don't know specifically why it's not working for you.

spice hedge
#

Thx ! I will look into it

dusky herald
#

or, it could be a different reason why it's not working

#

Not really enough information provided.

spice hedge
#

What does u need? the skript?

dusky herald
#

Maybe it's not working because you have it set as

#

if player has permission C

#

Console isnt a player

#

so it might be stopping there

spice hedge
#

oof just 1 sec

dusky herald
#

Maybe add a condition for if it's console as well?

spice hedge
#

Add what? 🙂

dusky herald
#

or remove if player has permission "C"

#

and see if it works without that condition first

spice hedge
#

I will try to remove permission of player
but here is my skript

#

ooof lets go it workt

dusky herald
#

yes, so add another condition for the console then

#

Console doesnt need permissions, so that can be it's own thing

spice hedge
#

Can u make the condition because i have no idea what u'r talking about. 😅

dusky herald
#

command sender is console

#

or

#

command sender is the console

#

or command sender is console w/e works

#

I'm not too familiar with Skript, I just see an example in the docs

spice hedge
#

Right now it works becase i removed the player's permssions but if the permissions it removed the console will just add player to C, so if the player are in B, will the player set to C-premium thats a big problem.

    executable by: console
    trigger:
        if arg-2 is "Premium":
            execute console command "manuadd %arg-1% C-Premium"
            loop all players:
                send "&a&lBroadcast&7 -&r &e%arg-1% &7har købt &5&lPREMIUM&7. &7Tusind tak for din støtte." to loop-player
                send "&a&lBroadcast&7 -&r &7IMENS DER VAR OP TIL &e20%% &a&lRABAT&7! i &a/BUY" to loop-player
            stop
dusky herald
#

You could always revert the command back to what it was

#

and make it only for players

#

and make a seperate command that does the same thing, but dedicated for console

spice hedge
#

So i found out that the console can't understand if player has permission
so i made this:
if {Rank.%uuid of player%} is not set:
and that work so i think if i use this the problem will be gone? :)
if {Rank.%uuid of player%} is "C":

dusky herald
#

It might work, just test it out

spice hedge
#

but bro! Thx for the help! !

dusky herald
#

yea i think you can figure it out from here, lol.

spice hedge
#

Thx xd

stable egret
#

DeathStrike_x lost connection: Internal Exception: io.netty.handler.codec.DecoderException: java.lang.NumberFormatException: For input string: "ickaxe"

#

anyone can explain why this error?

#

players getting kicked mid game

frigid ember
#

I know this is a really common issue and I can't seem to figure it out, went trough a thousand threads already... level-name = world resetting, can't get rid of world world. Please help someone 🙏 dm me please

dusky herald
#

@stable egret Because you're parsing a string that isn't a number to an int.

frigid ember
#

who of u knows how to make your own maven dependency and for free

dusky herald
#

It has to be a number.

frigid ember
#

@dusky herald ;/

#

who of u knows how to make your own maven dependency and for free

stable egret
#

any idea which plugin causing this?

dusky herald
#

It should tell you in the error.

#

a thorough error log will help pinpoint it

frigid ember
#

cos im making an API, it has a couple of maven dependencies itself, i don't want users adding its depencies, so they should just add mine and maven adds my dependencies

silk bane
#

one of your plugins might also be messing with packets

frigid ember
#

how do i make my own maven dependency

stable egret
#

ok thanks

frigid ember
#

for public use

#

bruh

boreal tiger
#

does setNoAI clear the entity's goals?

subtle blade
#

To my knowledge, you have to host your own repository. Free ones like Maven Central or the likes won't host yours because it works with Bukkit which is not hosted on central

silk bane
#

@boreal tiger as far as I know it just stops the entity from ticking

frigid ember
#

Ok

#

how do i host mine

silk bane
#

so i guess its pathfinder state would be frozen

boreal tiger
#

mhm, right, thank you 👌

#

reflection time 😂

silk bane
#

yay

dusky herald
#

AI would include everything the mob does, movement and all that is included with AI.

silk bane
#

by the way, if you just want to disable the pathfinder, check out Mob#setAware which i may or may not have PRd

subtle blade
#

You might also be able to find someone nice enough to let you use their repository, though that depends ¯_(ツ)_/¯

frigid ember
#

or u can host it on GitHub?

subtle blade
#

I actually think Spigot used to let people use it

#

Not sure

dusty topaz
frigid ember
#

github?

subtle blade
#

jitpack's restrictions might be less limiting, yea

frigid ember
#

is jetpack free

dusty topaz
#

yep

frigid ember
#

ooh

#

thanks

chrome lark
#

jitpack, bleh

#

I mean, better than nothing, but, bleh

subtle blade
#

Can you confirm central being picky with plugins?

#

I remember hearing that somewhere

chrome lark
#

never published there, but, basically, they prefer all your dependencies to be on central

subtle blade
#

That's what I'd thought

boreal tiger
#

@silk bane I found it, but I was dealing with cows so I cant use it. thank you though 👌

silk bane
#

but cows are mobs

boreal tiger
#

wait are they 😮

silk bane
#

well they extend mob

boreal tiger
#

ah yeah Cow does extend but EntityCow doesnt :/

silk bane
#

the heck is entitycow

#

is that NMS?

subtle blade
#

Yes

boreal tiger
#

yeah

silk bane
#

good news

boreal tiger
#

😂

silk bane
#

#getBukkitEntity

subtle blade
#

Though it should have pathfinders, so 🤔

silk bane
#

will get you a cow

#

but if you have the NMS thing already, why not just go straight in

subtle blade
#

Are you just trying to set NoAI to true? ;P

boreal tiger
#

nop xD I wanted to change the goals

#

I guess I'll use this opportunity to learn more about reflection

subtle blade
#

Yea, that should be doable. Cows have pathfinder goals

silk bane
#

MethodHandle time

subtle blade
#

It's part of EntityInsentient I think

#

Unless that was changed in recent versions. Been a while since I've touched that

boreal tiger
#

yeah, it does have the pathfinding goals 👌

frail charm
#

can i get some help with a plugin ? or is it just general spigot disc

boreal tiger
#

you can get help yeah 👍

frigid ember
#

anyone a good at enjin websites

frail charm
#

oh nice ty, so im trying EssentialsX and GroupManager i havent worked on these for a few years but now when i add permissions i cant use the permissions for some reason

subtle blade
#

We generally advise against GM because of how old it is

#

LuckPerms is the modern go-to

frail charm
#

oh aight thanks i actually thought of that gm might be outdated thanks bud

boreal tiger
#

What's the difference between fields b and c of the PathfinderGoalSelector?

#

field b seems to be used to remove path finder goals

subtle blade
#

I think it's pathfinder goals vs target goals or something like that

silk bane
#

and then pretend you didn't use it

subtle blade
#

;P

boreal tiger
#

ahahha thanks konsolas

subtle blade
#

No you're fine to use it. We just can't use those mappings to name them if the occasion arises

boreal tiger
#

right

vernal spruce
#

mhmm whats the main difference between paper and spigot?

silk bane
#

paper has more features and is faster, but might be less stable and/or might not replicate vanilla behaviour perfectly

vernal spruce
#

yeah friend of mine suddenly hit a brick after updating to a newer paper..

silk bane
#

you should tell them about it if that's the case

vernal spruce
#

with a certian plugin,armored elytra..

silk bane
vernal spruce
#

might be the plugin itself at fault

#

rather than paper..

#

jeez dude.. worldguard its killing my custom entities again

#

is there an alternative to worldguard anyone knows by any chance?

wanton delta
#

Paper has their own discord

#

Spigot has their own discord

#

It’s generally looked down upon to talk s abt paper here

frigid ember
#

Anyone do enjin designs? Msg me for more info"

wanton delta
#

Server hiring forum

dusky herald
#

I'm just guessing, but I would say that this is like the last place you'd find an Enjin designer

frigid ember
#

??

dusky herald
#

lol

frigid ember
#

Where can i find one i have been looking for ever

dusky herald
#

prolly on Enjin

frigid ember
#

where

#

link?

#

pls

dusky herald
frigid ember
#

but where would the designers be

dusky herald
#

idk, google if there's an Enjin discord?

frigid ember
#

there isnt one

#

tryed it already

wanton delta
#

There’s also a server hiring forum

#

On spigot

#

This is probably not a good place

dusky herald
#

^

#

That's the first time I've even seen anyone bring up Enjin since I've been here.

subtle blade
#

Everywhere is the last place you'll find an Enjin designer

frigid ember
#

xd

#

What does everyone use then

wanton delta
#

Xenforo

dusky herald
#

Everyone? Everyone uses different things.

#

Some people use forums like XenForo, some people make their own websites

wanton delta
#

Xenforo is the most popular

dusky herald
#

some people use Enjin

#

¯_(ツ)_/¯

subtle blade
#

If you insist on using Enjin (which is still a valid option), yes, we have a services forum where you could likely hire someone to help

#

?services

worldly heathBOT
subtle blade
#

It's not that it's a bad website, you just don't hear much about it anymore is all

wanton delta
#

I personally think it’s a bit outdated

dusky herald
#

is XenForo worth buying?

wanton delta
#

Totally

dusky herald
#

I have a vBulletin key

#

vBulletin or XenForo, go

subtle blade
#

If your server isn't that large I don't think it's worth it

wanton delta
#

^^^

frigid ember
#

who knows how logni t takes for jetpack.io to see your release

#

choco?

#

For a small server what is worth buying

#

i am using jetpack it is working wonderfully, i released one release, but the second isn't shown

#

thanks choco

dusky herald
#

For a small server? Enjin

subtle blade
#

Forums may not get used as much as you think. You need a community with which you can interact with outside of the server

wanton delta
#

^

subtle blade
#

I don't know, Retrooper. I'm not entirely familiar with jitpack

wanton delta
#

Forums can be pretty dead for a while

dusky herald
#

I know, forums are starting to get dated.

frigid ember
#

What do mineplex use

#

is anyone?

wanton delta
#

Honestly I recommend waiting to have forums until you have a player base

dusky herald
#

cough discord is killing forums

subtle blade
#

They still use Enjin to my knowledge

wanton delta
#

Nope

#

They switched to Xenforo

subtle blade
#

Did they switch?

wanton delta
#

Yea, finally

subtle blade
#

Huh. They were partnered for a while

#

Maybe when they partnered with Minecraft they figured "Ah screw it"

wanton delta
#

Xenforo is just way better for bigger communities

frigid ember
#

How much is it

dusky herald
#

$160

frigid ember
#

perm?

#

or

dusky herald
#

a year

frigid ember
#

GEEZ

#

lol

wanton delta
#

Nope

#

It’s permanent

dusky herald
#

Ah nvm I read it

#

its 12 months of support

wanton delta
#

There’s a support fee you can pay every year

dusky herald
#
  • updates
#

Either way, $160 is the base price.

subtle blade
#

Even still, it's why I don't think it's all too worth it for smaller servers. It's a big investment when you can invest instead in hardware or plugins

wanton delta
#

Like I have a Xenforo version from like 2014 lol

#

Yes 100x what Choco said

#

Forums will be more successful if you have a player base

dusky herald
#

Unless you got money to splurge on

subtle blade
#

yea then spend it on everything and anything

wanton delta
#

If players see dead forums you are less likely to ever get them used

frigid ember
#

160 perm?

wanton delta
#

It’s all about the psyche

#

Xenforo is also host yourself btw

dusky herald
#

If you dont know anything about web hosting

#

or any of that

wanton delta
#

Idk if they offer plans to host for you

dusky herald
#

then dont even bother

#

Lol

wanton delta
#

They probably do but with more $$$$

frigid ember
#

you need a website

dusky herald
#

Well yeah

#

It's a content management system and forum

wanton delta
#

You need Linux experience for any of this

dusky herald
#

You'd probably also have to pay for any kind of custom designs you want on your website

frigid ember
#

so for a small server what is the best host and what is the best host for a big server (not self host)

subtle blade
#

Honestly, a website at all isn't necessary for smaller servers. PES_SadShrug

dusky herald
#

Enjin?

#

Lol.

wanton delta
#

Small server no host at all

subtle blade
#

It should be your last priority

wanton delta
#

It’s a bad investment

#

Only think about Buycraft or whatever

frigid ember
#

but how can u sell ranks and stuff then

dusky herald
#

Just stick with Enjin.

frigid ember
#

and give accouterments

wanton delta
#

Tebex

#

Tebex is the primary thing ppl use for shops

#

For a small server I recommend a discord and tebex, both of which are free

#

Once your server has an active playerbase of 50 or so I would go down the route of forums

dusky herald
#

Hell, 50 isnt even enough

#

Lol

wanton delta
#

Well that’s when you start thinking about it lo

#

And yes I agree

dusky herald
#

Honestly, I would just develop my own website.

#

But that's just me.

wanton delta
#

:ssss

dusky herald
#

I would at least develop my own website with my own features

#

for things like reporting players, etc

fringe ermine
#

Craftingstore is good for donations

dusky herald
#

and then later when it grew just buy XenForo or something

wraith dew
#

this video is sponsored by squarespace...

wanton delta
#

Yea you could have a very basic website for reporting

fringe ermine
#

Set-up a discord channel for reporting

wanton delta
#

Doesn’t sound organized tbh

fringe ermine
#

Works like a charm and you have a nice announcement system

dusky herald
#

That's what I did in 2011. I made a website, just for registering, running donations, and reporting players, lol.

#

and posting news

wraith dew
#

is maven central down?

#

because i cant download lwjgl

#

nvm

dusky herald
#

o sick

#

my old domain name is available lel

#

bought it

#

just cause i want it

#

Maybe I'll make a factions server 🤔

#

and then build a player base

#

and then I can launch my actual project I care about

sour dock
#

this is great for small servers

#

open source forum software with minecraft integration, what more could you want

frigid ember
#

So if im starting a mini games server, Soon with a small budget and want a website alot like mineplexs (Support, Shop and staff list and forums) where should i host

#

I am confused xd

#

Is there any way to save gamerules like no fall in a map download. I want to publish my map but I want things like gamerules to save is there anyway I can do this. Ping or dm me

sour dock
#

pretty sure gamerules are stored in the world data already

frigid ember
#

So if im starting a mini games server, Soon with a small budget and want a website alot like mineplexs (Support, Shop and staff list and forums) where should i host anyone got advice
I am confused xd

dusky herald
#

On a Dedicated Server

sour dock
#

well personally I'd recommend namelessmc

#

or go with other recommendations people made above

frigid ember
#

How does nameless work

dusky herald
#

It's a content management system.

sour dock
#

it is CMS software you host yourself like xenforo, wordpress, ghost, etc. but targeted towards minecraft servers with in-game integration

dusky herald
#

^

#

Specifically made for Minecraft

#

I've personally never heard of it until you linked it though.

frigid ember
#

How do i host it

dusky herald
#

You get a web host

#

and download the files and upload them to the web host

#

So you would have to purchase a webhost, and a domain name if you so choose.

sour dock
dusky herald
#

or, if you have a dedicated server you could just run a web server off your dedicated server as well

frigid ember
#

ok

#

How easy is it to use

wicked sage
#

u know its doomed when your comp compiles java code in 95 seconds

frigid ember
#

and how do i make it

tiny dagger
#

tf are you compiling there?

sour dock
#

set up a webserver and download these files. If you don't know how to, look up a tutorial or use shared webhosting

tiny dagger
#

the entire maven directory or something?

wicked sage
#

lol

dusky herald
#

I heard Maven is having issues possibly

wicked sage
#

its like a 250 class project

dusky herald
#

That could have something to do with it

wicked sage
#

i use gradle

sour dock
#

afaik gradle uses maven repositories

wicked sage
#

yep

frigid ember
#

@sour dock is there a way to set it up then upload files into a host?

wicked sage
#

its just more etooling over maven

sour dock
#

@frigid ember yes, that is how you set it up?

dusky herald
#

You upload the files to the host

#

and follow the installation instructions

#

lol

frigid ember
#

Would you be able to discord call me and talk me through it?

#

or u to busy rn

dusky herald
#

Look up a tutorial on how to install it?

sour dock
#

no, you should be willing to do research yourself

#

if you aren't then hosting a website is not for you

frigid ember
#

ok

dusky herald
#

This is all like, basic level stuff. Just read a tutorial, and you gotta be able to figure it out

boreal tiger
#

So I created a custom NMS entity, how do I register it now?
I found different resources with different ways of registering the entities so I guess there is no "correct way" of doing it?

dusky herald
#

Not trying to come off as a dick, but it's really easy.

#

It's too time consuming to walk you through the process.

sour dock
#

they have a support discord but please keep in mind that everyone is doing this in their free time and they're not going to walk you through installing it (hopefully, for their sake)

dusky herald
#

this isnt even really the place to be asking for support to install CMS, etc

dusty topaz
#

Should I be creating an instance of the minigame every time it starts instead?

#

Because having once instance is going to make it hard to run multiple at once, so I tried using events which works but feels hacky

#

(ie passing players to start and end of minigame and doing stuff to the players in those events such as)

#
    @EventHandler
    public void onMinigameStart(MinigameStartEvent event) {
        ChatUtil.broadcast(event.getMinigame().getDescription(), event.getPlayers());
    }
#

obviously needs some adjustments to pass through scores and stuff but how would you guys suggest doing it because the design feels bad

dense ridge
#

Hey does anyone know how to make skulls render more quickly in guis?

boreal tiger
#

It takes sometime because it has to query mojang's api iirc

dense ridge
#

Any way to cache them?

boreal tiger
lean zinc
#

hey guys can i asl why this is not woking

#
 on chat:
    if player has permission "c.op":
        set the chat format to "&f[&b&kOP&f] &f[&c%player%&f]&f %message%"
    else if player has permission "tier.3":
        set the chat format to "&f[&eTier I&f] &f[&7%player%&f]&f %message%"
    else:
        set the chat format to "&7[&fTier I&7] &f[&7%player%&f]&f %message%"    
#

the indent is correct its just discord shrinked it

dusty topaz
#

@dense ridge couldn't you just store the itemstack?

lean zinc
#

hello can someone help?

dusty topaz
#

i don't know the answer so i politely ignored

lean zinc
#

k

sour dock
#

@dusty topaz this looks suspiciously similar to my minigames plugin 🤔

#

I store 1 instance for each game

dusty topaz
#

well i can confirm that it is not

#

and i just made it off of the top of my head o.o

sour dock
#

yeah not saying you stole it or anything lol

#

this is the abstract game class

subtle blade
#

Well, for one, the timer annotation is a useless middleman. You'd accomplish the same thing just holding an int field

boreal tiger
#

choco I finished creating my nms entity but I'm not sure how to register it. It seems to have changed in 1.15 again?

subtle blade
#

Haven't touched registry overrides since like, 1.12. My knowledge is far too out of date for that

boreal tiger
#

right np

dusty topaz
#

@subtle blade yeah thats true

#

but my idea was actually going to be to add it to ones with a timer

#

as others may just have goal requirements to end

#

would that be a valid use?

lean zinc
#

who is good at script i will send toe picks

#

im just stuck at this one thing

#

dm me

hot fable
#

To read a yaml how is it? It is that it returns null with this:

        File file = new File(plugin.getDataFolder(), "messages.yml");
        YamlConfiguration messages = YamlConfiguration.loadConfiguration(file);
lean zinc
#

can some one please help

#

why is my thing not wkring

final verge
#

If you want skript help you’re better off on forums tbh

lean zinc
#
on chat:
    if player has permisson "c.op":
        set the chat format to "&f[&b&kOP&f] &f[&c%player%&f]&f %message%"
    else:
        if player has permisson "tier.3":
            set the chat format to "&f[&eTier I&f] &f[&7%player%&f]&f %message%"
    else: 
        if player has permisson "tier.1":
            set the chat format to "&7[&fTier I&7] &f[&7%player%&f]&f %message%"
#

kk thanks

final verge
#

@hot fable have you made sure the file exists? 😉

wraith dew
#

@hot fable file not found i think

fleet burrow
#

Why can't you run bukkit related stuff asynchronously?

wraith dew
#

there is a chance 2 bukkit methods could run at the same time which causes issues

subtle blade
#

Not even that. It's more so the fact that Minecraft wasn't designed to be accessed (mostly modified) concurrently

#

You could have two threads. One trying to set the block the other trying to fetch it, you're going to end up with some data racing

wanton delta
#

You’re doing something wrong if you need to run the API async

fleet burrow
#

I don't, was just wondering.
Thanks 🙂

silk bane
#

can we tick worlds in parallel tho

chrome lark
#

as-is, no

#

they might have cleaned some stuff up, but there is a lot of state in play

silk bane
#

😦

wraith dew
pale plaza
#

Can Someone Send Me a mob stacker plugin

#

for when there is 8 pigs they go in to 1 pig ???????

dusty topaz
#
        taskId = new BukkitRunnable() {
            @Override
            public void run() {
                for (Player player : players) {
                    if (player != null) {
                        double blocksWalked = Math.floor(player.getStatistic(Statistic.WALK_ONE_CM));
                        player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(ChatUtil.color("&6Blocks walked: &e") + blocksWalked));
                    }
                }
            }
        }.runTaskTimer(instance,20L,20L).getTaskId();

How would you set the duration of the action bar? Right now it doesn't update every second

wraith dew
#

you need to loop it

#

put it in a while loop

#

while(true){ 'code' Thread.sleep(1000)}

dusty topaz
#

what o.o

tiny dagger
#

wtf

dusty topaz
#

sleep the main thread 👀

wraith dew
#

isnt it a separate thread?

dusty topaz
#

I want to set the duration of the action bar, not freeze the server

wraith dew
#

idk how bukkit runnable works

dusty topaz
#

it's running the task every 20 ticks

wraith dew
#

oh ok

dusty topaz
#

but it seems to get frozen

#

for more than a couple of seconds

pale plaza
#

Who know any Mob Stacker

wanton delta
#

Are you sure you want to track the CM statistic?

dusty topaz
#

I just realised the issue is statistic

#

It doesn't updated often

wanton delta
#

Yea

dusty topaz
#

I was reading up on how you should track blocks walked

#

And there was a lot of shouting about use the statistic

wanton delta
#

Yes, that’s why a lot of plugins you see will behave the same when it comes to that sort of thing

#

But my intuition would say you should keep track of meters not centimeters O.o

zenith siren
#

This is a BungeeCord plugin question!
I'm trying to send a message to all staff members when a spigot server goes offline or online. I'm doing that by pinging every server every 5 seconds and then seeing if the result if different than last time, if so then, send a message. If the result of the current ping and last is the same then nothing will happen. Right now nothing happens. I get no messages at all. When I ad a few debug messages they sometimes do and sometimes don't work. How reliable is the ServerInfo#ping method?

This code is in the onEnable method
https://pastebin.com/nW4e1Vj9

dusty topaz
#

@wanton delta I am doing it that way

#

sort of

#

I was planning to anyway

wanton delta
#

WALK_ONE_CM sounds like centimeters

dusty topaz
#

I need to track blocks walked by players for a minute

silk bane
subtle blade
dusty topaz
#

So I need to track the blocks walked in the player move event?

wanton delta
#

I don’t really recommend that

#

You don’t really know how many blocks a player moves per event

fleet burrow
#

how can I get the NMS world object?

#

cast it i mean

wanton delta
#

You can get the statistic at 0 minutes then get the statistic at 1 minute

subtle blade
#

Cast to CraftWorld, getHandle()

wanton delta
#

((CraftWorld) world).getHandle()?

subtle blade
#

Why do you need it?

dusty topaz
#

That wont work @wanton delta

wanton delta
#

how come?

fleet burrow
#

Just checking stuff out

dusty topaz
#

If the statistic hasn't updated when it's checked after

#

Then it won't be accurcate

#
  • I also want to display it to the player in the action bar
wanton delta
#

Now the only way I can think of is using calculus lol

zenith siren
#

Lol

wanton delta
#

Keeping track of the players velocity and running an integral

silk bane
#

-_-

wanton delta
#

And I don’t know how to get a velocity, but I think there is a way

dusty topaz
#

entity#getVelocity

silk bane
#

event.getTo().clone().subtract(event.getFrom()).length()

zenith siren
#

Wait why not just checking the statistic?

wanton delta
#

Statistic doesn’t update frequently enough

zenith siren
#

That specific statistic? Because I use Statistic.PLAY_ONE_TICK in a plugin and it updates every tick XD

subtle blade
#

AFAIK getTo() clones already, konsolas

#

At least it should

silk bane
#

it does not

#

or at least it didn't use to

dusty topaz
#

It doesnt

#

ye

#
    @Nullable
    public Location getTo() {
        return this.to;
    }
subtle blade
#

wait it doesn't lolwut

zenith siren
#

O_o

subtle blade
#

That's sloppy

dusty topaz
#

maybe it does in paper

wanton delta
#

You could use a Reiman sum every tick

subtle blade
#

It should clone

zenith siren
#

XD

dusty topaz
#

hehe

zenith siren
#

True

dusty topaz
#

thanks for the help

silk bane
#

unfortunately its behaviour can't be changed now

wanton delta
#

Every tick get the velocity

subtle blade
#

Well... it can lol.

wanton delta
#

And add all the velocities together

subtle blade
#

Plugins just wouldn't be happy about it

zenith siren
#

Lol

silk bane
#

which is why it can't be changed

pearl pawn
#
    public void onRun(PlayerMoveEvent event) {
        Player player = event.getPlayer();
        World world = player.getWorld();
        Location spawnLoc = player.getLocation().add(0,2,0);
        String tipo = plugin.getConfig().getString("mob");
        if(player.isSprinting()) {
            Entity mob = world.spawnEntity(spawnLoc, EntityType.fromName(tipo));

        }
    }```
#

im trying to get from config but "fromname" is deprecated can it still be used?

radiant pollen
#

The easiest way to keep track of player walking is to run a timer that keeps track of their current position. The next time the timer runs, compare the current position with the last position. If the distance isn't too far (teleporting) then increment the distance walked

subtle blade
#

Just not sure why they thought it shouldn't be cloned, especially when there's a getTo() that validates it

dusty topaz
#
        Location to = event.getTo().clone();
        Location from = event.getFrom().clone();
        to.setY(from.getY());
        double distance = to.subtract(from).length();
#

Does this look fine?

subtle blade
#

You can skip that validation by modifying the mutable location

wanton delta
#

If you are gonna use playerMoveEvent, be sure to check if they aren’t just moving their head

silk bane
#

ask the bukkit developer who wrote it who has probably long since left the project 😦

wanton delta
#

It will optimize it a bit

zenith siren
#

Is this question solved?

#

Will I interrupt something if I post my question?

subtle blade
#

Dinnerbone

radiant pollen
#

No

silk bane
#

lol

#

honestly location should have been immutable

subtle blade
#

It should have been an interface

silk bane
#

like half of bukkit's utility classes

#

no, plugins need to be able to construct locations

radiant pollen
#

^

zenith siren
#

This is a BungeeCord plugin question!
I'm trying to send a message to all staff members when a spigot server goes offline or online. I'm doing that by pinging every server every 5 seconds and then seeing if the result if different than last time, if so then, send a message. If the result of the current ping and last is the same then nothing will happen. Right now nothing happens. I get no messages at all. When I add a few debug messages they sometimes do and sometimes don't work. How reliable is the ServerInfo#ping method?

This code is in the onEnable method
https://pastebin.com/nW4e1Vj9

subtle blade
#

World.getBlockAt(x, y, z).getLocation()

fleet burrow
#

woah

#

bold

#

and underline

subtle blade
#

Or asLocation(), whatever

#

If you want just coordinates, Vector

pearl pawn
#
    public void onRun(PlayerMoveEvent event) {
        Player player = event.getPlayer();
        World world = player.getWorld();
        Location spawnLoc = player.getLocation().add(0,2,0);
        String tipo = plugin.getConfig().getString("mob");
        if(player.isSprinting()) {
            Entity mob = world.spawnEntity(spawnLoc, EntityType.fromName(tipo));

        }
    }```

so i made the config but fromname is deprecated, what is the new form? and if there isn't a new form can i still use the deprecated form?
silk bane
#

and what if i want fractional values in my location

subtle blade
#

.add() & .subtract()

silk bane
#

that's a bit horrible

subtle blade
#

Could even have World#getLocationExact(double, double, double)

silk bane
#

so to construct a location i have to make the server load the chunk and a block at this location in the world

#

there's nothing about Location which means that its implementation needs to be hidden

pearl pawn
#

Could even have World#getLocationExact(double, double, double)
@subtle blade are you talking to me ;_;?

subtle blade
#

No lol

radiant pollen
#

@pearl pawn No, they're ignoring questions lol

pearl pawn
#

;_;

dusty topaz
#

yeah choco, answer the questions that you are obligated to answer

zenith siren
#

Lol

dusty topaz
#

why should it be an interface @subtle blade

zenith siren
#

Scroll back

silk bane
#

my name's not green so i can just say whatever

boreal tiger
#

lmao

dusty topaz
#

he's not even obligated to

pearl pawn
#

@pearl pawn No, they're ignoring questions lol
@radiant pollen just asked if i could use a deprecated thing (sorry im still learning java)

subtle blade
#

get(id of the entity)

pearl pawn
radiant pollen
#

@pearl pawn Yes, deprecated code still works. It's best not to use it in-case the Spigot team finally removes it but... if you're just making a custom plugin for your own server it doesn't matter much.

subtle blade
#

Yes lol. That one was for you

radiant pollen
#

Choco he's getting an entitytype from a string from config.

subtle blade
#

So?

silk bane
#

registry will give you the minecraft name

#

like the one you use in /summon

subtle blade
#

That's what that will do for you

silk bane
#

whereas the enum has PIG_ZOMBIE and other shit