#help-archived

1 messages · Page 113 of 1

buoyant path
#

um

#

how can I find the bytes needed?

tiny dagger
#

i dunno search on spigot

#

i think it had material data

#

or something like that tho

buoyant path
#
public static BlockFace setSignFacing(Block b, , BlockFace face){
  if(!(b.getState() instanceof org.bukkit.block.Sign))return;
org.bukkit.block.Sign sign = (org.bukkit.block.Sign) b.getState();
        if (sign.getBlockData() instanceof org.bukkit.block.data.type.WallSign) {
            org.bukkit.block.data.type.WallSign signData = (org.bukkit.block.data.type.WallSign) sign.getBlockData();
            signData.setFacing(face);
            sign.setBlockData(signData);
            b.setBlockData(sign.getBlockData());
            sign.update();
        }```
#

found this

#

Idk if its right?

tiny dagger
#

1.12+ i think

buoyant path
#

Rip lmao

tiny dagger
#

because there wasn't blockdata before

wind dock
#

do you guys recommend skript?

buoyant path
#

Nah just learn java

tawdry venture
#

Is there a method for checking if current thread sync or async? Like the Swing isEventDispatchThread

buoyant path
#

@tiny dagger Yeah i set the material data but none of them work unless its 2

#

and 2 is north

#

so

#

well I fixed it with just block data

#

thats cool lmao

umbral shoal
#

anyone familiar with bedwars?

#

if so, does anyone know how to fix this annoying issue that only 1 person can pickup items from the gen at the same time

vagrant tiger
#

If I forgot my password and also forgot my email

#

How tf do I login?

#

@subtle blade

subtle blade
#

How do you forget your email? lol

vagrant tiger
#

Because I only used my username

#

would you be able to help me

#

I have multiple emails I use to create accounts

subtle blade
#

So try each one

vagrant tiger
#

I tried

subtle blade
#

There's a forgot password button as well last I recall

vagrant tiger
#

Yeah but I don't know which email it sent too

subtle blade
#

don't tell me you forgot the passwords to your email accounts too lol

vagrant tiger
#

No

#

I know that

#

But I have all my passwords saved on firefox

#

And it hasn't been working for 13 weeks

#

Could you see what email the account is assigned too?

umbral shoal
#

if so, does anyone know how to fix this annoying issue that only 1 person can pickup items from the gen at the same time
oh ans also i forgot to mention but if you know a fix please feel free to tag me.
thank you :>

strange grove
#

does anyone know how to access something thru a diffrent public?

#

and i want to know how to access an entity thru there

#

so it would be much appreacciated if someone could aid in my quest

#

hello?

#

@anyone?

#

plz respond

#

this is needed

#

😐

frigid ember
#

Hey guys, which one is better?

    private List<ItemStack> soldItems;
    this.soldItems = new ArrayList<>();

or

    private List<ItemStack> soldItems;
    this.soldItems = new ArrayList<ItemStack>();
subtle blade
#

private List<ItemStack> sold = new ArrayList<>();

#

The type argument is inferred by the compiler as of Java 7. Specifying it twice is redundant.

#

In fact, your IDE should warn you if you are doing that lol

paper compass
#

Is there a possible way to check if the player pressed “Q” on their keyboard without a item in their hand

subtle blade
#

No. Key binds are not sent to the server, only the result of said keybinds

#

i.e. Q isn't sent, drop item is sent

still timber
#

@tawdry venture if (Thread.currentThread().getName().equals("Server thread"))

paper compass
#

I know but I thought since Q is for drop item you know

subtle blade
#

If you have no item in hand, it won't send a packet to the server requesting to drop something

paper compass
#

Okay thanks

subtle blade
#

Quantum that's definitely not the way to go lol

paper compass
#

Chocolate is the best person

still timber
#

eh no one responded to him so I thought I would give it a shot

subtle blade
#

Only way to check for threadedness would be in an event and checking if it's async

#

(Event#isAsync())

still timber
#

is there something wrong with my method?

subtle blade
#

Just not accurate nor is it ever a great idea to compare against a thread name for logic

still timber
#

how is it not accurate exactly?

subtle blade
#

Minecraft isn't single threaded in that it has just one thread. World generation for instance runs on another set of threads last I recall while still technically being a blocking operation

#

If I'm not mistaken, they're still part of the server thread

still timber
#

anything that is not running on the server thread is considered async to my understanding

#

for example it would not be safe to access any part of the non-thread safe api from one of those worldgen threads

paper compass
#

Any way for me to check delay between space bar presses whilst on an entity with ProtocolLib? I’m guessing I store a systemtimecurrentmillis in a hashmap and when they press it again check if they are in the hashmap and then compare if curenttimemilis - hasmapvalue <= 500 then do my code?

#

Wait did I just answer my own question

still timber
#

now is there a good use case for checking if the current thread is the server thread? probably not

#

maybe if you are a library it could be useful for checking if other plugins are using your api correctly, as spigot does itself

sullen mango
#

hello, I have a problem with the menus we can duplicate items do you know how to fix this?

paper compass
#

Hey me chocolate did I answer my own question? o-o

still timber
subtle blade
#

It doesn't compare against name ;P

still timber
#

true

paper compass
#

@subtle blade did I answer my own question above?

subtle blade
#

Yea pretty much

still timber
#

that's a pretty abstract question

#

I feel like only you can know if you have a satisfactory answer

paper compass
#

Wow I’m so smart but stupid at the same time

frigid ember
#

So i had to use a backup of my world because the normal version got corrupted somehow, but the seed wasn't saved.

When i do /seed it says 0

I know the seed, but idk how to insert it because only the chunks loaded in the backup are able to be seen

chrome lark
#

Bukkit.isPrimaryThread exists too, but, some level of odd behavior there last I recall

subtle blade
#

Ah, that's the method I was trying to think of

still timber
#

but all threads are the primary thread if the console is stopped?

subtle blade
#

I knew there was one and I was trying to look for it in the docs but couldn't find it lol

still timber
#

that's questionable

chrome lark
#

Yea, that's the "odd behavior" aspect

still timber
#

I wonder when console.isStopped is true

#

after plugins are disabled I'm guessing

chrome lark
#

during shutdown

#

common bad area is during a watchdog crash

#

I know that I used to see many issues with deadlocking in a watchdog timeout due to that caveat

still timber
#

I'm not sure why "All bets are off" should mean "return true"

#

why are people using that method anyway

#

I'm still not seeing a super practical use case

chrome lark
#

A common example is code which needs to be ran on the main thread

#

If primary thread, run, else, use the scheduler

still timber
#

so you want to have a sort of thread safe api even though it's not really thread safe

#

seems a little counterproductive to me

chrome lark
#

Not really aiming at "thread safe API"

#

It's more for dealing with cases where code may be called from another thread, and you need to determine if you're on the correct thread for that

opal marsh
#

any existing solution for pushing resource updates to spigotmc programmatically? I'm looking to incorporate it into a github action pipeline

paper compass
#

Nerd

opal marsh
#

yes

#

I did some looking around and I didn't find anything so I'll probably just make my own

chrome lark
#

spigot forbids automated access to the site

#

beyond that, it's just the xenforo resource manager

opal marsh
#

is there a rule that specifies that? I checked prior to asking and I only saw that automated access to forums wasn't allowed

golden vault
#

The resource manager is part of the forums.

visual wing
#

Seems like the bleeding effect in MCMMO plugin is affecting sweeping edge in a way so that it only works when the bleeding effect stops. Anyway around this?

zinc basin
#

got the same forum bug from 5 years ago again where publishing a resource update gives me a 500 error...been doing this too long lol

opal marsh
#

any reason for the 500 in particular? is it a cloudflare problem?

zinc basin
#

it's a "xenforo loading tens of thousands of profiles in their entirety all at once" problem

opal marsh
#

also hell yea goat pfp gang rise up

visual wing
#

Seems like the bleeding effect in MCMMO plugin is affecting sweeping edge in a way so that it only works when the bleeding effect stops. Anyway around this?

worn temple
#

disable the bleeding effect? contact the dev?

visual wing
#

How do I contact a dev? Sorry I was referred to the server so I'm new @worn temple

worn temple
#

contact the dev of mcmmo. No idea why you were referred here

visual wing
#

Lol idk why either, I told him it would be no use. Thank you for your time

lyric dagger
#

Every time I try to join my local hosted server I get this error

chrome lark
#

if sweeping edge relies on the attack timers, then that would prooobably be why

lyric dagger
#

Is the error player location related?

chrome lark
#

that's generally down to plugins hooking in the networking stuff throwing exceptions

lyric dagger
#

Ive removed all plugins to debug and I still get the error

chrome lark
#

You'd need to enable debug logging then

lyric dagger
#

Spigot.yml right?

#
  debug: true```
chrome lark
#

it was either in there or the one in server.properties

lyric dagger
#

Ive enabled both

chrome lark
#

ah, yea, one in spigot.yml should do it, it flips the logger level

lyric dagger
frigid ember
#

I just had a question, since Snapshot 20w17a has been released, how close can we get to color-precision? I'm assuming just about nearly anything since they release RGB values such #xxxxx <- corresponding to whatever color you choose.

#

Now with precision would achieve live-videos via Item Frames + Maps in the latest snapshot be logically speaking possible? Because I know you can assert pictures, and gifs; how about a possible live-video for example displaying a twitch stream in Minecraft via Frames + Maps?

opal marsh
#

as far as I'm aware, the rgb changes apply only to the chat protocol

fleet crane
#

yeah

frigid ember
#

Hey md_5, general question here

#

Instead of me reflecting into every net.minecraft class while working with nms & just “guessing” what a .a() method does, is there a better way to do this?

#

Surely Bukkit & Spigot teams, and yourself for example, didn’t waste hundreds of hours just guessing your way to the products that exist now

lyric dagger
#

Wait so the RGB would only be possible in Chat? No Holograms, Scoreboards, Menu Titles, etc? 🤦‍♂️ 😭

plush river
#

still a neat addition

lyric dagger
#

I mean sorta... Kinda ruined the hype. I was hoping to make cool Hologram Gradients, Item Name Gradients, Lore Gradients, etc.

#

Properly coloring each letter can make a neat gradient effect.

plush river
#

true, I'm sure there will be some very cool additions when this comes out

#

like better chat coloring

#

so we have more colors available for formatting purposes

opal marsh
#

no, despite being called "chat", the protocol applies to multiple text-based game elements: https://wiki.vg/Chat

frigid ember
#

Hello, so I have this int array

int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
        25, 26, 27, 28, 29, 30, 31 }

Is there a way besides using loops that I can just fill up all the values 1-31?

opal marsh
#

a loop is your best bet. is there a reason you're avoiding one?

frigid ember
#

No reason, just wondering if there was a way like int[] { 1-31}

upper hearth
#

You just want a shorter way?

frigid ember
#

I just wanted to know if there was a better way

#

Like something built into java already that I could use

upper hearth
#

forEach I guess?

#

Would be shorter but not really better.

frigid ember
#

@upper hearth like there is a ```java
Arrays.fill(arr, 18);

upper hearth
#

What are you trying to do? Wdym "fill up all the values"

frigid ember
#

I'm trying to fill it up with the values 1 - 31

#

So the final product looks like this

int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
        25, 26, 27, 28, 29, 30, 31 }
upper hearth
#

Oh you said you "had this array"

#

So I thought you were working with it lol

#

Why are you working with Arrays anyways, why not Lists?

frigid ember
#
    int[] array = Ints.toArray(ContiguousSet.create(Range.closed(1, 31), DiscreteDomain.integers()));

I've found the solution

#
12345678910111213141516171819202122232425262728293031
18 milliseconds12345678910111213141516171819202122232425262728293031323334
0 milliseconds

Why am I getting this output when I do this?

    public static void main(String args[]) {
    StopWatch stopWatch = new StopWatch();
    stopWatch.start();
    
    int[] array = Ints.toArray(ContiguousSet.create(Range.closed(1, 31), DiscreteDomain.integers()));
    
    for (int i : array) {
        System.out.print(i);
    }
    
    stopWatch.stop();
    System.out.print("\n" + stopWatch.getTime() + " milliseconds");
    
    StopWatch s = new StopWatch();
    s.start();
    
    int[] sd = Ints.toArray(ContiguousSet.create(Range.closed(1, 34), DiscreteDomain.integers()));
    
    for (int sf : sd) {
        System.out.print(sf);
    }
    
    s.stop();
    System.out.print("\n" + s.getTime() + " milliseconds");
    }
#

It says the second one took 0 milliseconds

worn temple
#

Caching

#

First one will take a bit because it's creating each object, in the second run it's just using the cache. Welcome to Javas amazing caching system (that's not even sarcastic, it's great)

frigid ember
#

Alright, thanks

opal marsh
#

anything that doesn't get rounded down to 0ms is an insanely long time for populating a simple array

#

please, just use a loop, I beg you

#

if your use case really is this simple, there is no better way

proper cairn
#

is there a way to debug your code when using the Spigot API

tidal mica
#

Guys, i have a simple question:
Can a cheat client edit the value of the player.getVelocity()?

keen compass
#

they can't directly edit the value per-say but the client can tell the server their velocity and if its within reasonable values the server will accept it

red zenith
#

So instead of the server validating all client requests and maintaining full control over the player’s state, it just uses loose constraints?

calm snow
#

what is the community convention for naming a second player variable?

bronze marten
#

p2

hot girder
#

idk

#

no

red zenith
#

In what context? Source, target?

hot girder
#

"target" if the player is target(?

calm snow
#

yep

hot girder
#

that

red zenith
#

Sender and Receiver

calm snow
#

that is what i was looking for

#

thanks

floral isle
#

hi guys i have a question there a method for fast convert old minecraft ids?

red zenith
#

Are you talking about data in a world or how you refer to items ?in code

floral isle
#

no block ids

hot girder
#

1.8+

#

no ids

red zenith
#

What version are you going from -> to?

floral isle
#

1.15.2

red zenith
#

From which version?

floral isle
#

1.12.2

#

the project is a world generator i have forked that from terraincontroll but is for 1.12 i want to rewrite to 1.15.2

#

you can see here

undone narwhal
#

I know a lib which is just awesome

red zenith
#

There are different ways you can manage that, it just depends upon how specific your code is

undone narwhal
#

XMaterial

hot girder
#

MaterialLib

#

i think

undone narwhal
#

XMaterial allows you to convert id / name for both versions

floral isle
#

and for nms?

#

because use nms code

red zenith
#

Doesn’t mojang provide some kind of api for conversion?

floral isle
#

no because mojang are stupid xd

hot girder
#

haha

undone narwhal
#

How do you use NMS ? (Can't you do a CraftItemStack#asNMSCopy ?)

hot girder
#

In my plugins, i use a "BlockManager" or something like that

#

and implement it

floral isle
#

is a world generator i use class CraftWorld

hot girder
#

for all versions

undone narwhal
#

Oh damn, you'll have to remake it so

hot girder
#

BlockManagerV1_8

undone narwhal
#

I think

hot girder
#

So, the plugin never interacts directly with Materials

#

setBlocks

floral isle
#

if you see the code you can understand

#

and sorry for my english i dont speak it very well

red zenith
#

I thought there were some pretty significant changes with all of that in 1.14; the generation that is?

opal bay
#

i miss block ids

undone narwhal
#

Are you French?

red zenith
#

That appears to reference block ids and data

floral isle
#

and when i configuarate the .bo3 files i can use the new blocks

#

ok but the nms conversion

sturdy oar
#

i miss block ids
@opal bay what the hell

opal bay
#

no

red zenith
#

block ids were a nightmare, just wish they'd done it a while ago, the conversion was a mess.

opal bay
#

that's true

hoary parcel
#

Thankfully that was years ago and everynody adopted by now

#

Right?

#

Right?!

opal bay
#

heheheh

#

sure

sturdy oar
#

md_5 do you have an idea of when the entire legacy system will be removed from Spigot

hoary parcel
#

When all plugins updated 😂

red zenith
#

August 9th, 05:14:36.3334 GMT 2020

hoary parcel
#

Uuhm

#

Wait

paper ridge
#

Hello, I have a question, I need to get all commands on the server, default and custom, anybody know how to get it except in spigot.yml, 🙂

sturdy oar
#

CommandMap

keen compass
#

That will get you all the commands registered, will have to do a bit more if you want to also get subcommands as well

#

but, should work for your purposes 😉

sturdy oar
#

I don't think you can look subcommands

#

Expecially considering how many plugins handle them

keen compass
#

yeah, will need some voodoo reflection stuff to do it

hoary parcel
#

There is no concept of subcommands in bukkit

#

Cause that would be too easy to work with

#

Bukkit only registers root command literals into brigadier

sturdy oar
#

How the hell does ACF register subcommands

red zenith
#

I have a multi-module maven project, which I think I've configured improperly.
I have separate modules for each mc version, a core module which is used by each of the mc modules and a dist module which bundles the core/mc modules into one jar.
Whenever I run mvn install - I have to install core, then the mc modules then the dist, otherwise the changes I've made to my code aren't included in the dist jar.
Should I be setting the scope for the core module in the pom for each mc module as compiled?
Currently I have the scope set to 'provided'.

kind crow
#

Does anyone run spigot/bungeecord servers in tmux? How can I keep all the servers automatically start when stopped? I mean start single server if it's stopped or the tmux session if it doesn't exist. I mean, I know how to do it, but maybe someone has a perfect setup prooven over the years

keen compass
#

well for screen it is relatively simple

ps aux |grep -F -v grep|grep -F -v SCREEN|grep -F --quiet $JARFILE
#

maybe can modify that for tmux

kind crow
#

I don't think I can do the same with tmux

red zenith
#

hallelujah, seems like I've sorted out that build issue, and now per player tab list is working with the per player sidebar scoreboard

kind crow
#

Or maybe I can, but how do I restart single servers inside the tmux session

#

Just a simple while true?

red zenith
#

maybe create a service? what distro are you using?

kind crow
#

maybe create a service? what distro are you using?
@red zenith ubuntu 18. So it's systemctl

pearl pawn
#

how to make multiple help lines ( i mean # ) in the spigot config

red zenith
obsidian belfry
#

can i have help from a staff member that will help me

#

@mild nest ?

cerulean musk
#

guys how can i disbale world join quit messages ? for bungeecoord

bitter tendon
#

What is the best way to log to console and having the ability to use colors?

umbral shoal
#

Log console?

bitter tendon
#

*print to console

umbral shoal
#

log what to console

#

I mean, you can use ProtocolLib

bitter tendon
#

Colored text

#

Let's say ChatColor.GOLD + "[warning] " + message

pearl pawn
#

Let's say ChatColor.GOLD + "[warning] " + message
@bitter tendon getLogger.warning(Chatcolor.GOLD + 'variable of message or message')

knotty karma
#

I have a Vanilla structure, and I am able to load and paste it with NMS, but I cannot seem to get its dimensions. Here's what I'm trying: ```java
private double[] dimension;
public DefinedStructure structure;
/**

  • Load a structure from a packaged NBT structure file.
  • @param name - The structure name
  • @param permutation - the permutation of the structure to fetch
  • @return NMSStructure - The structure object
    /
    public NMSStructure(String name, int permutation) throws IOException {
    DefinedStructure structure = new DefinedStructure();
    structure.b(NBTCompressedStreamTools.a(main.getResource("struc/" + name + "/" + name + "_" + permutation + ".nbt"))); //Load structure from packaged NBT file in /struc/
    /*.nbt
    this.structure = structure;
    NBTTagCompound tag = structure.a(new NBTTagCompound());
    this.dimension = new double[] { tag.getList("size", 3).h(0), tag.getList("size", 3).h(1), tag.getList("size", 3).h(2) };
    }```

I just get all zeroes in dimension...
If anyone here is familiar with NMS, what am I doing wrong?

bitter tendon
#

Alright, thanks @pearl pawn I will try

#

@pearl pawn It works, but no color: It shows º where the color is

bronze marten
#

it depends highly on what terminal it is

#

some may support colors some may not

#

or what logging software

pearl pawn
#

Alright, thanks @pearl pawn I will try
@bitter tendon you should learn java first and also it depends by the cmd that you are using

#

i know that color on cmd works on 1.12+

#

i don't know on 1.8

bitter tendon
#

@pearl pawn um... I do have other plugins that print color to console

#

So it is possible

pearl pawn
#

@pearl pawn um... I do have other plugins that print color to console
@bitter tendon --log-strip-color in your start

#

after you declared the server file name

#

like:

java -Xms1g -Xmx1g -jar server.jar --log-strip-color

bitter tendon
#

In the .bat?

#

I can see colors, I just don't know how to print them

keen compass
fair abyss
#

Suggestion: try to use powershell for utf and colors

#

Dont remember which but in one of version you can combine red "ş ı ğ" message to console

sturdy oar
#

Ajaj powershell bad

pearl pawn
#

i use Hyper or the new Winows Terminal

kind crow
knotty karma
#

Does anybody know how to fetch an item from an NBTTagList

#

NVM, figured it out..

#

the function is e() not h()

kind crow
frigid ember
#

Staff I'd like to report a user for making false claims, threatening to dmca..

#

Also they stole their whole plugin

#

See sunny two can play at this game

fossil shoal
#

That's not the place to do so

frigid ember
#

Then he shouldnt bring external things here

#

¯\_(ツ)_/¯

fossil shoal
#

Who is "he"?

flat valley
#

hi. i'm making a gui shop.
i want to disable drag and drop only in the gui i made. not in other guis.
is it possible...?

public class GUITesting implements Listener {
    @EventHandler
    public void GUITest(PlayerDropItemEvent event) {
        Inventory inventory = Bukkit.createInventory(null, 9, "gui testing");
        inventory.setItem(3, new ItemStack(GOLDEN_AXE, 1));
        inventory.setItem(5, new ItemStack(Material.IRON_AXE,1));
        event.getPlayer().openInventory(inventory);
    }

    @EventHandler
    public void CancelInteract(InventoryInteractEvent event) {
        event.setCancelled(true);
    }
}
lucid wasp
#

You can do event.getView().getTitle().equals()

#

You can also compare the clickedinventory to your shop inventory

flat valley
#

ok ill try it. thx

umbral shoal
#

anyone familiar with bedwars?
if so, does anyone know how to fix this annoying issue that only 1 person can pickup items from the gen at the same time

Seriously, all help would be greatly appreciated as this is literally the only reason i wont be able to publish my server :(

tiny dagger
#

i made a bedwars plugin and i never had that issue

#

unless you mean like in everyone from the team in the radius picks up the same item

frigid ember
#

in hypixel; four of us stand on the gen and only one of us picks it up (most of the time) until they move away

ripe ledge
#

What is a maven project?

tiny dagger
#

wait, is that different?

#

i thought everyone picked one

#

||test for me||

queen lance
#

||test for me||
@tiny dagger

torn robin
#

quick question how do bit masks work

#

eg:

0x01    On Fire
0x02    Crouched
0x04    Unused (previously riding)
0x08    Sprinting
0x10    Swimming
0x20    Invisible
0x40    Glowing effect
0x80    Flying with elytra
#

would (0x01 | 0x02) result in a bit mask that would make the player appear on fire and crouched?

#

if not, how can I combine two bits to match what I expect?

bronze marten
#

from the looks of it, I think so

#

I think they are flag bits for each state

#

just performing an or on all the flags you want would I guess do the trick, but you can easily check no?

torn robin
#

yeah I'll have to check

bronze marten
#

00001 on fire
00010 crouched
00100 unused
01000 sprinting
10000 swimming

#

seems to me it would be valid to just or them lol

torn robin
#

yeah i imagine thats how bit masks worked

#

will check later

keen compass
#

@kind crow it creates a screen named mc-survival

#

with a little bit of tweaking you can actually make that service script dynamic and capable of loading up servers without creating additional service scripts 😉

remote ore
#

Hello, I have a problem. I use WorldGuard for my spawn protection but my Builder can not build or break. His name is Dridox98. Here's all the region flag :

dull pike
#

Does anyone know a Plugin where I can have multiple custom join messages when someone joins? So, each join message is different?

kind crow
#

@kind crow it creates a screen named mc-survival
@keen compass I don't think its so easy to switch screens as in tmux. It has fancy tabs and stuff

regal swift
#

if anyone knows how to upload an IntelliJ Project with multiple modules on Github please mention me because i'm having some issues.

bronze wigeon
#

hi

#

so

#

I downlaoded somehting off blkc spigot and i read some stuff about it being pirated content and there being virues, is this true?

#

Im fereaking out rn

#

Please help

#

I dont want to get viruses and pirated content

#

I deleted it

#

but I already like

#

ran it on my server

#

and its been on my pc for like a full week

#

plz help

undone narwhal
#

You downloaded it from where? Black Spigot???

bronze wigeon
#

yes

#

please

#

help

#

I didnt know

undone narwhal
#

Then I hope you'll get a virus. If you want a premium plugin just buy it, not crack it

bronze wigeon
#

i mean it looked kinda shady but i thought it was just a branch of spigot or something

#

@undone narwhal I didnt know it was a premium spigot

#

I literally searched it up

#

and that was first result

regal swift
#

What did you expect from a website like Black Spigot

bronze wigeon
#

I didnt know

#

I only read about it just now

undone narwhal
#

Even in the name 😄

bronze wigeon
#

Im sorry

#

just

#

what do I do

#

please help

#

Ill never do something like this ever again

undone narwhal
#

What's the plugin?

bronze wigeon
#

guishop plus

#

It was uploaded by a staff member

#

but idk

#

if that makes any differenc

undone narwhal
#

Searching Gui shop plus online doesn't give black spigot link

bronze wigeon
#

?

#

I swear

undone narwhal
#

It's the 13rd result

bronze wigeon
#

Uh

#

Idk

#

I swear tho

#

I didnt mean to

#

Im sorry

undone narwhal
#

So what's exactly your problem? You're anti virus said there is a virus ?

bronze wigeon
#

no

#

but

#

I read on reddit

#

and pirated content

#

I just dont want a virus and that stuff

undone narwhal
#

You ran the plugin on a VPS or on your computer?

bronze wigeon
#

my pc

#

I mean for the time I had it it SEEMED to work and do the thing it was meant to do but apparently that doesnt mean its not a virus

#

im scared

regal swift
#

If you don't want a virus on your PC then try to not download stolen/leaked plugins 😂 Black Spigot is also well known for it's third party connection to their servers.

Even so, the chance of getting hacked by a minecraft plugin is a little bit low. If you want to be a little bit more safe then download an antivirus and scan the .jar file with virustotal before you run it on your PC.

Of course the safest way to get a plugin on your hands is from official websites ONLY.

bronze wigeon
#

what are the official websites?

undone narwhal
bronze wigeon
#

thats it?

regal swift
bronze wigeon
#

o ok

#

how about songoda? I downloaded from them once

#

or is it another black spigot website...

tiny dagger
#

it's fine

#

tho people here don't like it too much 👀

regal swift
#

Songoda is fine but personally i never liked it that much.

#

@tiny dagger You read minds ?

bronze wigeon
#

why not?

sturdy oar
#

The timings of songoda's plugins don't say good

bronze wigeon
#

whats wrong with it?

sturdy oar
#

many of the plugins made are known to be badly coded

#

and it's not me who says it

#

but much more intelligent people

bronze wigeon
#

oh

sturdy oar
#

Not to mention i think that they're not even open source

ashen dove
#

Problem: My bossbar only shows 1.0 and 0.8

#
bar.setProgress(ManaManager.getManaOfPlayer(player) / 100);```
tiny dagger
#

use doubles

ashen dove
#

If my mana is for example 80, then it goes empty

tiny dagger
#

100d

#

or f

#

dividing ints will stay ints

regal swift
#

@bronze wigeon
Based on Songoda plugins i never trusted Songoda. Their plugins are 80% decoration and 20% bad coding (idk if anyone else agree with that but this is my opinion)

ashen dove
#

worked, thanks xd

bronze wigeon
#

oh

#

I see :/

hollow thorn
#

how do i make an event happen every tick

#

for turret

frigid ember
#

Schedule a runnable every 50ms or 1L?

hollow thorn
#

how do i do that

undone narwhal
hollow thorn
median swift
#

This is the problem on my Skyblock server

#

Everytime someone is at their island, more than 150 mobs spawn on their island

#

How can I make it less?

heady jolt
#

try limiting mobs per chunk

hollow thorn
#

how do i schedule a task

heady jolt
median swift
#

And how to do that?

pallid turret
#

How would I change the MOTD from a plugin?

#

Also @median swift Those are Entities, not Mobs, Entities can also be items on the ground or other stuff

median swift
#

Then how about the mobs?

vital flume
#

Hello! There would be a problem with my user account. I changed my location but it hasn't been updated on google's site preview. Could something be done about it?

hollow thorn
#

how do i schedule a task which uses bukkit api

frigid ember
#

Bukkit.getScheduler().schedule x

where X is the Type of Task you wish to schedule.

#

or look at the list of possible methods on the SJD

undone narwhal
#

Do you know how to use google ?

hollow thorn
#

Do you know how to use google ?
@undone narwhal no i use bing

#

after reading the anime on google chrome

#

and i couldnt resist using no u

#

how do i set the owner of a projectile

#

Bukkit.getScheduler().schedule x

where X is the Type of Task you wish to schedule.
@frigid ember will it work using the BukkitRunnable

#

thingy

#

.runTaskTImer()

frigid ember
#

What are you trying to do exactly and I'll try and help you out

hollow thorn
#

make a working turret

frigid ember
#

I'm pretty sure several people suggested in the past to not use Bukkit. instead reaching into your Main Class via Singleton or Dependency Injection

Main.get whatever then you can reach into the .getServer() method.

#

in that .getServer() method you're able to schedule an async repeating task.

hollow thorn
#

im using bukkit runnable

frigid ember
#

euanPC are you familiar with OOP?

hollow thorn
#

object oriented programing?

frigid ember
#

Correct.

hollow thorn
#

a bit

#

i know of its history from java gently

#

but i didnt really get to into it

tiny dagger
#

using bukkit is not bad tho :d

hollow thorn
#

and OO stuff i do use

frigid ember
#

Okay good.

hollow thorn
#

also i could use itemframes

frigid ember
#

for what?

#

If you want to create a turret your goal is to essentially schedule a task to spawn an entity / spawnArrow method from the World object and aim it towards your target location.

tiny dagger
#

turret vector substract player location normalize multiply by 2 👀

frigid ember
#

I believe even an easier method would be if the player is riding such turret

hollow thorn
#

for the actual turret

frigid ember
#

player.launchProjectile

hollow thorn
#

does that work with entities

frigid ember
#

I think only stuff which extends the Projectile class

#

You could try though

#

how would i get if a player is collided or on a honey block

#

google, ddg and bing do not help

hollow thorn
#

i guess because the block is smaller than normal

#

you could just get the block at the players location

frigid ember
#

but the block doesnt have a block id

tiny dagger
#

movingblockposition method

hollow thorn
#

and see if the material is = to honey

tiny dagger
#

that's what handles collision

frigid ember
#

kind of stupid

#

its like netherwart, neither have block ids 😦

#

Nethwart has a Block ID

#

115

#

but essentials says no 😔

#

Honey I couldn't find though.

#

what is the movingblockposition?

#

movingobjectposition?

tiny dagger
#

well

#

it's a class

cursive flax
#

Hello, does the "BlockExplodeEvent" event works to detect a block being exploded, or should I use something else ?

tiny dagger
#

that tells whats at that position

#

the entities have 1 method that you can override

#

and do your stuff instead

delicate iron
#

This website only supports 1.12

tiny dagger
#

example

frigid ember
#

Oh

tiny dagger
#

MovingObjectPosition

#

rip

#

i forgot lol

frigid ember
#

if you're over 1.12*

#

that should technically be the handheld item
like why the door block is 64 but the door item is something else

#

or im confused

gusty coyote
#

with bungeecord if i have the firewall set up right i wont need any auth plugins if bungee is online mode?

frigid ember
#

It's always recommended to use Auth plugins for an extra layer regardless lol.

#

Firewalls dont mean your account's secure, it's still good to have it.

edgy pendant
#

Is there any way, to make a spigot Server use less Storage?? without a lot of performace drops

frigid ember
#

There's a ton of ways.

edgy pendant
#

What are my Options?

frigid ember
#

Depends, what your current specifications?

vernal spruce
#

less storage?

#

simply limit the map size

#

and ur good

#

thats the main storage eater

edgy pendant
#

@frigid ember Some Intex Xeon Processor with 96 GB of Ram and a 1 TB SSD (this is already full), cant limit map Size due to Anarcy kinda Server

#

@vernal spruce I know, but I am not able to limit these

vernal spruce
#

then the answer is no..

#

think if its worth keeping that server up first..

edgy pendant
#

Maybe Coreprotect?

#

@vernal spruce Yes it is woth keeping the Server online

vernal spruce
#

its gonna store even more shit

frigid ember
#

It's not a big deal, but do you have good server start parameters?

edgy pendant
#

@vernal spruce I ment delete Coreprotect Data

vernal spruce
#

buy a bigger storage you cant rly downsize a server..

#

check how much the coreprotect data

#

occupys

edgy pendant
#

@vernal spruce But I already have a 1TB SSD, so it is not that easy

hollow thorn
#

you can get a block without using id using block.getMaterial

edgy pendant
#

@vernal spruce over 200GB

hollow thorn
#

also how do i extend a cmd

vernal spruce
#

also why bother using an ssd for that?

#

theyr already just speeding through everything not rly a need to load things faster..

edgy pendant
#

@vernal spruce access times, becasue if not chunkloading is quite slow with 70 Players...

frigid ember
#

Could you tell us why it's full with 1TB? Identify why / what is full about it

vernal spruce
#

well you can delete all that data however keep in mind ur losing things in case of possible exploits

#

another anarchy server..

#

things get messy about them..

edgy pendant
#

@frigid ember Coreprotect over 200GB, rest MapSize

#

@vernal spruce Yes it is really messy, if you dont fix exploits

vernal spruce
#

you can delete coreprotect but keep in mind you wont have backup..

tiny dagger
#

is there no way to purge old stuff?

#

🤔

edgy pendant
#

@vernal spruce Thats the Problem

vernal spruce
#

not rly its just minecraft vanilla limit

edgy pendant
#

I need a backup

frigid ember
#

CoreProtect isn't necessary on an Anarchy server? everything's allowed?

icy cosmos
#

Anyone know how I can set a player's nametag?

vernal spruce
#

wich goes to like what 3000k mapsize?

tiny dagger
#

well you can still keep a history of the server nermin

edgy pendant
#

@frigid ember yes, but I could loose a over 6 year old map, even with backups

frigid ember
#

without CoreProtect?

vernal spruce
#

up to you,tbh idk why people bother with anarchy

#

not rly popular

#

or.. buy online storage

edgy pendant
#

@frigid ember Yes, external Backup, but Coreprotects helps me patching exploits and all that stuff

vernal spruce
#

store that coreprotect data then clear it..

frigid ember
#

You could just store the current CoreProtect data in another place ^ and insert a new fresh one.

#

The old still exists; but out of context in a way.

edgy pendant
#

@frigid ember Yes, but what if I need to acess the old one, can I just somehow delete the one from 4 years ago but kkeping the "newer" one?

frigid ember
#

Don't delete anything.

vernal spruce
#

unless you kept track and compressed things every year

#

dont think you can

frigid ember
#

You're just relocating files.

#

200gb of CoreProtect data is impressive lol.

vernal spruce
#

also isnt the 1.16 update breaking anarchy servers?

edgy pendant
#

@frigid ember over 6 years runtime is also inpressive lol, so just buy new storage?

vernal spruce
#

thing is not new storage

#

better storage

edgy pendant
#

but over 700GB of map data is also a lot

vernal spruce
#

as dont think minecraft can swap between hard drives

frigid ember
#

how could you afford 96gb for 6 years I can barely afford 8gigs lol

vernal spruce
#

hes most likely running own machine

edgy pendant
#

@frigid ember Yea, but the 96 is also kinda tight....

vernal spruce
#

so he pays upfront..

frigid ember
#

you own the server at home?

edgy pendant
#

It is a own machine

vernal spruce
#

well you can either do that or..

#

make a decision to wipe on 1.16

#

as its gonna break it anyway

edgy pendant
#

@frigid ember Not directly, but i have quite fast acess to is (a friend of mine has a Server room in his house)

frigid ember
#

damn lucky lol

edgy pendant
#

@vernal spruce It is not going to break

vernal spruce
#

you will be forced to delete nether..

#

if you want the new one

edgy pendant
#

@vernal spruce No, a lot of people said this when the nether update was out (the one who added quartz, but you could just convert the files)

tiny dagger
#

wouldn't the new chunks of nether be new?

vernal spruce
#

yes

#

its different adding 1 ore block

#

than adding new biomes

edgy pendant
#

yes, but they changes the world generation too, just a hard boarder

#

there are a lot of hard boarders onmy Sever, due to new Version of the Game

#

But anyway: no way to savely delete Data?

vernal spruce
#

not without breaking something,you can store the old data but it will also be a bit spicy if you havent thinked in long run and precompressed data each year..

edgy pendant
#

There is no precompression, that would not be possible due to slower chunk Loading and so on

#

but the Backups are compressed

vernal spruce
#

by that i mean taking a time once a year

#

to compress coreprotect

frigid ember
#

couldnt u preload / gen chunkjs with 1.15 / current version

edgy pendant
#

compressing a single folder on a entire Minecraft Server is kinda hard

vernal spruce
#

tbh i would suggest just getting a hdd

#

a 5tb hdd might be the best thing..

#

alot cheaper than a ssd also..

#

as you dont really need that ssd

edgy pendant
#

@frigid ember try Preloading over 700Gb ob Chunk Data... not going to work

#

@vernal spruce HDD is sadly to slow

frigid ember
#

well that was the only option I could think of

vernal spruce
#

you can buy good ones...

edgy pendant
#

@vernal spruce Still the tiny random files are slower on HDD, and a Minecraft Server is based on them

vernal spruce
#

or if you have money stored go for idk.. 2tb ssd if you can find one

edgy pendant
#

@vernal sprucesecond 1 TB SSD with raid

vernal spruce
#

basically ur pretty fk when it comes to this problem..

edgy pendant
#

this is why I asked

vernal spruce
#

and again dont think minecraft can acces a 2nd hard drive

#

for the world

edgy pendant
#

no, I cant

frigid ember
#

you could just transfer onto a 2nd drive

icy cosmos
#

Anyone know how I can set a player's nametag?

edgy pendant
#

@frigid ember The entire Server is kinda hard, Spigot does not support 2nd Hard drives

frigid ember
#

Scoreboard Teams or listen for the Packet @icy cosmos NamedEntitySpawn

vernal spruce
#

tried having 1 for world data and 1 for coreprotect?

frigid ember
#

that's probable ^

vernal spruce
#

i think you can request this special feature to coreprotect dev

icy cosmos
#

@frigid ember how?

edgy pendant
#

@vernal spruce good idea

vernal spruce
#

shoulntd be that hard for him

#

all he has to do is add a configurable disk path

frigid ember
#

I don't spoon feed, that's the worst thing; I was a victim of that for a year; you have to learn.

icy cosmos
#

I know yeah

#

I found this class on github

#

But I am not too sure how it's correctly used

vernal spruce
#

starting up with "class on github" is very discouraging 😂

frigid ember
#

lol

vernal spruce
#

also why packets?

edgy pendant
#

I tried the Coreprotect external drive, but a HDD was still just to slow, the Databank was buisy and the Ram usage shot into the sky...

vernal spruce
#

the current scoreboard api is more than enough to do

#

tried with an ssd for the coreprotect?

edgy pendant
#

@vernal spruce Then just run it in Raid and have a bigger entire disk.

vernal spruce
#

if you can find a bigger ssd go for it

#

but the price will most likely skyrocket..

#

thats the sad thing about coreprotect

#

it wasnt rly designed for this..

edgy pendant
#

@vernal spruce the Price is not that much of a Problem, but it is just that I have to reset the whole Server

vernal spruce
#

most protection plugins werent designed for this..

edgy pendant
#

wich would take a while

icy cosmos
#
  public static void changePlayerName(Player player, String prefix, String suffix, TeamAction action) {
    if (player.getScoreboard() == null || prefix == null || suffix == null || action == null)
      return; 
    scoreboard = player.getScoreboard();
    if (scoreboard.getTeam(player.getName()) == null)
      scoreboard.registerNewTeam(player.getName()); 
    team = scoreboard.getTeam(player.getName());
    team.setPrefix(Color(prefix));
    team.setSuffix(Color(suffix));
    team.setNameTagVisibility(NameTagVisibility.ALWAYS);
    switch (action) {
      case null:
        team.addPlayer((OfflinePlayer)player);
        break;
      case UPDATE:
        team.unregister();
        scoreboard.registerNewTeam(player.getName());
        team = scoreboard.getTeam(player.getName());
        team.setPrefix(Color(prefix));
        team.setSuffix(Color(suffix));
        team.setNameTagVisibility(NameTagVisibility.ALWAYS);
        team.addPlayer((OfflinePlayer)player);
        break;
      case DESTROY:
        team.unregister();
        break;
    } 
  }
vernal spruce
#

you mean move the hole server?

icy cosmos
#

Would that be what you mean @frigid ember ?

vernal spruce
#

welp thats a block of code

edgy pendant
#

@vernal spruce I know, but it is the CoreProtect Plugin, and other Anarcy Server have TB of data on this Plugin

frigid ember
#

that's some messy code I'd clean that up if I were you.

vernal spruce
#

yeah.. not much he can do,even if he updated to a new compression system the old data is at risk when changing to the new one..

edgy pendant
#

@vernal spruce means just a new SSD i cant get at the Time due to COVID 19?? great

vernal spruce
#

welp not much you can do

edgy pendant
#

I am running out of Storage (10 GB or so left)

vernal spruce
#

ssd,couple days of downtime then ur good

#

try find the biggest one you can..

icy cosmos
#

@frigid ember not that it works though

vernal spruce
#

it will eventually fill up as well dont forget..

icy cosmos
#

what do you mean? whats wrong

edgy pendant
#

@vernal spruce But the post in our country Strikes and the shop are mostly closed

vernal spruce
#

unless it reaches minecraft default world size

#

from there no more extra data

edgy pendant
#

@vernal spruce Thats a few PB, so no worries

vernal spruce
#

idk 2b2t i think already reached that

#

dont think they went that big with storage though

edgy pendant
#

@vernal spruce no, this Sever has still under 1% of the Map generated

#

Minecraft Map is really big

vernal spruce
#

well you could...

#

make ur own loading system

#

one of the talented devs might take a offer for that

edgy pendant
#

@vernal spruce I am not good at Programming such complex thins, and even if I can do it, it HAS to be stable

vernal spruce
#

basically loading/unloading/saving on different disks based on player locations

#

idk there might even be one out there not sure

#

as its not a common problem

edgy pendant
#

I just programmed a fiew basic Minecraft Plugins, so I do not have experince, and normally you would buy a new drive or delete map

vernal spruce
#

yeah its above avg dev

frigid ember
#

There's definitely compotent developers who can make such; request.

edgy pendant
#

It is not common, because they just buy new Hardware

vernal spruce
#

theres a limit to what hardware you can buy

edgy pendant
#

@frigid ember But is is way more expensive that buying a good SSD

vernal spruce
#

eventually its too much to handle

frigid ember
#

It's probably worth it on the long run

vernal spruce
#

not rly a feature like that can go for like idk

edgy pendant
#

@vernal spruce yes, I know, there is also a Playerlimit, and Raid helps you out a lot

vernal spruce
#

200$ and a experienced dev most likely would make it

#

its not rly omething godly to make

edgy pendant
#

@vernal spruce 150$ for another SSD (500GB)

vernal spruce
#

if theyr familiar with chunks theyr already good

#

yeah but how will you acces that storage

edgy pendant
#

but I have to convert the 700GB Map as well

pastel condor
#

I got a 120GB ssd for $25 on Amazon @edgy pendant

vernal spruce
#

the plugin is mostly a long run thing

#

rather than solution rn

edgy pendant
#

@pastel condor I need read and Write Speed, and not the less expensive junk

pastel condor
#

What speed?

edgy pendant
#

Server graded SSD, that are more reliable then Desktop SSDs

#

1 - 3 GB/s

vernal spruce
#

anyway im off gotta work on a damn skill plugin

edgy pendant
#

ok, bye

vernal spruce
#

for extra help

#

asking the b2t2 owners might help you

#

as they are more familiar with these kind of issues

pastel condor
#

Do you have lots of players on your server? Why would you need something that fast?

edgy pendant
#

@vernal spruce actually I tried 2 week ago, no response

vernal spruce
#

ahh i see no help for the competition

#

classic

edgy pendant
#

@pastel condor 68 Players average

pastel condor
#

Anarchy server?

edgy pendant
#

@pastel condor yes

pastel condor
#

I see

#

What about using a RAM disk?

edgy pendant
#

Anarcy Server 200+ GB Coreportect (I need them) 700GB map 1TB SSD 10 GB left

pastel condor
#

Or is your world too big?

#

Ah I see

edgy pendant
#

@pastel condor only have 96 GB, not able to chache anything with this much players

#

Cant delete World files

pastel condor
#

Mind if I ask, how are you making money to pay for all this?

#

Does your server have a store?

edgy pendant
#

@pastel condor yes, I have a wating room with payment for faster Acess

#

1TB SSD thats all

pastel condor
#

I mean why not use a desktop ssd as plan B for now?

edgy pendant
#

@pastel condor Dont have any, Post strikes due to COVID 19, and stores are closed....

pastel condor
#

Amazon?

edgy pendant
#

delivery strikes

pastel condor
#

Rip

edgy pendant
#

yea, rip

#

now that I have more players than usual

pastel condor
#

Maybe setup a temporary world border?

edgy pendant
#

@pastel condor What with Bases/ Players outside the boarder?

#

maybe temp Map and then the old back?

pastel condor
#

Yeah you could do that

edgy pendant
#

But I dont know how long this Lockdown and the strikes are, so

#

hard decision

#

It is going to be full the next Week

#

so....

frigid ember
#

disable new chunk gen

#

temporarily

edgy pendant
#

@frigid ember true, but what about CoreProtect

#

still making Files

icy cosmos
#
    public void registerNT(Player player){
        Scoreboard scoreboard = Bukkit.getScoreboardManager().getMainScoreboard();
        if(scoreboard.getTeam(player.getName()) != null){
            scoreboard.getTeam(player.getName()).unregister();
        }
        CachedMetaData metaData = Hub.getLuckPerms().getPlayerAdapter(Player.class).getMetaData(player);
        String suffix = metaData.getSuffix();
        Team team = scoreboard.registerNewTeam(player.getName());
        team.setPrefix(ChatColor.translateAlternateColorCodes('&', suffix));
        team.addPlayer(player);
    }
pastel condor
#

Delete old data

frigid ember
#

you can delete old core data

icy cosmos
#

I am using this method to set a players nametag

#

And it's not working

#

Any help?

edgy pendant
#

@frigid ember How, I dont know

frigid ember
#

there's /co purge

#

command

#

like /co purge t:360d

edgy pendant
#

Because over 4 year old CoreProtect Data is useless

frigid ember
#

will delete data older than 360 days

pastel condor
#

Yeah

edgy pendant
#

@frigid ember It is so much, that the Server freezes and then Crashes

#

this is the Problem

frigid ember
#

when purging?

edgy pendant
#

yes

frigid ember
#

I see

edgy pendant
#

Its over 200GB of data, accessed in a tiny time...

frigid ember
#

you need to have double the coreprotect space to be able to purge

edgy pendant
#

@frigid ember next Problem

frigid ember
#

can you move coreprotect on other machine temporarily

#

for purge

edgy pendant
#

No, too slow speeds, just Uses ton of Ram and then freezes and causes a lot of Lag

frigid ember
#

and you could use it without mc server, it's sqlite database, so could get a developer to make purging go through without crashy mc server

#

o

#

well that's pretty crazy situation here

edgy pendant
#

@frigid ember true, but i am bad at Database dev

frigid ember
#

sqlite not meant for such things

edgy pendant
#

And I dont have a dev

frigid ember
#

I could help you, but 200gb is outside my capability kinda, my internet really slow

edgy pendant
#

Mine is too slow too, but Server Internet is fast

frigid ember
#

500kb/s

edgy pendant
#

1,5mb /s for 5 People

frigid ember
#

is it a vps or dedicated?

edgy pendant
#

dedicated, cant run vm on this scale

frigid ember
#

I'll try research bout sqlite stuff and see if something could be done

edgy pendant
#

thanks, having the Problem since my dataWarning went off (1 month ago, 95% usage)

#

btw using Linux, so no Windows solutions!

frigid ember
#

yup I don't even know how to work with windows xd

edgy pendant
#

@frigid ember I had it in School, so i even have Windows on my PC, but Linux is way better

frigid ember
#

server version btw?

#

I have windows on my PC, but all my programming affects Linux only

edgy pendant
#

no, Linux Mint, due to makig acess easier

frigid ember
#

what mc version?

edgy pendant
#

1.15.2

frigid ember
#

I'll pm you

cursive flax
#

Hello, does the "BlockExplodeEvent" event works to detect a block being exploded, or should I use something else ?

lament wolf
#

Hello, so I rank (as an enum Rank) a player in my plugin et put in too in Metadata. But when I want to access it from another plugin, where there is too exactly the same enum Rank, it doesn't work. I did it:


    public static Rank rankByData(Player player){
        return ((Rank) (getMetadata(player, "rank", Core.getInstance())));
    }


    public static Object getMetadata(Metadatable object, String key, Core plugin) {
        List<MetadataValue> values = object.getMetadata(key);
        for (MetadataValue value : values) {
            if (value.getOwningPlugin() == Core.getInstance()) {
                return value.value();
            }
        }
        return null;
    }```
#

Any idea ?

undone narwhal
#

@cursive flax yep it works

#

@lament wolf You should use something else to use the rank of the player like a database, a socket or something else. How do you save the Rank in metadata? Do you put a string or the enum value?

lament wolf
#

the enum value

wanton delta
#

value.getOwningPlugin() == Core.getInstance() is your problem

lament wolf
#

@wanton delta So what I should do ?
@undone narwhal I have a db where there is the rank as string, but I doesn't want to overload it,

wanton delta
#

you should debug

#

debug what value.getOwningPlugin is, and what Core.getInstance is

#

chances are, theyre not equal.

#

im also questioning that use of ==

#

what is Core.getInstance @lament wolf

lament wolf
#

It's the instance of my main class that extends JavaPlugin @wanton delta

wanton delta
#

show me the code

lament wolf
#

Of what ?

wanton delta
#

what is Core.getInstance

lament wolf
#

public class Core extends JavaPlugin {


    private static Core instance;
    private HikariDataSource hikariDataSource;
    public Title title = new Title();
    public Moder moder = new Moder();
    private PluginManager pm = getServer().getPluginManager();

    @Override
    public void onEnable() {
        instance = this;
        getServer().getMessenger().registerIncomingPluginChannel(this, "channel", new PluginMessageListener());
        getServer().getMessenger().registerOutgoingPluginChannel(this, "channel");
        initSQL();
        initServer();

    }
...

}

frigid ember
#

That's the singleton design pattern I believe

wanton delta
#

that isnt the method Core.getInstance

frigid ember
#

you don't even have a getter method @lament wolf

#

unless it's not shown

lament wolf
#

public static Core getInstance() {
return instance;
}

#

I just cut my code

wanton delta
#

so

#

I would recommend using .equals instead of == (unless im wrong, it just feels like .equals would be a better option. you can try == first though)

#

second of all

#

I would recommend using JavaPlugin.getPlugin(Core.getInstance().getClass());

undone narwhal
#

You can use Redis, or if it's in the same server just implements your core plugin

wanton delta
#

(yea, this method in general is not that great)

#

(would be better to just load the player's rank when they join the server from the db)

frigid ember
#

^

pastel condor
#

stupid question, but what does redis do? When I googled it I didn't get a stright awnser

frigid ember
#

it's just a caching agent

wanton delta
#

its a socket

#

so you can send messages accross different things

frigid ember
#

you would want to use across multiple machines I believe.

wanton delta
#

So if i have server a with message 1 and server b, i can send message 1 to the Redis server, which broadcasts it

#

Server b has a listener for the message type, so it will receive the message and do something with it

pastel condor
#

oh cool

wanton delta
#

its useful for transfering players accross servers

#

or server spinners that automatically start/stop servers based on their needs

#

or say you have a server-wide shop that needs to have the same items, and you have an external application that updates the shop every day

frigid ember
#

like Hypixel Skyblock 😛 ^

wanton delta
#

The application can send a message saying "the shop updated" and all my servers will grab the new data

pastel condor
#

oh cool

#

how do I set it up?

wanton delta
pastel condor
#

like if I wanted to run a bungee server command from my spigot server?

#

k

wanton delta
#

not really like that

#

another example would be a booster system

#

say your minigame lobby has a booster active, it will broadcast that to the main hub so when you are choosing a server, you can see that it has a booster active

torn robin
#

Does jedis just “work” on spigot? Or does the server owner have to set it up

frigid ember
#

I think you have to run a seperate server

#

redis based server

torn robin
#

wish that’s was on the tutorial 😔

frigid ember
#

Yea I tried learning Databases in the past it's difficult but it's got to sink a ton of times for me to absorb the information.

pastel condor
#

too many servers 😅

wanton delta
#

Redis is like Mysql

#

You need a redis server to be running just like you need a mysql server to be running

pastel condor
#

I see

wanton delta
#

most hosting providers dont offer redis

#

unless u go with a dedi/vps

pastel condor
#

oh cool

sturdy oar
#

ehy does someone know

#

why is SQLite preferred over H2?

#

(ignore the fact that is already shaded into spigot which is of course one of the reasons)

tiny dagger
#

it's syntax is almost the same as of mysql

undone narwhal
#

I ate too much SQL for today

red zenith
#

SQLch Belch?

ripe ledge
#

I need help
I am creating a world and when I am teleporting to the world it dont tp me and put this on the console:
https://pastebin.com/mPZDvXeb
Someone can help me?

hallow surge
#

pretty self explanatory its a Null point error

frigid ember
#

Hi , i have a problem , in my server , the builder can build but he can not break blocks and any permissions are for breaking blocks. Please help me that's really annoying

#

got worldguard on?

#

@frigid ember

storm tendon
#

can I bump a spigot thread?

frigid ember
#

@frigid ember Yes for sure

#

/region flags global

#

look there

#

with __ before and after global

#

two underscores

#

@frigid ember

#

That doesn't work :/

#

the command?

#

yes

#

could be flag or flags

#

weird

#

Yeah tha'ts weird it say to me /region flag [-e] <id> .......

#

let me hop on and try it real fast

#

it should show a menu that you can click on to allow different world guard permissions globally

#

yeah but that's not work for me

#

not flag

#

and i'm in a 1.8 ver

#

flags

#

Yes

#

yeah idk then =/

#

maybe it wasnt added then

#

im on a 1.15.2

#

oof

#

you should still be able to do it the other way

#

Yes ?

#

for example "/region flag spawn mob-spawning deny"

#

that sets a flag on the region spawn

#

to deny mob spawning

#

Okay

#

so just look up different flags on google

#

and find the one which might be the culprit

#

Okay thanks for help

#

hope it works out

#

Thanks

strange grove
#

does anyone know how to access an entity in another class?

#

I would love the help!

#

@anyone?

#

hello?

#

*sighs in sadness

#

hello?

#

yello?

#

anyone

#

😦

frigid ember
#

be patient

strange grove
#

sry

#

every time

#

I come here it's like the chat has turned into a desert

frigid ember
#

i can't help you with that but people are active and helpful on here

#

just need to wait

strange grove
#

yeah

#

I guess

#

🙂

edgy pendant
#

@strange grove This chat is a desert of people who have no clue

strange grove
#

fair enough

#

🙂

bright forge
#

Hey, im using PlayerJoinEvent to add some stuff to a player pipeline but its sometimes empty

#

Do i need to use PlayerLoginEvent or something like that

#

maybe i did some mistake

#

nevermind it was a cache issue

ripe ledge
#

Can someone help me with something? (On spigot of course)
DM me

frigid ember
#

@me ??

pallid turret
#

@ripe ledge You should state your situation here, that way all of us can help you, it's what this channel was made for

strange grove
#

does anyone know how to get an entity like an armorstand within a radius?

#

😦

vernal spruce
#

Checking world.getnearbyentities should also catch any armorstands

strange grove
#

`World world = (World) sender;

            world.getNearbyEntities();`
#

so something like this

#

?

#

right?

#

@vernal spruce

#

tho

#

i am getting an error with the location stuff

#

I do

#

Location location

#

but then it underlines location

stone rampart
#

@strange grove ask again and I can help

strange grove
#

ok

#

well

#

i'll show you

#

`World world = (World) sender;
world.getNearbyEntities(Location );``

#

World world = (World) sender; world.getNearbyEntities(Location );

stone rampart
#

What do you actually want to do?

strange grove
#

well

#

I want to get the armorstand

#

i'm using holograms

#

and I want to delete the hologram

#

once I detect it

#

it will go vamoose!

stone rampart
#

So put the entity in a list or something?

strange grove
#

I guess so

stone rampart
#

If it's between restarts you could consider a yml

strange grove
#

well im using a command for this

stone rampart
#

Either use a hashmap, arraylist

strange grove
#

hmm

#

how so?

stone rampart
#

Wdym

#

How are you creating the entity?

strange grove
#

the hash map stuff

#

well let me paste the code

stone rampart
#

What?

strange grove
#

``World world = (World) firstFrame.getWorld();
Location location = (Location) firstFrame.getLocation();
ArmorStand hologram = (ArmorStand) world.spawnEntity(location, EntityType.ARMOR_STAND);
hologram.setVisible(false);
hologram.setCustomNameVisible(true);
hologram.setCustomName(ChatColor.GOLD + name);`

stone rampart
#

What method are you using to create the entity?

#
World world = (World) firstFrame.getWorld();
                            Location location = (Location) firstFrame.getLocation();
                            ArmorStand hologram = (ArmorStand) world.spawnEntity(location, EntityType.ARMOR_STAND);
                            hologram.setVisible(false);
                            hologram.setCustomNameVisible(true);
                            hologram.setCustomName(ChatColor.GOLD + name);```
strange grove
#

well

#

this is not my own code

#

it is for personal use

#

basically

#

public void run