#help-archived

1 messages · Page 224 of 1

maiden oyster
#

those somewone now a shop plugin whit a good interface

#

pls

balmy sentinel
#

@frigid ember if you want the player object you need to check if they’re online first.

frigid ember
#

how can i recursive get keys in bungeecord?

lunar widget
#

how can I do a task every x seconds?

frigid ember
#

bukkit scheduler

balmy sentinel
#

run a task every 20 ticks.

#

20 ticks = 1 second

pseudo crown
#

Hessky this is an official tutorial: https://bukkit.gamepedia.com/Scheduler_Programming

BukkitWiki

This tutorial will guide you in using the scheduler provided by bukkit. It will allow you to defer the execution of code to a later time. This is not the same as registering a Listener, a block of code which is executed in response to an event in the game. Blocks of code may a...

frigid ember
#

how can i recursive get keys in bungeecord?

lunar widget
#

thanks

maiden oyster
#

those somewone now a shop plugin whit a good interface Pls tag me

subtle blade
#

keys for what

frigid ember
#

What do you mean by "Bukkit#selectEntities()"? You mean an instance of Bukkit? How do I get that?

#

configuration keys

#

yaml

#

The bungeecord configuration api doesn't provide a depth option

#

only the root keys

jagged torrent
#

@frigid ember it's a static method that pretty much just forwards it to Server#selectEntities(CommandSender, String)

#

just iterate over all keys and get the underlying value?

frigid ember
#

yes

jagged torrent
#

then you can check if it's a section and repeat the process

frigid ember
#

but what if the underlying keys have other underlying keys?

subtle blade
#

then they're maps

jagged torrent
#

recursion

subtle blade
#

get and repeat the process

frigid ember
#

hm

#

Bukkit.selectEntities() isnt showing up. I'm writing for a 1.8.8 server so maybe that's why?

#

i will try

subtle blade
#

yes that would be why. you're 5 years out of date

#

new features get added in newer versions

molten acorn
#

how would i prevent players from pressing f on an item while they are in an inventory (i.e. moving it into their offhand with the new 1.16 hotkey). Couldn't find new events and cancelling InventoryClickEvent doesn't seem to work

subtle blade
#

probably the same event called for putting items in the off hand. I forget its name

molten acorn
#

that isn't working either

subtle blade
#

in fact, docs even say

Called when a player swap items between main hand and off hand** using the hotkey**.

mellow wave
#

that isn't working either
@molten acorn Show us your code

molten acorn
#

yeah that only works when you press it when you are not in the inventory and it swaps the item but since 1.16 you can press it on an item within the inventory

#

where should i put the code?

mellow wave
#

?paste

worldly heathBOT
pseudo crown
#

ive just had a thought, probably shit, but you can see if the slot the item moved to was in the shield thing (by listening to inventorymoveitemevent) and if it is then just cancel. but then people can drag the item into the shield thing, which isn't pressing f 😦

#

wait na not a good idea

subtle blade
#

@molten acorn it's an InventoryClickEvent

mellow wave
#

InventoryMoveItemEvent is for hoppers tho :/

molten acorn
#

ok maybe it's just a ghost item because i cancel that event, i'll try updating the inventory after cancelling

subtle blade
#

more than likely, yeah. a call to player.updateInventory() should resolve that

frigid ember
#

@subtle blade is there a reason why WorldSaveEvent isn't cancelable?

subtle blade
#

probably because a plugin should never cancel the world being able to save?

maiden oyster
#

those somewone now a shop plugin whit a good interface

#

pls

lunar widget
#

guys how do I make that every 5 minutes a message is sent and everyone can see it

subtle blade
#

didn't someone link you to scheduler programming earlier? Or was that someone else?

balmy sentinel
#

nope it was linked for them.

subtle blade
#

so you should have your answer

#

That documentation is, however, slightly dated

lunar widget
#

I dont understand it

#

I hate reading

balmy sentinel
#

then this isn’t the profession for you tbh.

lunar widget
#

😭

balmy sentinel
#

It involves a lot of reading and your own research.

subtle blade
#

and lots and lots of google

#

lots of it

balmy sentinel
#

google🤮

subtle blade
#

Or DDG. Your search engine of choice lol

balmy sentinel
#

DDG❤️

lunar widget
#

im just tired, i needed to go to bed like 13 minutes ago

frigid ember
#

That sucks. So if someone passes in a target selector I have to go thru the list of players and filter them out myself?

lunar widget
#

dont have time to read

#

That sucks. So if someone passes in a target selector I have to go thru the list of players and filter them out myself?
@frigid ember yeah that sucks

mellow wave
#

@frigid ember That doesn't suck. How else would you handle that

#

How would the server know what you want to do

#

Anyway it isn't hard or time consuming to do

balmy sentinel
#

and you think you’re going to make your first scheduler in 13 minutes work exactly the way you want?

lunar widget
#

nahh

#

maybe in like an hour

balmy sentinel
#

maybe

frigid ember
#

It is if you're in a huge rush xD

#

anyways thx for ur guys help!

lunar widget
#

thats what this channel is for

balmy sentinel
#

One thing you need to learn is you’ll learn more from reading than you will from us giving you the answer. All communities like this will point you in the right direction, none of them will spoon feed you the answers.

#

The channel is for people looking for help with Spigot development. If you need help will point you in the right direction, no one is going to spoon feed you the code.

lunar widget
#

ok

frigid ember
#

Meh

wispy pewter
#

Cup of code

balmy sentinel
#

If that link doesn’t help you learn about schedulers there are a ton of other tutorials even video tutorials.

lunar widget
#

its late imma go to bed now

#

gn

wispy pewter
#

@lunar widget using other people their code wont gain you any experience.

If you want to learn you have to start coding yourself

#

Learning what something does and means

lunar widget
#

ok

#

can I sleep now?

wispy pewter
#

Like how a if statements performs

#

No

lunar widget
#

oh..

wispy pewter
#

Sleeping is for noobs

#

JK, sleep tight

lunar widget
#

gn

wispy pewter
#

👋

frigid ember
#

probably because a plugin should never cancel the world being able to save?
yet I can unload a world without saving it?

wispy pewter
#

Yes

#

Force quit the process

#

😂 😂

wary ledge
#

why does his happen if i am not clicking with the correct item

quick arch
#

NPE at Powers line 29

wary ledge
#

yeah ik that

#

im trying to figure out which code

#

because i am going back and forth

quick arch
#

what's at line 29

wary ledge
#

deleting and adding

#

that changes

quick arch
wary ledge
#

ik

quick arch
#

NPEs are extremely easy to find and fix, especially when they show up

wary ledge
#

if (event.getItem().getItemMeta().getLore().toString().contains("Click to get moon gravity for 10s")) {

#

my guess is maybe it has errors because the item doesn't have a lore?

jagged torrent
#

why are you using List#toString() xD

balmy sentinel
#

you beat me to it 😛

#

@wary ledge you’re using InventoryClickEvent right?

wary ledge
#

close enough PlayerInteractEvent

#

why are you using List#toString() xD
@jagged torrent changed it

#

didn't change any results

balmy sentinel
#

I mean if it’s like a hub plugin you really just need to get the item as I doubt you have the same item doing different things.

#

if not it might be easier just to look at the name of the item

wary ledge
#

im making a plugin that gives people super powers

#

this power gives you and item you can click on to use your power

#

it works but if they click something other than the item it spams console

#

are there vanilla items with a lore?

void hawk
#

hey guys, is there a plugin to give random/custom rewards based on %drop to a specified player via commands? (not trying to do ptw just keys for players who have higher playtime & for voting)

winged sparrow
#

I just pasted the sample PersistentDataType code for the UUID

#

How do I make use of it?

wary ledge
frigid ember
#

got it working 🤯

#

[playercounter.activated, playercounter.text, overrideonline, online, overridemax, max, protocol.activated, protocol.text, icons.activated, test.test.test, test.test.test2, motd.activated, motd.text

#
public void iterateKey(String gkey) {
        for (String key : configuration.getSection(gkey).getKeys()) {
            if (configuration.get(gkey + "." + key) instanceof Configuration) {
                iterateKey(gkey + "." + key);
            } else {
                keys.add(gkey + "." + key);
            }
        }
    }
#

@wary ledge which one of all those lines is line 46?

#

and

#
for (String key : configuration.getKeys()) {
            if (configuration.get(key) instanceof Configuration) {
                iterateKey(key);
            } else {
                keys.add(key);
            }
        }````
wary ledge
#

if (event.getItem().getItemMeta().getLore() == null) {

quick arch
#

The meta can be null

frigid ember
#

^

wary ledge
#

ok

#

so why does that NPE

quick arch
#

Because the meta can be null

mellow wave
#

ItemMeta will be null if the item is AIR

#

Keep that in mind when creating your plugin

floral laurel
#

How would i Make a custom perms system like luckperms and pex, any good Ressources i can Look at, or can someone tell me How to hook into spigot so i can add/remove perms from a user

wary ledge
#

ok i fixed it

alpine yoke
#

Hello. I need help.
So I do PlayerInteractEvent e and then e.setCanceled(true);
This is supposed to cancel interacting with items. However, when I try to place a block it does cancel, but it disapears from my hotbar, and only when I click the slot from the inventory with mouse, it appears back. any ideas?

#

spigot 1.8.8

subtle blade
#

(1) Update, you're 5 years out of date. (2) If you want to cancel block placement, BlockPlaceEvent.

#

All else fails, call a player.updateInventory() one tick later in your interaction

wary ledge
#
            ItemStack control = new ItemStack(Material.BEDROCK);
            control.getItemMeta().setDisplayName("Moon Gravity");
            control.getItemMeta().setLore(Arrays.asList("Click to get moon gravity for 10s"));
            player.getEquipment().setItemInMainHand(control);```
alpine yoke
#

No, I want to make a spectator settings gui open when I click the comparator item

wary ledge
#

why does it not have a custom name or lore

alpine yoke
#

and it does open but when I click floor with it, it disappears

#

ill do updateinv then

subtle blade
#

getItemMeta() returns a copy every time you call it

#

get it, assign it to a variable, modify it, set it back to the item

floral laurel
#

How would i Make a custom perms system like luckperms and pex, any good Ressources i can Look at, or can someone tell me How to hook into spigot so i can add/remove perms from a user
@floral laurel bump?

alpine yoke
#

p.updateInventory works :)

#

thank you

mellow wave
#

Look at their sources @floral laurel

subtle blade
#

large majority of what you'll be working with is the Permissible and PermissionAttachment interfaces

mellow wave
#

I don't see a real reason why we need a new permissions plugin

#

LuckPerms has everything you can imagine

#

And if not just create an addon

floral laurel
#

True But i want to Make everything myself, not only for experience But also to learn hands on

#

Look at their sources @floral laurel
@mellow wave Yes But they have too much stuff that is not really permission related to i wanted some Ressources to really get only the info i need, luckperms Has lots of Different stuff in it

mellow wave
#

Then it's a great opportunity for you

#

Since you need to trackdown the permissions part you will have to look and understand how it works internally

#

It's a win if you want to learn

raw arch
#

How do I change a players message color everytime they chat after running a command?

floral laurel
#

Since you need to trackdown the permissions part you will have to look and understand how it works internally
@mellow wave doesnt luckperms have lots of permission related stuff that isnt needed?

mellow wave
#
  1. Detect command
  2. Set a color variable for the player
  3. Grab the next message sent by the player
  4. Set that message to the color from the variable
    @raw arch
#

@floral laurel It does but you learn while looking at the code and trying to trackdown the part that you need. It's a great opportunity to learn proper code standards

wary ledge
#

.setDisplayName(ChatColor.AQUA + ChatColor.BOLD + "Moon Gravity"); is corrct right?

mellow wave
#

Yes

floral laurel
#

@floral laurel It does but you learn while looking at the code and trying to trackdown the part that you need. It's a great opportunity to learn proper code standards
@mellow wave ok will do! Thank you

wary ledge
#

Error:(34,46) java: bad operand types for binary operator '+' im just joining things

floral laurel
#

.setDisplayName(ChatColor.AQUA + "" + ChatColor.BOLD + "Moon Gravity");

mellow wave
#

^ try that

wary ledge
#

it worked

quick arch
#

ChatColor.translate whatever the method is('&', string)

#

🤔

mellow wave
#

Yeah that's what I usually do

#

Or if I'm lazy I just hardcode color codes with §

opal adder
#

Is there a way to stop the push mechanic on players in 1.16?

mellow wave
#

@opal adder Player#setColidable

wary ledge
#

why can i not find this

#

on this page it shows there are 2

opal adder
#

Hmm okay

mellow wave
#

What API are you using?

wary ledge
#

on my IDE there is only 1

#

i am trying to put an item in slot 8 (9)

#

but i don't have that option

mellow wave
#

It's just inventory.setItem(8, item)

sturdy oar
#

Why PlayerJoinEvent is not Cancellable

wary ledge
#

oh i was using equipment

mellow wave
#

Because you can't cancel it like that you need to kick the player not abort the connection

#

I mean you probably could but no that's bad

sturdy oar
#

I wanted to make a join priority system

#

so basically my server has 50 slots , but the last 5 slots are reserved to VIP

#

Do I have to use PreJoinEvent

wary ledge
#

if i do .getItemMeta().getLore()

#

and the lore has a color

#

what will it return

mellow wave
#

Yeah use AsyncPlayerPreJoinEvent @sturdy oar

#

And then just disallow

sturdy oar
#

Ok

#

I think that event is called after login start packet

mellow wave
#

That should be perfect for what you need

sturdy oar
#

Yeah for now it's fine

#

Although I think I'll transfer this to a Velocity plugin because it's better to let the proxy handle this

opal adder
#

player.setCollidable(false); doesn't do anything

sturdy oar
#

Read the javadoc

mellow wave
#

Anyway Javadocs are a good place to start :)

opal adder
#

I'm confused this is really only showing how to do it with entities, but I only want to disable collision with players on players

subtle blade
#

players are entities

#

in order for it to work, both entities must be non-collidable

opal adder
#

Yea I know that, I just don't want their push to be disabled on anything but players

#

is that not possible?

subtle blade
#

you can make use of the collision exemptions introduced a short while ago

frigid ember
#

Inventory.updateInventory() is deprecated. What should I use instead?

opal adder
#

Maybe just re-open the inventory

subtle blade
#

Inventory#updateInventory()?

frigid ember
#

Yes

subtle blade
#

That definitely doesn't exist anymore

frigid ember
#

For 1.15.2 it does exist

#

Reopening sucks.

opal adder
#

What's the collision exemptions?

subtle blade
#

Are you thinking of Player#updateInventory() per chance?

frigid ember
#

Oh yes

#

Sorry

jagged torrent
#

You can also add all players to a scoreboard team and set the collision to own team

#

I think at least

subtle blade
#

afaik it's not deprecated

#

it wasn't in 1.15.2 either last i recall

frigid ember
#

Weird, it says it is deprecated. Maybe vscode is stupid. I should use real IDE.

subtle blade
#

VSCode is definitely an unorthodox choice for Java

frigid ember
#

I used netbeans but the keybinds suck a lot

orchid badger
#

I prefer IntelliJ

frigid ember
#

perhaps I should give it a try

orchid badger
#

btw, how can I get iron_pickaxe from an ItemStack of iron pickaxes?

odd knoll
#

getType?

orchid badger
#

btw vscode works fine for me too

odd knoll
#

That what u mean?

orchid badger
#

that gives me the Material, right?

#

I need the id thing

odd knoll
#

Yep.

#

getData.

orchid badger
#

like iron_pickaxe

#

oh

subtle blade
#

The item key will be part of the material. getKey()

odd knoll
#

Although, if it's iron_pickaxe, you're on post 1.12.2 items?

orchid badger
#

Idk it's just something I made up based on what I saw before lol

subtle blade
#

Material.IRON_PICKAXE.getKey() will return you a NamespacedKey with the value minecraft:iron_pickaxe

orchid badger
#

ok nice. thanks 👍

#

I was looking for id. Didn't realize it was key 😂

graceful vigil
#

What's the recommended java version for plugin development?

orchid badger
#

8 I guess 🤔

subtle blade
#

8 if it's public, yeah. though if you're just writing a private plugin for your own server, you're fine (and are recommended) to use anything post-8

#

not enough server hosts have jumped to 11

sturdy oar
#

What's the recommended java version for plugin development?
@graceful vigil 8

#

Imagine using Java enterprise 5

orchid badger
#

😂

#

lowest I ever used is 7

subtle blade
#

i mean, in MC 1.7 and 1.8, 7 was practically standard

#

the jump to 8 was only a handful of years ago

#

i still remember having discussions on the forums about whether or not to compile plugins against 8

frigid ember
#

and here I am with openjdk 14

subtle blade
#

which, again, if you're writing plugins for a personal server, please do

orchid badger
#

I use 11 mostly. and 8 only where needed.

subtle blade
#

you get the benefit of working with newer features in the language and you get the fixes and performance improvements from modern java versions

#

9's module system didn't break anything for CraftBukkit or Spigot servers so the desire to stay on 8 should have been long gone after 11 was released

wary ledge
#

how can i lock an item in a player's inventory?

#

like they can't move it, place it, drop it, drop it when they die ect.

#

would it be InventoryInteractEvent?

sturdy oar
#

and here I am with openjdk 14
@frigid ember wait you all use Java?

orchid badger
#

xD

sturdy oar
#

I code all my plugins with JRuby

wary ledge
#

why does throwing an item count as left click air

#

oh sorry it thinks im spamming

#

ok just did some testing

#

if i look at a block when throwing it's not even an event

#

ok that's weird

#

it's not doing it now

rigid pier
#

Hello

#

How to config pleas ?

balmy sentinel
#

@wary ledge BlockPlaceEvent, InventoryClickEvent, and PlayerDropItemEvent

rigid pier
#

How to config the golden enchant cooldown

#

Pleas

balmy sentinel
#

@rigid pier what have you tried?

wary ledge
#

it's doing it again

#

when i throw items

#

it is like a left click

rigid pier
#

The command is ? For the cooldown

#

Pleas

balmy sentinel
#

wdym when you throw it? Like it’s a projectile or when you drop it with “Q”

wary ledge
#

Q

balmy sentinel
#

PlayerDropItemEvent should stop that if you’re checking correctly what do you have?

rigid pier
#

For me ?

wary ledge
#

oh oh oh

#

ok so if i have 2 of that item in my inventory

balmy sentinel
#

@rigid pier what exactly are you trying to do you’ve given nothing.

wary ledge
#

when i q 1 of them but have the other still in it

#

it does a left click event

rigid pier
#

/cooldowns (command) 60

#

Command ?

wary ledge
#

what

#

what are you trying to do @rigid pier

balmy sentinel
#

@rigid pier are you trying to make a command that will create a cooldown on other commands?

wary ledge
#

@balmy sentinel when i removed the drop item event and it seems to still happen

#

it's not that big of a deal as a player shouldn't have more than 1 of these items

#

but kinda weird

balmy sentinel
#

does the drop event get called?

wary ledge
#

no

#

what the

balmy sentinel
#

🙃

#

lmao wrong one in recent

#

are you registering the event properly?

wary ledge
#

i have like a ton of events in 1 class and im registering he class

balmy sentinel
#

?paste

worldly heathBOT
wary ledge
#

i don't have issues making them work

balmy sentinel
#

let me see what you got

rigid pier
#

/cooldowns <command> <Time in seconds>

#

But what command

balmy sentinel
#

@rigid pier are you trying to make a command that will create a cooldown on other commands?
@frogsoup.parker#0501

wary ledge
rigid pier
#

No

#

Pe

wary ledge
#

i added back the event

#

in that paste

rigid pier
#

Give the cooldown in the golden apple

balmy sentinel
#

@wary ledge send the message before the if statement just to check if the event is being called

#

@rigid pier so you want to stop people from spam eating golden apples by implementing a cooldown on them?

wary ledge
#

it is being called

rigid pier
#

Yes pleas

balmy sentinel
#

then something is wrong with your if statement @wary ledge

rigid pier
#

@balmy sentinel

balmy sentinel
#

@rigid pier so what have you tried?

wary ledge
#

is event.getItemDrop().getCustomName().equalsIgnoreCase("§l§bMoon Gravity" maybe not the way to check the item

balmy sentinel
#

let me look at the event Need_Not

rigid pier
#

no but I don't understand which command to ask

balmy sentinel
#

try event.getItemDrop().getItemStack()

wary ledge
#

ok so i removed the if statement and it doesn't let me throw it

balmy sentinel
#

Need_Not

wary ledge
#

but it seems to be LEFT_CLICK_AIR

balmy sentinel
#

@rigid pier so you haven’t tried anything correct?

frigid ember
#

Does spigot support Datapack custom dimensions yet?

rigid pier
#

can you give it the command to do a cooldown? on an apple

#

Pleas

wary ledge
#

wait @rigid pier are you trying to make a plugin or run a command in game

#

if i could find away to cancel the LEFT_CLICK_AIR if i throw, but only if i throw because i use the LEFT_CLICK_AIR for other things

rigid pier
#

Yes

balmy sentinel
#

check if the item is a golden apple

rigid pier
#

at worst you don't have the command to do on an apple or enderpearl with / cooldowns

#

Pleas

wary ledge
#

@rigid pier do you know English as your first language?

balmy sentinel
#

@rigid pier check out that event I don’t know what else you need. Create a map and store the player within it if they’re on a cooldown. Once the cooldown is over remove them from the list.

solid sundial
#

does anyone know if i am allowed to link a plugin in this chat? I have a question about...

rigid pier
#

I m frensh

wary ledge
#

@solid sundial ofc you can why not?

#

ok

#

just dont advertise it

rigid pier
#

I‘m sorry

solid sundial
#

just asking because some servers dont like advertisement, even tho this is not my plugin lol

wary ledge
#

what do you need help with

balmy sentinel
#

@solid sundial anything you need help with regarding Spigot development can be posted here 🙂

solid sundial
balmy sentinel
#

have you tried contacting the author?

rigid pier
#

Thé /cooldowns <command>

#

The*

#

What the command for use in the enderpearl

#

Our golden apple

solid sundial
#

yes

#

like 4 times

balmy sentinel
#

what did they say?

solid sundial
#

I've waited for a week

#

no reply

ebon girder
#

why cant people connect to my MC server? i portforwarded and it seems to have worked but apparently

#

not

balmy sentinel
#

@rigid pier I’m sorry I really don’t understand what you’re asking.

#

@ebon girder are you sure the port is open

solid sundial
#

@ebon girder what is your firewall

ebon girder
#

i set up in windows firewall and disabled avast shields

#

would malwarebytes be doing it ?

balmy sentinel
#

@ebon girder are you sure the port is open
@frogsoup.parker#0501

ebon girder
#

how do i double check

solid sundial
#

just check with your security client

balmy sentinel
#

I believe there is something on Windows to look at open ports hang on a sec

rigid pier
#

in fact he indicated the command so the / cooldowns <command> but what is the command to put

#

I am use google traduction

#

I am sorry

ocean prism
balmy sentinel
rigid pier
#

in fact he indicated the command so the / cooldowns <command> but what is the command to put

#

Pleas

balmy sentinel
#

@rigid pier are you trying to create a plugin?

rigid pier
#

Nope

balmy sentinel
#

@ocean prism get the location of the block, increase the y by 1, place the skull on that new location.

ocean prism
#

🤔

rigid pier
#

Add me friend 5 minutes plus

#

Pleas*

balmy sentinel
#

@rigid pier okay to my knowledge there is no way to change the cooldown time on enderpearls and/or golden apples. If you want to change them you need to either create a plugin, find a developer to do it for you, or find an already existing plugin.

sinful spire
#

disable the cooldown with stuff like 1.8 pvp plugins and then change it?

wary ledge
#

also idk why it says badlion

#

im using my own custom client

#

not even modified badlion because that's bad

#

i just want to lock the bedrock in the 9th slot

#

so if they throw it, die, anything! it will always be there

rigid pier
#

Bon bah merci à vous

#

Je vous laisse

#

Sur ce bah merci

#

👍

#

Bon travail

#

A vous

#

Je vous laisse

balmy sentinel
frigid ember
#

Player#updateInventory() @wary ledge

#

maybe this could be a problem

rigid pier
#

Et je suis pas anglais c’est pour ça que je ne Sais pas parler

frigid ember
#

not sure tho

quick arch
#

creative is dumb with the inventory click event

wary ledge
#

wait so....

ebon girder
#

@balmy sentinel i cant enter my IP

wary ledge
#

if i do event. nothing pops up

#

how do i check the item and the action

balmy sentinel
#

@ebon girder is the IP shown already your public IP address?

#

actually yeah it should be so just enter the port and run it and see if the port is open.

#

if the port isn’t open that’s your problem.

ebon girder
#

did i use the wrong IP address

balmy sentinel
#

well if you didn’t port forward properly that’s another problem.

#

you also might want to check if your router actually allows port forwarding. I know some ISPs let you set port forwarding options, but don’t actually open the port.

carmine wharf
#

i have vault, essentials, deluxemenus, worldedit, worldguard a few more but basically nobody can break stuff in spawn but they cant break stuff in skyblock either. How can I fix this

frigid ember
#

what's the best way to store data?

quick arch
#

database

frigid ember
#

sqlite or other?

quick arch
#

SQL

#

or if you want to be like Hypixel, Redis 🤔

wary ledge
#

how do i get the name of the item with InventoryAction event

frigid ember
#

won't it have worse performance?

#

I assume you load the data and save when player leaves or save it every half of a minute or so

quick arch
#

yeah, load data when they join

#

save it periodically (so they don't use much data if the server crashes)

#

and save it when they leave

frigid ember
#

I am scared what if server crashes

quick arch
#

just save it periodically

sleek ivy
#

so TextComponent.fromLegacyText seems to be ignoring &r reset codes, or at least for color but not formatting. do I need to do something else?

frigid ember
#

Okay, thanks :P

carmine wharf
#

I keep my hub compass when going to iridium skyblock

ebon girder
#

@balmy sentinel its not blocked

balmy sentinel
#

the site says the port is open?

ebon girder
#

ye

balmy sentinel
#

then clients should be able to connect. If you’re still having issues I’d check firewall settings

ebon girder
#

im supposed to use the ipv4 address in ipconfig when you put that in the terminal right

#

maybe i used wrong ip

balmy sentinel
#

for the internal IP address yes.

#

for the external IP address you need to put your public IPv4 address.

ebon girder
#

how do i check thazt

balmy sentinel
#

go to your search engine and search whatismyip

ebon girder
#

hmmph

#

@balmy sentinel so when i portforward

#

i use my whatismyip ip

balmy sentinel
#

for the external IP yes.

ebon girder
#

when do i use my diff ips

balmy sentinel
#

for the internal IP you want to use the IP address that shows up in ipconfig

frigid ember
#

anyone know a playershop/chestshop plugin that shows a mini hologran like this above to show the amount of items in like this : 🟩 🟩 🟩 🟥 🟥 🟥 🟥 🟥 🟥 🟥 ?

quick arch
#

what is an API
Spigot's an API

what does it do?
Allows us to make amazing things

subtle blade
#

Application programming interface

quick arch
#

:)

subtle blade
#

Pretty much anything front-facing that makes programming easier

quick arch
#

🤔

#

wat

subtle blade
#

In short, yeah

frigid ember
slow grail
#

that sentence is not english

frigid ember
#

what one

slow grail
#

the one you said

frigid ember
#

press the . link

slow grail
#

why

frigid ember
#

anyone know a playershop/chestshop plugin that shows a mini hologran like this above to show the amount of items in like this : 🟩 🟩 🟩 🟥 🟥 🟥 🟥 🟥 🟥 🟥 ?
@frigid ember to this

slow grail
#

ohh i could make one

frigid ember
#

ok>

#

if you were to how long would that take

slow grail
#

hmm since im sorta new i guess 5 days

#

or less

frigid ember
#

well

#

i know there is an existing plugin. but i cant seem to find it anywere

slow grail
#

ohh

#

well gl

empty seal
#

Is anyone able to teach me how to make plugins? I know the basics but I want to learn how to do more stuff.

ionic hound
#

@empty seal do you know java?

empty seal
#

I want to learn java

ebon girder
#

isnt there a test plugin

empty seal
#

I know how to create a basic plugin but I need help with other big stuff

ionic hound
#

i can teach you skript is is a lot easyer than java

empty seal
#

I use eclipse

#

Ide

ionic hound
#

use intellij it is better

empty seal
#

I like eclipse. It looks clean and stuff

ionic hound
#

do you know java

empty seal
#

A tiny bit

#

I coded a plugin that makes you only have 1/2 the normal hearts.

ionic hound
#

wana vc

empty seal
#

Sure

ebon girder
woven whale
#

HI friends, may I know if there is a way to change the snowing height for cold biomes with a spigot plugin? Thanks!
I don't know whether I have to play with nms for this

ionic hound
#

I am making a gui and i am adding a second item to it but it keeps the lure and name between the two. How do i fix this

#

OutlinePane pane = new OutlinePane(0, 0, 9, 5);
ItemStack item = new ItemStack(Material.ICE);
ItemMeta meta = item.getItemMeta();
String[] strArray = {ChatColor.RESET + "Test"};
meta.setDisplayName(ChatColor.RED + "Test");
meta.setLore(Arrays.asList(strArray));
item.setItemMeta(meta);
GuiItem guiItem = new GuiItem(item, event -> event.getWhoClicked().sendMessage("You clicked on ice!"));
pane.addItem(guiItem);
gui.addPane(pane);

                OutlinePane pane1 = new OutlinePane(2, 0, 9, 5);
                ItemStack item1 = new ItemStack(Material.ICE);
                ItemMeta meta1 = item.getItemMeta();
                String[] strArray1 = {ChatColor.RESET + "Test2"};
                meta.setDisplayName(ChatColor.RED + "Test2");
                meta.setLore(Arrays.asList(strArray1));
                item.setItemMeta(meta);
                GuiItem guiItem1 = new GuiItem(item, event -> event.getWhoClicked().sendMessage("You clicked on ice!"));
                pane.addItem(guiItem1);
                gui.addPane(pane);
empty seal
#

NERD

#

jk

ebon girder
#

why is my portforward not wroking

#

people cant connec to the serber

brisk spoke
#

depends, are you giving them your IPv4/IPv6 (public hostname), and are you sure that you port forwarded it correctly

ebon girder
#

where am i supposed to put what>

brisk spoke
#

didn't ask that.

#

one for port forwarding in your router, did you forward your actual computers local ip something like 192.168.0.5 forwarding 25565

shy valve
#

Sorry, but how do I download spigot 1.15.2 to make a server?

#

Thanks

ebon girder
#

wdym port forward your computers ip

#

u gotta portforward your PC before your server?

brisk spoke
#

you can either compile it your self using buildtools [google it]

#

ok your computer has it's own ip address within your house, per say

shy valve
#

Ou thanks

brisk spoke
#

your router has to know which computer it is letting the internet talk to

brisk spoke
#

local ip doesn't matter

ebon girder
#

the local ip address is the one in IPV4 right

brisk spoke
#

open up command prompt, [assuming your on windows]

ebon girder
#

type ipconfig

shy valve
#

@brisk spoke sorry i don´t speak english but how do I download spigot 1.15.2 to make a server?
Thanks

brisk spoke
#

the ipv4 is what you'll use

#

@brisk spoke sorry i don´t speak english but how do I download spigot 1.15.2 to make a server?
Thanks
@shy valve once again, you'll need to use buildtools

shy valve
#

OoO

#

THANKS

brisk spoke
#

type ipconfig
@ebon girder yes, find the IPv4 for your computer

ebon girder
#

i have it

#

do i put that in the local ip

brisk spoke
#

yes

#

then save it

#

then google what your ip is

#

and share that with whomever

winged sparrow
#
    @EventHandler
    public void onPlayerDeath(PlayerDeathEvent event) {
        Player player = event.getEntity();
        if (player.getKiller() == null) {
            return;
        }
        EntityPlayer nmsPlayer = ((CraftPlayer) event.getEntity()).getHandle();
        if (nmsPlayer.getKillingEntity() == null) {
            return;
        }
        Entity entity = CraftEntity.getEntity((CraftServer) event.getEntity().getServer(), nmsPlayer.getKillingEntity());
        if (!(entity instanceof LivingEntity)) {
            return;
        }
        PlayerKilledByEntityEvent playerKilledByEntityEvent = new PlayerKilledByEntityEvent(player, entity);
        Bukkit.getPluginManager().callEvent(playerKilledByEntityEvent);
    }```
#

This is an event caller I wrote

#

for a custom event

#

yet when I try listening to it, nothing happens

brisk spoke
#

i'm going to guess here, my experience with the spigot/mc api is limited. are you registering the event class?

winged sparrow
#
public class PlayerKilledByEntityEvent extends Event {
    private final Player player;
    private final Entity entity;

    public PlayerKilledByEntityEvent(Player player, Entity entity) {
        this.player = player;
        this.entity = entity;
    }

    public Player getPlayer() {
        return player;
    }

    public Entity getKiller() {
        return entity;
    }

    private static final HandlerList HANDLERS = new HandlerList();

    public HandlerList getHandlers() {
        return HANDLERS;
    }

    public static HandlerList getHandlerList() {
        return HANDLERS;
    }
}```
#

This is actually my first foray into writing my own events

brisk spoke
#

and are you sure you're returns are not firing nulling the event

winged sparrow
#

No, I might not be registering them

brisk spoke
#

ya if you're not registering that'd explain it :p

winged sparrow
#

This code should work as is, it's basically ripped from my other plugin that handles this fine

#

Oh wait

#

Yes, I am registering my events

elfin juniper
#

if i wanted to make a compass point to a specific entity, could i create commands to set entities to “hunter” and “speedrunner” then use those in the code with the compass and making the compass stay in inv when dies

winged sparrow
#

Sorry, I thought you were talking about I had to define my custom event or something

#

But yes, I am indeed registering my listener classes lol

brisk spoke
#

cool, have you tried logging to see if the event is firing?

elfin juniper
#

Im planning on creating a minecraft manhunt to play with my friend or at least test on a test server

winged sparrow
#

Yeah I'm about to move on to that phase, I was just checking to see if anyone spotted some glaring errors

lone fog
#

I would have just used the damage event to detect it

#

But I guess that works

winged sparrow
#

I didn't have success with that

brisk spoke
#

probably should do that before coming here 😛

winged sparrow
#

I'd rather just get the nms field

shy valve
#

As I download 1.15.2 for a server I don't speak English and I don't understand how, I never did something like that

#

HELP PLISSS

lone fog
#

?buildtools

#

?bt

worldly heathBOT
brisk spoke
#

i've already guided him to that

lone fog
#

Not sure if there is a translation of that

brisk spoke
#

@shy valve are you on Windows

shy valve
#

i dont understane buildtools

#

yes

#

i use windows 7

winged sparrow
#

Oh, it worked after I put in log lines. Must not have loaded it properly.

brisk spoke
shy valve
#

Buildtools seems complex to me :c

brisk spoke
#

i'm trying to guide you through it..

shy valve
#

that's not the problem, the problem is me

brisk spoke
#

ok do you want to get it, or not?

#

trying to help you.

shy valve
#

Yes, i want the spigot 1.15.2

brisk spoke
#

have you downloaded the before mentioned links?

shy valve
#

No

brisk spoke
#

you need to do that..

winged sparrow
#

Try translating the page to your native language and following it along

#

that may help

shy valve
#

o, sorry I better not use spigot since I am very complicated, thanks for the help

#

and your time

winged sparrow
#

Well, don't revert to Bukkit should you decide to not use Spigot

#

If you're not going to use Spigot, use Paper Spigot

#

Which is easier to download.

shy valve
#

ok

lone fog
#

Can’t revert to bukkit anyway

#

It’s the same download process

winged sparrow
#

Ah

#

I guess Paper is your only option for an "easier" downloading process

lone fog
#

Yeah as much as we shouldn’t mention paper here

#

It is easier to download

winged sparrow
#

I haven't touched bukkit in years anyways lol

#

why anyone still uses it in any capacity is a total mystery to me

brisk spoke
#

i thought bukkit died years ago?

#

like they had a big dmca issue and shutdown

lone fog
#

Nah buildtools still builds it

winged sparrow
#

Though BuildTools is so much better for getting spigot in your local repo

#

I am ashamed to admit that I still can't figure out how to get paper's api in my repo

sleek ivy
#

Why does the first line respect the reset but the second doesn't (the second line is fully bold, despite the reset in there)

String message = "" + ChatColor.BOLD + "test " + ChatColor.RESET + "test";

player.spigot().sendMessage(TextComponent.fromLegacyText(message));
player.spigot().sendMessage(new ComponentBuilder().append(TextComponent.fromLegacyText(message)).create());
brisk spoke
#

speaking of which i really need to start working on buildtools integration into my panel

winged sparrow
#

@sleek ivy Question, is this on 1.16?

sleek ivy
#

yes

#

this is a simplified example of a bug I can't figure out.

winged sparrow
#

TextComponents + legacy chatcolor formatting does not cooperate well

#

use the supported .color() and similar methods

lone fog
#

Plus legacy chat color is kinda messy in 1.16 in general

winged sparrow
#

I'd recommend using a ComponentBuilder for some sanity

sleek ivy
#

I can't, I'm processing external config stuff

brisk spoke
#

can you not write a parser if not doing it internally? (not my field, not very knowledgeable in spigot api again)

winged sparrow
#

I guess you'll have to write a parser for that 🙃

sleek ivy
#

ugh

winged sparrow
#

Best of luck lol

brisk spoke
#

😄

winged sparrow
#

You know, I don't think it would be that hard

#

I'd get the string, and at every instance of a chatcolor format, split it and apply it to individual segments in a component builder

#

it will be a tiny bit tedious but not too bad

#

probably

#

might need regular expression though which is never fun

ebon girder
#

@brisk spoke so my IPv4 address is what i use in portforwarding

#

i leave the remote ip address as any

#

and then i give them my external ip address

ionic hound
#

How would i send a command as a player?

graceful vigil
#

player#performCommand

hybrid path
#
public class PlayerType {
  private static final List<PlayerType> types = new ArrayList<>();

  public static PlayerType register() {
    System.out.println(types); //null
  }
}

How come types is null there?
A temporary fix is initializing it in the register() method but that's a weird workaround imo.

#

This honestly doesn't make any sense.
In function1 I print the value of types. because that function adds one to it and it has one entry, which was obviously to be expected.

Now, in function2 which gets called afterwards I also print the value of types. This time it's empty.
How and why does this happen?

sleek ivy
#

Likely a stupid simple solution but how can I get a ChatColor from a string color code like §6

ember bay
#

Hello. I am currently working on an SMP Earth server for 1.14.4 for a Discord server - For some reason, when I join the server my skin suddenly changes into a steve skin, and the same occurs to other players. I went through some possible plugins that could be causing this issue, and deleted the unnecessary ones. However, I still cannot find a solution. Please @ me if you have any suggestions/ideas on why this may be happening.

lone fog
#

Offline mode?

ember bay
#

Nope

lone fog
#

?ask

worldly heathBOT
#

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

hybrid path
#

you tagged 2 mods to help you lol, not a high chance anyone will help you that way

hoary cove
#

hello please help me

#

i export jar file and when running the server nothing happen on the game

pastel condor
#

@hoary cove Ever tried restarting?

hoary cove
#

the server?

pastel condor
#

mhm

hoary cove
#

i will give another try

#

@pastel condor same issue

pastel condor
#

🤷‍♂️

hoary cove
#

😆

#

any ideas ?

graceful vigil
#

any errors

hoary cove
#

i dont see the file executed on the server

lilac gorge
#
package me.tabootwo.essentialcommands.commands;

import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

import net.md_5.bungee.api.ChatColor;

public class God implements CommandExecutor {

    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        Player player = (Player) sender;
        if(!(sender instanceof Player)) {
            sender.sendMessage("Console is already a god!");
            return true;
        }
        if(!(player.isInvulnerable()))
        player.setInvulnerable(true);
        sender.sendMessage(ChatColor.BLUE + "You have enabled god mode!");
        return true;
        
    
        if(player.isInvulnerable());
        player.setInvulnerable(false);
        sender.sendMessage(ChatColor.BLUE + "You have disabled god mode!");
        
        return false;
    

    }
    
}```
#

hey im trying to make a god mode command

#

im trying to make it check that if you already have god mode on, it will turn it off

#

but what im playing around with just isnt working, anyone know how I can fix that to make it work

marsh hawk
#

wheres your brackets

#
        if(!(player.isInvulnerable()))
        player.setInvulnerable(true);
        sender.sendMessage(ChatColor.BLUE + "You have enabled god mode!");
        return true;
        ```
#

will only call player.setInvulnerable

#

then the rest will always be called

#

and returning false means the command as done incorrectly

#

so ```cs
if(player.isInvulnerable());
player.setInvulnerable(false);
sender.sendMessage(ChatColor.BLUE + "You have disabled god mode!");

    return false;``` implies that
#

when it should be returning true

lilac gorge
#

oh..

#

I thought false turns it off

marsh hawk
#

turns what off

lilac gorge
#

invulnerability

marsh hawk
#

no setting the invulnerability is fine

lilac gorge
#

doing .setInvulnerable(false)

#

oh

marsh hawk
#

its returning false

lilac gorge
#

oh I see wym

#

I still get errors even with brackets

marsh hawk
#

what are the errors

lilac gorge
#
package me.tabootwo.essentialcommands.commands;

import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

import net.md_5.bungee.api.ChatColor;

public class God implements CommandExecutor {

    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        Player player = (Player) sender;
        if(!(sender instanceof Player)) {
            sender.sendMessage("Console is already a god!");
            return true;
        }
        if(!(player.isInvulnerable())) {
        player.setInvulnerable(true);
        sender.sendMessage(ChatColor.BLUE + "You have enabled god mode!");
        return true;
        }
    
        if(player.isInvulnerable()) {
        player.setInvulnerable(false);
        sender.sendMessage(ChatColor.BLUE + "You have disabled god mode!");
        
        return true;
        }}```
marsh hawk
#

you still have to return at the end

lilac gorge
#

oh no return at all..

#

still error..

marsh hawk
#
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        Player player = (Player) sender;
        if(!(sender instanceof Player)) {
            sender.sendMessage("Console is already a god!");
            return true;
        }
        if(!(player.isInvulnerable())) {
        player.setInvulnerable(true);
        sender.sendMessage(ChatColor.BLUE + "You have enabled god mode!");
        return true;
        }
    
        if(player.isInvulnerable()) {
        player.setInvulnerable(false);
        sender.sendMessage(ChatColor.BLUE + "You have disabled god mode!");
        
        return true;
        }
return false;
}```
somber bluff
#

I have a problem.
I don't want to spam forum, but it is a necessity to have 20 posts in order to post new thread.
Can I get verified by moderators... or if I will construct a job offer you can post that for me?

lilac gorge
#

ayy fixed, tysm

marsh hawk
#

no worries 🙂

somber bluff
#

(I am danielduel.67648)

peak tiger
#

hi guys whats the best free plugin for pvp tags and cooldowns 1.8.9

ember bay
balmy sentinel
#

@somber bluff I doubt they’ll change it. Just read forum posts and answer where you can.

#

but don’t spam or bump old threads

somber bluff
#

Yaaaa, that's why I wanted to "Hey forum mods... Could you switch that button for me?" 😄

#

Okay, end of topic, it is getting slimey

#

^^

balmy sentinel
#

if they make an exception for you they’ll have to do it for everyone it turns into a slippery slope. Just be active and you’ll get there.

ocean root
#

@frigid ember me here

torn robin
#

@ember bay how long has this issue been occurring for?

ember bay
#

I just started working on this server exactly a week ago, mabye I got it a few days ago?

humble venture
#

does anyone know of a PersistentDataType implementation for Entities?

#

I'm trying to make pokeballs

somber bluff
#
  1. Do /plugins return your plugin in green?
  2. Are there some startup issues with plugin?
#

@ember bay

ember bay
#

All of them are green/up to date

somber bluff
#

Is that your plugin?

#

Ah, w8, you are not the person that I was replying to xD

#

nvm

wise flame
#

if semicolon.

marsh hawk
#

maven shits me sometimes

#

all my shades are working except one but i'm doing nothing wrong o-o

#
                <configuration>
                    <artifactSet>
                        <includes>
                            <include>javax.servlet:javax.servlet-api</include>
                            <include>com.sparkjava:spark-core</include>
                            <include>org.slf4j:slf4j-api</include>
                           </includes>
                    </artifactSet>
                    <relocations>
                        <relocation>
                            <pattern>spark.Spark</pattern>
                            <shadedPattern>me.buby.oauth2mc.spark</shadedPattern>
                        </relocation>
                        <relocation>
                            <pattern>org.slf4j</pattern>
                            <shadedPattern>me.buby.oauth2mc.slf4jk</shadedPattern>
                        </relocation>
                        <relocation>
                            <pattern>javax.servlet</pattern>
                            <shadedPattern>me.buby.oauth2mc.javax.servlet</shadedPattern>
                        </relocation>
                    </relocations>
                </configuration>
``` anyone know whats wrong with this? the javax.servlet shade just isnt getting shaded
#
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>    
        <version>4.0.1</version>
    </dependency>```
lilac gorge
#

import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

public class Feed implements CommandExecutor {
    
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        Player player = (Player) sender;
        if(sender instanceof Player) {
            
            
            if((player.getFoodLevel() == 20));
            player.sendMessage("You have already been fed");
            return true;
        }
            if(!(player.getFoodLevel() == 20)) {
        player.setFoodLevel(20);
        player.sendMessage("You have been fed loser");
        
        
        
    }else{
        
        System.out.println("Only players can eat food, silly console");
        
    }
    return false;
}}
#

can someone help me with this, trying to make it so if I am full hunger, it wont feed me, but it says "you have already been fed" either way

#

not sure why

frigid ember
#

does spigotmc have anywhere any rss?
i would use that do design my github page.

marsh hawk
#
        Player player = (Player) sender;
        if(sender instanceof Player) {```
#

you should check before you cast

#
            if((player.getFoodLevel() == 20));```
#

and it's because the semicolon

lilac gorge
#

damn I fixed it before looking at this, I completely reformatted it to work differently xd

marsh hawk
#

lmao happens to the best of us

lilac gorge
#

thx tho

frigid ember
#

anyone know whats wrong this? commands.yml ```command-block-overrides: []
ignore-vanilla-permissions: false
aliases:
icanhasbukkit:

  • "version $1-
    givedirtmsg:
    • "give @s minecraft:dirt $1"
    • "say Gave dirt to @s"```
#

the givedirtmsg not work

#

or is this wrong channel

#

to ask

hollow hedge
#

Spacing looks wrong. Move givedirtmsg back 2 spaces

frigid ember
#

ok thx

quick turtle
#

How would I use the API to make a clickable (and styled) message that overrides in the AsyncChat event

undone narwhal
#

Cancel the message

#

Then send to all receivers a builded TextComponent message

lilac gorge
#

What is the event for damaging a entity

#

I want to event.setCancelled(true); for it

quick turtle
#

@undone narwhal Do you know how to do that with deluxechat's api xd

#

I thought it was just regular chat

#

apparently not

bronze acorn
#

@quick turtle just send a chat component normally

#

that has a clickevent

quick turtle
#

yeah but

#

that would override deluxechat for that message

bronze acorn
#

uh

#

i think in the config of deluxechat

#

that's a thing

quick turtle
#

not really

#

I need to replace [warp] with

#

[Click here to warp to ...'s island]

#

and if u click it runs /is go <plr>

#

do I need to seriously rebuild the deluxechat formatting using text components for this xd

hoary cove
#

hello please help

#

is this the only i need to change on config.yml in auth me?

#

MySQL Hostname
MySQL Port
MySQL Database
MySQL Username
MySQL Password

kind crow
#

Hi, how do I detect zombies holding items and remove them? (zombies or items, doesn't matter)

jaunty night
#

I've been trying to change a final value through reflection and I've confirmed through the debugger that making it "not final" worked and that the field is accesible

#

the field is static if that's of any use

hardy cedar
burnt bay
#

I have a data class (dont know if thats what you'd call it) structured like this:

public class BankAccount {

    public int index;

    public UUID player;

    public int bankAge;

    public int lastLogin;

    public List<ItemStack> storage;

    public int debt;

}

Now there are going to be many instances of these data classes. I've followed a few tutorials regarding saving data with yml but I cant wrap my head around it.

I need my yml file to be structured like this

UUID:
    INDEX:
    AGE:
    LASTLOGIN:
    DEBT:
    INVENTORY:
        (LIST OF ITEMSTACKS)
UUID:
    INDEX:
    AGE:
    LASTLOGIN:
    DEBT:
    INVENTORY:
        (LIST OF ITEMSTACKS)

There will be less than 50 instances of this bank file. And databases would overcomplicate it

jaunty night
#

Just use a ConfigurationSerializable

#

this thread should help you

sturdy oar
#

That tutorial is partially wrong

kind crow
#

Is there a way to restore broken end portals?

sturdy oar
#

I think there is

kind crow
#

How can I do that? Are there already any plugins that do this?

karmic sable
#

Hey folks
There used to be a way to cancel chunkUnloadEvent, what's the 1.15.2 alternative?

#

How can I do that? Are there already any plugins that do this?
@kind crow Manually recreate them?

bold anchor
#

Not doing it

#

Use plugin tickets

kind crow
#

@kind crow Manually recreate them?
@karmic sable it's not the solution. There are too many portals and they got constantly destroyed

karmic sable
#

Well you could
a) prevent them from being destroyed with worldguard
b) roll them back with coreprotect
c) have them fixed on a fixed time daily/hourly/...

#

Hey folks
There used to be a way to cancel chunkUnloadEvent, what's the 1.15.2 alternative?
@karmic sable

Tag me if anyone knows :)
I just want a certain area (in a void world with only one structure) to never unload.

kind crow
#

Well you could
a) prevent them from being destroyed with worldguard
b) roll them back with coreprotect
c) have them fixed on a fixed time daily/hourly/...
@karmic sable c) could be a good solution. But how do I fix them automatically?

karmic sable
#

Rundik code using the world edit API, or get someone to do it for you, you'd need to provide more context though

lilac gorge
#

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerMoveEvent;

public class Move implements Listener {
    
    
    @EventHandler
    public void onPlayerMove(PlayerMoveEvent e) {
        Player player = e.getPlayer();
        if(!player.hasPermission("cmd2.use")) {
            e.setCancelled(true);
        }
    }

}
``` Hey I made this little event to stop players without a permission from moving, and it does not work, im racking my brain here. anyone know why?
sturdy oar
#

Register it

mystic bluff
#

so

karmic sable
#

did you register it in your main tabootwo

mystic bluff
#

i have a question

lilac gorge
#

I really want to slap myself sometimes, I did the register wrong

karmic sable
#
   Bukkit.getPluginManager().registerEvents(new Move(), this);```
#

Ask it MyNameIsEarl

kind crow
#

Rundik code using the world edit API, or get someone to do it for you, you'd need to provide more context though
@karmic sable I have an anarchy server, so it's better to do it automatically without any admins flying around. Can't I do it without worldedit?

lilac gorge
#

the Bukkit has error

jaunty night
#

is it possible to modify a static final field that's not a primitive type?

marsh hawk
#

you cant modify a final field

jaunty night
#

using reflection

karmic sable
#

@karmic sable I have an anarchy server, so it's better to do it automatically without any admins flying around. Can't I do it without worldedit?
@kind crow no no no, if you code it using the api, then you don't need any players to do it..., it would be a plugin

marsh hawk
#

Uh with reflection, yes i believe so

lilac gorge
#

got it nvm

mystic bluff
#

can you run a minecraft server on... wait a minute let me get it

karmic sable
#

Wtf I got auto warned for quoting too many people

mystic bluff
marsh hawk
#

wot

mystic bluff
#

lmao

#

dont bulli im not smart

marsh hawk
#

you can host a server on any machine with an os

#

that supports java

karmic sable
#

yes mynameisearl you can host a server on something as small as a raspberry pi, the only question is whats the size of the server, howmuchwould it need to be able to take

jaunty night
#

Yeah cause I'm having issues modifying a static final field through reflection. I checked through my debugger that the code that made it accesible and "not final" worked but when I go to set it I get an IllegalAccessException

marsh hawk
#

can't just give a picture of a tower then assume we know what it is lol

kind crow
#

@kind crow no no no, if you code it using the api, then you don't need any players to do it..., it would be a plugin
@karmic sable yes, I understand that. But having no dependencies would be much better I think (worldedit isn't a lightweight dependency either)

mystic bluff
#

so a literal server tower

jaunty night
#
    public static void makeAccessible(Field field) throws NoSuchFieldException, IllegalAccessException {
        field.setAccessible(true);
        Field modifiersField = Field.class.getDeclaredField("modifiers");
        modifiersField.setAccessible(true);
        modifiersField.setInt(field, field.getModifiers() & ~ Modifier.FINAL);
    }
#

this is the code which makes it accesible

mystic bluff
#

what is a good hosting site

karmic sable
#

Rundik if its for your custom server, why not use dependenies, I do it sometimes its just easier..

Could do it without dependency, story a copy of the area in a file; and replace it with the copy every few hours but idk might get messy

#

Earl, I use Bisecthosting

marsh hawk
#

@jaunty night is the class your own code

#

why not make it non final

jaunty night
#

No

#

it is not my own code

marsh hawk
#

ah that explains it

kind crow
#

Rundik if its for your custom server, why not use dependenies, I do it sometimes its just easier..

Could do it without dependency, story a copy of the area in a file; and replace it with the copy every few hours but idk might get messy
@karmic sable do I store it as .schematic? Can I place schematics on vanilla spigot actually? I don't think I can, I need a plugin for that too

karmic sable
#

if your structure isnt too big you can just storethe blocks individually
But ye with worldedit you can place schematics, I don't see why you wouldnt use a dependency

marsh hawk
#

oh @jaunty night i believe you get "accessFlags"

#

instead of modifiers

jaunty night
#

hmh

kind crow
#

if your structure isnt too big you can just storethe blocks individually
But ye with worldedit you can place schematics, I don't see why you wouldnt use a dependency
@karmic sable it's just 3x3 area of end portal blocks

mystic bluff
#

what is a good hosting site

jaunty night
#

I'll try it, although that code works on other fields just not that one

marsh hawk
#

hm strange

#

@mystic bluff depends, do you want dedicated machines, vps, what location?

kind crow
#

Ok, thanks for helping @karmic sable

jaunty night
#

and one that's also static final, and I'm even doing something that's more hacky 🤷

marsh hawk
#

just out of curiosity what is the variable for

mystic bluff
#

uh idk im new to this

marsh hawk
#

surely theres some workaround

mystic bluff
#

rn i use aternos lmao

karmic sable
#

Goodluck with it Rundik
but uhm
if its litterally just the 3x3 portal area, then I suggest you don't even make the copy and just forcefully replace the blocks with the correct ones to "repair" every now and then, I'm guessing its just the portal blocks

jaunty night
#

AttributeDefaults.b

marsh hawk
#

@mystic bluff how big of a server do you plan on hosting

jaunty night
#

that's the value I'm modifying

mystic bluff
#

um like 100-200 people for now

#

maybe less

marsh hawk
#

alright so 20 people

#

us?

mystic bluff
#

yes

karmic sable
#

Do you already have that playerbase, MyNameIsEarl? If not, then I suggest starting smaller and upgrading your host as you move along

marsh hawk
#

I hear pebblehost is really good

#

@karmic sable that's why i said 20 players lol

#

realistically it will take a year to even get 50 concurrent players

mystic bluff
#

i have about 10 people rn

kind crow
#

I got 50 concurrent players in a month from scratch with almost no ad ;)

jaunty night
#

The value is in an ImmutableMap I'm modifying so perhaps I can do a workaround by getting the ImmutableMap and just force add the new values through more reflection

karmic sable
#
    @EventHandler
    public void onChunkUnload(ChunkUnloadEvent e) {
        if (e.getChunk().getWorld().getName().equals("test"))
            e.getChunk().load();
    }``` 

To go back on my own question from before: would this work to keep the chunk from unloading?
mystic bluff
#

how

#

@kind crow

kind crow
#

Just did what people wanted that didn't exist already

mystic bluff
#

ah

#

thats what ive been doing lol

bold anchor
#

Don’t do that smh

mystic bluff
#

about 3-4 days

marsh hawk
#

there is no e.getChunk function

karmic sable
#

That's weird because I didn't make that up, I'm on 1.15 not 1.16

jaunty night
bold anchor
#

There is

#

Lol

marsh hawk
#

oh lma

#

o

karmic sable
marsh hawk
#

im blind

bold anchor
#

Just use plugin tickets

karmic sable
#

JanTuck I don't knowwhat that is, and googling it didnt give me what you meant

kind crow
#

Is it possible to make spigot server without any worlds and just send players custom packets?

mystic bluff
#

so what serverhosting website lol

#

bc i dont wanna run it on my pc

jaunty night
#

Is it possible to make spigot server without any worlds and just send players custom packets?
@kind crow Theoritcally yes, technically would be quite hard to do

karmic sable
#

MyNameIsEarl people, including me, have been suggestign a few already ..

mystic bluff
#

where?

karmic sable
#

In this chat ...

mystic bluff
#

can you quote it?

sturdy oar
#

so what serverhosting website lol
@mystic bluff I suggest MelonCube

#

I use it myself

karmic sable
#

Thank you @bold anchor

mystic bluff
#

okay thanks

#

@sturdy oar can i get the ip in dms?

sturdy oar
#

IP?

#

You mean domain

kind crow
#

@kind crow Theoritcally yes, technically would be quite hard to do
@jaunty night I have plugins that work with chat, but I want to send custom packets about the world

mystic bluff
#

sure

marsh hawk
#

is that hard to google

mystic bluff
#

i mean like

#

the server ip

jaunty night
#

It's much easier to deal with chat packets then send entire worlds through packets

#

I've seen servers generate temporary structers using packets

#

wyncraft being one example

#

but entire worlds is gonna be quite the technical feat

marsh hawk
#

Anyone know if .schem files hold nbt & tile data or just block type and pos?

kind crow
#

It's much easier to deal with chat packets then send entire worlds through packets
@jaunty night I already did that with javascript anmost from scratch, but I really need that spigot plugins, so I'm doing it in spigot

#

It's just empty world packets

jaunty night
#

What is your end goal here

#

like what are you planning to use this "no-world" spigot server for

kind crow
#

As an auth server

sturdy oar
#

Use void world and disable nether and end

mystic bluff
#

2gb of ram is enough?

sturdy oar
#

For what

mystic bluff
#

server

dusky sigil
#

why is this not working? ```import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin implements Listener{

public void onEnable() {
    this.getServer().getPluginManager().registerEvents(this, this);
}

public void onMove(PlayerMoveEvent event) {
    Player MovingP = event.getPlayer();
    Location loc = MovingP.getPlayer().getLocation().clone().subtract(0, 1, 0);
    Block blockOn = loc.getBlock();
    String blockOnS = blockOn.toString();
    MovingP.sendMessage(blockOnS);
}

}```

karmic sable
#

@bold anchor
Just to check:
I have a nested forloop, one iterating over an x value, and one over an y value, and for each x y value it would then call

                stronghold.addPluginChunkTicket((x+x1), (z+z1), CiviliaFAQ.getInstance());

I alreay had the for loops for a different purpose, they only run once during the onEnable to initialise an enum, would this be good enough to keep the chunks of this area loaded?

dusky sigil
#

its registering the plugin but doesnt send the message

kind crow
#

Use void world and disable nether and end
@sturdy oar I actually want end skybox and that's what I'm currently using. But having no world would be better, because sometimes players stay in the world after logging in and can move around

karmic sable
#

its registering the plugin but doesnt send the message
@dusky sigil add @EventListener above the event

mystic bluff
#

is this ok

dusky sigil
#

@karmic sable how does this always happen?

#

bruh

karmic sable
#

Rundik you can do a hacky workaround: generate void world with multiverse, you can choose the skybox (for example end or nether) and have a protected glass box or something where players cant get out

kind crow
#

@mystic bluff I suggest using vps, it would be cheaper and you can customize more

marsh hawk
#

for a beginner though

mystic bluff
#

i just want a semi vanilla server lmao

marsh hawk
#

buying a vps means you have to learn some sysadmin, security etc

#

theres a premium to mc hosts but i think its worth it for beginners

sturdy oar
#

Shared hosting is just easier for noobs

#

I use it as well there's nothing wrong

kind crow
#

buying a vps means you have to learn some sysadmin, security etc
@marsh hawk he looks like typical sysadmin from his avatar 😆

mystic bluff
#

its a tv show lmao

kind crow
#

Rundik you can do a hacky workaround: generate void world with multiverse, you can choose the skybox (for example end or nether) and have a protected glass box or something where players cant get out
@karmic sable no that's not what I want. I want also to minimize the performance impact from this server

karmic sable
#

Rundik may I ask what the concept or context is? Seems rather shady :p

kind crow
#

And. Ppl are in spectator mode there anyway

stark oxide
#

What does Bukkit.createInventory do with the owner passed as the first argument? I know that it doesn't need to be the actual InventoryHolder the inventory is opened for, and it can even be null. So what is its actual purpose?

mystic bluff
#

brrrrr

#

should i pay annually or what

kind crow
#

Rundik may I ask what the concept or context is? Seems rather shady :p
@karmic sable just an auth server. I know it doesn't have much impact as it is, but I would sleep better knowing I optimized it the best I could 😆

#

should i pay annually or what
@mystic bluff better monthly in case you want to switch server or something

mystic bluff
#

smart

#

ok

#

it will cost more but idc lol

mellow wave
#

How you pay is up to you

mystic bluff
#

10 total bc 6 for server and 4 for other stuff

#

so thats good ig

mellow wave
#

Anyway the amount of ram required depends on how many plugins and players you're expecting

kind crow
#

I switched hosting 3 times in two months so I wouldn't suggest paying annually

mystic bluff
#

^ok

visual berry
#

if I concat a ChatColor.DARK_BLUE (for example) to a ChatColor.RESET, the final text should be white, right?

karmic sable
#

yes

frigid ember
bold anchor
#

Yep

#

Plugin.yml is incorrect

frigid ember
#

spaces ?

#

@bold anchor how ?

opal heron
#

Is there any way to hook up EssentialsX's AFK System to a world?

#

its basically just when you go afk you get sent to an afk room

dusky sigil
#

so im doing this:new BukkitRunnable() { @Override public void run() { nowAir.setType(Material.AIR); } }.runTaskLater(this, 1);. Now, I switch from 1 to 30 and it makes 0 difference. It really feels the same, No more or less delay. Now, If i recall correctly, 20 ticks is a secend, so I shouldve felt this, but it isnt working!

bold anchor
#

??

dusky sigil
#

what do you mean by ??

#

this new BukkitRunnable() { @Override public void run() { nowAir.setType(Material.AIR); } }.runTaskLater(this, 1); feels the same from this new BukkitRunnable() { @Override public void run() { nowAir.setType(Material.AIR); } }.runTaskLater(this, 30);

#

wait

#

am i looping it?

#

OHHH

#

i should break

mellow wave
#

There are multiple ways to handle this. Here are 2 that I can think of

  1. You can read ItemMeta such as the DisplayName and lore
  2. You can also use NMS to read raw NBT tags
#

@frigid ember ^

dusky sigil
#

or rather return

mellow wave
#

If you want to add data it's ItemStack#setItemMeta and some NMS methods repectivly

burnt bay
#

Hey guys how do I make a custom itemstack?

So like an emerald with a custom name and the enchanted effect?

rare prairie
#

ItemStack#getItemMeta

coral tide
#

ItemStack item = new ItemStack(Material.EMERALD)

#

ItemMeta itemMeta = item.getItemMeta()

#

ItemMeta.setDisplayName(”custom name”)

#

Then i think you can do like ItemMeta.enchanted == true or something

burnt bay
#

Can I use colour codes in the name?

rare prairie
#

yes

coral tide
#

Yeah if you type ChatColor.translate something i don’t remember

burnt bay
#

Thanks a lot guys

coral tide
#

Also after all that item.setItemMeta(ItemMeta)

jaunty night
#

How would one inject a custom entity into AttributeDefaults

#

I keep trying to replace AttributeDefaults.b using reflection but I keep getting an IllegalAccessException, I've already wrote code which modifies the fields modifiers to make it not final and I confirmed with a debugger that it worked and I honestly don't know what the f... is going on

#

The code I use works with other static final fields but not this one

#

and It's not a primitive type either, even if that was the case it would throw an IllegalArgumentException not a IllegalAccessException...

#

I'm honestly contemplating just writing a spigot fork just to expose AttributeDefaults.b and make it mutable so I don't have to put up with this bs

quasi hornet
#

how do you make it possible to create notes

kind crow
#

How can I kill all zombies in the nether but keep the ones from overworld?

rare prairie
#
for (Entity z : Bukkit.getWorld("nether").getEntities()) {
  if (z instanceof Zombie) {
    //kill code
  }
}
#

or with command?

undone narwhal
#

how do you make it possible to create notes
@quasi hornet Notes?

kind crow
#
for (Entity z : Bukkit.getWorld("nether").getEntities()) {
  if (z instanceof Zombie) {
    //kill code
  }
}

@rare prairie thanks, that would work

quasi hornet
#

wrong server

kind crow
#

or with command?
@rare prairie it would be better, but I don't think it's possible in 1.12

undone narwhal
#

Does someone know how to generate a circle area that merges to the existing world? (screenshot)

rare prairie
#

why not