#help-archived

1 messages · Page 93 of 1

strong zinc
#

with The New Economy

sturdy oar
#

???+

strong zinc
#

its broken

#

like it doesnt work

hallow surge
#

@sturdy oar same applies on restart\

#

reload is just aquicker way to do it

sturdy oar
#

you shouldn't use both

strong zinc
#

This section holds items, and their values if ItemCurrency is set to true. The format is Minecraft Material Name: Value.
it is stupid question but
where is ItemCurrency: true
in the new economy's config

hallow surge
#

I shouldnt restart my server>

#

wow

sturdy oar
#

make a proper SH script, or systemctl if you automatically restart it

hallow surge
#

its a test server genius

#

for testing my plugin

#

telling me not to restart my server is such an ignorant thing

#

so once i start it i am never supposed to stop it?

#

seems like a waste of my pcs resources

sturdy oar
#

I just said there are better ways to restart the server instead of using an in game command

hallow surge
#

thats not the issue though

#

maybe instead of being stupid gimme a actual solution lol

sturdy oar
#

well the issue is that you also shouldn't use reload

#

it's known to be buggy

hallow surge
#

i know not to use reload lol

#

im not stupid

#

i am using it for testing sake

#

your acting like i have some full fledged server

#

i have 1 plugin which is mine and a server i set up in 1 minute

sturdy oar
#

implement a reload command for your plugin's config

#

instead of reloading the whole server

strong zinc
#

and why can't i make a fricking economy system

hallow surge
#

dont restart your server

#

issue resolved

strong zinc
sturdy oar
#

what's 'Economy'

hallow surge
#

bro are you okay

sturdy oar
#

I mean just contact the author

strong zinc
#

bruh

hallow surge
#

lol

strong zinc
#

he said i should read some wiki page so i read it but it doesnt work anyway

hallow surge
#

he is not mentally okay

sturdy oar
#

if the author couldn't help you, how am I supposed to lmao

#

im outta here

hallow surge
#

@strong zinc is it your plugin

strong zinc
#

no it's the new economy by creatorfromhell

hallow surge
#

if the author cant help you its a shitty plugin find another

tiny dagger
#

yeah like this 😏

sturdy oar
#

advertising

tiny dagger
#

not made by me btw, i just happen to have the same name

#

🤥

sturdy oar
#

I think EssentialsX has a built-in economy system that uses Vault

#

which was pretty good

hallow surge
#

Fendi have you ever restarted your server

tiny dagger
#

mine has an iconomy feel to it + it's lightweight

sturdy oar
#

yeah i use a systemctl with crontab to restart my server automatically

hallow surge
#

bad bad boy you should never do that

#

never restart anything

#

ever

brisk mango
#

@sturdy oar why are you saying non-senses

#

why shouldnt he restart his server

#

you need to save the config onDisable() @hallow surge

#

anyway reload is fine

#

no need for restarting

#

Nothing in essentials is good lol. Garbage plugin pretty much

sturdy oar
#

I think i'm leaving today

brisk mango
#

thats actually 300 iq to never restart your server

#

so the JVM never releases memory lol

tiny dagger
#

feels bad when my economy plugin gets ignored by the persons who clearily seem to need it lol

brisk mango
#

very good

sturdy oar
#

people who say EssentialsX is bad are the ones pushing CMI probably

brisk mango
#

im not using any of them

#

so your statement is not true

sturdy oar
#

I don't see anything bad about EssentialsX, may you explain what's wrong with it at the moment

brisk mango
#

look at the essentials source code

#

and tell me its well-designed

#

also i dont like that they have a per user .yml file

#

also i remember when i used it, i had some issusies with the EssentialsSpawn thing

#

and more

tiny dagger
#

i remember the time it took to transfer 20 mb of user data

sturdy oar
#

I don't think a single YML file with 5000 users

#

would be any better

#

actually it would be much worse

brisk mango
#

you're right, but the idea of saving data to a YAML file is really bad anyway

sturdy oar
#

yeah I mean SQLite or H2 could be used

#

don't know if they ever plan to add it

brisk mango
#

thats why its bad plugin too

#

it doesnt even support SQLite

young dawn
#

Whenever I try and run my new bungee network, it says "if you wish to use IP forwarding, please enable it in your bungeecord config as well" but I already did that. I also disabled online mode in both of my spigot servers and enabled bungeecord.

brisk mango
#

make sure you connect through the bungee ip and port not the server itself

hallow surge
#
public void onDisable() {
        getServer().getConsoleSender().sendMessage(ChatColor.RED + "Notice Y2K_'s Printer Plugin has been disabled");
        saveConfig();
    }
    public void loadConfig() {
        getConfig().options().copyDefaults(true);
        saveDefaultConfig();
    }
``` my code temedy
brisk mango
#

not saveDefaultConfig()

young dawn
#

I am

brisk mango
#

saveConfig() onDisable()

hallow surge
#

i do that

brisk mango
#

and?

hallow surge
#

on disable i save it

#

ill change load config to save config

#

still replaces it

brisk mango
#

idk then

young dawn
#

still doing the same thing when I connect through my bungee server's IP

tardy lance
#

can someone tell me how i can change the speed from a horse?

#

i didnt found something about it in the wiki

tawdry venture
#

hey everyone! I'm trying to make a quick launchpad plugin, but this only pushes the player horizontally, it doesn't make the player go upwards

Vector target = pads.get(padLoc);
Vector current = e.getPlayer().getVelocity();
//vertical
e.getPlayer().setVelocity(new Vector(current.getX(), target.getY(), current.getZ()));
//horizontal
current = e.getPlayer().getVelocity();
e.getPlayer().setVelocity(new Vector(target.getX(), current.getY(), target.getZ()));
vernal spruce
#

((LivingEntity)horseEntity).getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).setBaseValue(value)

#

@tardy lance

tardy lance
#

i will try it thanks 😄

vernal spruce
#

0.5 is like god like rng in vanilla

brisk mango
#

you need to set Y @tawdry venture

#

because vector has x,y,z

tawdry venture
#

but I do, target.getY

brisk mango
#

?????

#

that gets target Y velocity

#

not sets

tawdry venture
#

target is the stored vector for the launchpad the player stepped on currently

vernal spruce
#

getting 0 and setting 0..

#

unless hes jumping the Y velocity is 0

#

you grab it then set it again.. wich is 0

tawdry venture
#

but the target y is not 0

brisk mango
#

e.getPlayer().setVelocity(new Vector(current.getX(), target.getY(), current.getZ()));

#

youre litterly setting his current value which could be 0

tawdry venture
#

or if I do player.setVelocity(target) where target = 0, 5, -40, still doesn't do it correctly

brisk mango
#

just try doing

#

player.setVelocity(new Vector(0, 100, 0)) for example

tawdry venture
#

it work obviously, I already tried this

brisk mango
#

then the problem is in ur code lol

#

why are you even getting it from a map or whatever

#

why not just check if they interacted with the pad

#

and set the velocity..

#

no need to overcomplicate things

tawdry venture
#

well I just tried this, and it doesn't seem to move the play upwards: ```java
@EventHandler
public void onLaunchpad(PlayerInteractEvent e) {
if (e.getAction().equals(Action.PHYSICAL) && (e.getClickedBlock().getType() == Material.STONE_PLATE || e.getClickedBlock().getType() == Material.WOOD_PLATE || e.getClickedBlock().getType() == Material.GOLD_PLATE || e.getClickedBlock().getType() == Material.IRON_PLATE)) {
Location padLoc = e.getClickedBlock().getLocation();
logger.info("interact: " + padLoc);
if (pads.containsKey(padLoc)) {
e.getPlayer().playSound(padLoc, Sound.FIREWORK_LAUNCH, 0.5f, 1);
Vector target = pads.get(padLoc);
e.getPlayer().setVelocity(target);
e.getPlayer().sendMessage("§bWoosh!");
}
}
}

brisk mango
#

why not check if the type ends with _PLATE or make a pattern and check if that matches it?

#

instead of this

#

and just to tell you, getClickedBlock() is nullable i thik

#

and idk what pads.get(padLoc) returns

#

so i cant tell why it doesnt set the velocity

#

also, why are you comparing the enums once with .equals and then with ==?

tawdry venture
#

all you said is true and can be improved as said, but it works, and the problem here is that the target vector is (0, 5, -30), however the player doesn't move up, and only gets pushed on the Z axis around 5 blocks

brisk mango
#

where are you saving the vector into the map

#

show me

tawdry venture
#

the player messages aren't english since this isn't made for public use

brisk mango
#

well thats weird then

#

if it moves the player only by 1 cord

#

no idea @tawdry venture

tawdry venture
#

just tested, it works with the x z, just the y not working

brisk mango
#

@compact osprey isnt there something like ProxiedPlayer#hasPermission

#

so?

#

why you calling it a block

#

its a method

#

huh

#

whatever, just check it in the execute method.

subtle blade
#

aside from Command#setNoPermissionMessage()

brisk mango
#

I mean, you can still check for the permission in the Iterator<String>

#

and if he doesnt have then dont tab-complete

subtle blade
#

Commands themselves can be tab completed

#

/te will tab complete to /teleport for instance

#

That cannot be removed unless the command is not sent to the player

#

Which is either permission based or doable in the event

tawdry venture
#

what location player#getLocation returns? eye? feet?

subtle blade
#

Feet

#

#getEyeLocation() for the former

tawdry venture
#

so if a player is standing on a pressure plate, the player#getLocation().getblock retuns the pressure plate?

subtle blade
#

Yes

brisk mango
#

yes

tawdry venture
#

thanks

brisk mango
#

@compact osprey Wdym bungeecord doesnt, it does

#

it does have an Iterator<String>

#

for tab completing

#

oh i misread

#

you meant the command

tawdry venture
#

@brisk mango now it works lol
changed it to playermove event and I apply the y first player.setVelocity(player.getVelocity().setY(target.getY())) then apply the x z velocity too

pastel fox
#

I'm trying to do reflection and it isn't working?
java.lang.ClassNotFoundException: org.bukkit.craftbukkit.1.15.2-R0.1-SNAPSHOT.entity.CraftHumanEntity

#

I do getBukkitVersion

#

getVersion() returns some paper string

dusty topaz
#

What is the string it returns

#

and show the code

pastel fox
#

Solved it btw

#

Found this code

        final String packageName = Bukkit.getServer().getClass().getPackage().getName();
        return packageName.substring(packageName.lastIndexOf('.') + 1);
    }```
#

Ok, so that error went away but I'm still really stuck. I'm making a permission plugin with wildcard support.

private void injectBase(Player p) {
       
        try {
            String version = getVersion();
            String classPath = "org.bukkit.craftbukkit." + version + ".entity.CraftHumanEntity";
            Class<?> humanEntity = Class.forName(classPath).getClass();
                        
            Field field = humanEntity.getDeclaredField("perm");
            field.setAccessible(true);
            Field modifiersField = field.getClass().getDeclaredField("modifiers");
            modifiersField.setAccessible(true);
            modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
            field.set(p, new PixelPermissibleBase(p));
            
        } catch (ClassNotFoundException | IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException ex) {
            Logger.getLogger(PixelRanks.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

Error:

[16:59:38 ERROR]: [xyz.pixel.pixelranks.PixelRanks] null
java.lang.NoSuchFieldException: perm
    at java.lang.Class.getDeclaredField(Class.java:2411) ~[?:?]
    at xyz.pixel.pixelranks.PixelRanks.injectBase(PixelRanks.java:161) ~[?:?]
#

I checked the HumanEntity code- and it does have a perm field!

subtle blade
#

Why are you not using permission attachments?

pastel fox
#

And solved that after a lot of struggle Class.forName(classPath).getClass() should be Class.forName(classPath)

#

I am- but I'm injecting a custom base that resolves wildcards

#

I used only permission attachments initially but they don't work because

#

A) getEffectivePermissions doesn't return minecraft.* and bukkit.*

#

B) Plugins don't register their permissions properly

#

So for * I'd give the player every registered permission- and they still couldn't do things like /say or /gamemode

young dawn
#

Can someone help me with my issue?

Whenever I try and run my new bungee network, it says "if you wish to use IP forwarding, please enable it in your bungeecord config as well" but I already did that. I also disabled online mode in both of my spigot servers and enabled bungeecord.

subtle blade
#

I am- but I'm injecting a custom base that resolves wildcards
What the hell is with people injecting things they shouldn't lately?

#

First an entity tracker injection, then yesterday someone was injecting their own plugin manager. Now this?

#

Seriously?

tiny dagger
#

people love making stuff harder than it is supposed to lol

subtle blade
#

The server has no concept of wildcard permissions. That is up to your plugin to implement and handle accordingly, not the server

hollow cove
#

Hey can someone help me i cant figure out how to make a 1.14.4 server?

subtle blade
#

?bt

worldly heathBOT
subtle blade
#

From there, it's just a matter of running your server and adding plugins

hollow cove
#

ok thanks

sturdy oar
#

Does spigot shade MariaDB driver by any chance?

subtle blade
#

No

#

Just SQL

sturdy oar
#

I've also read that MariaDB Driver can work for MySQL as well, is that true? And could it give any problem if I use it inside my plugin?

nimble marten
#

Hey
does anyone know of a plugin that can generate a map based off an image?

So far I have found

  • EpicWorldGenerator (im broke, + the terrain is too "extreme")
  • TerrainControl (support appears to have ended in 1.10)
  • Worldpainter (cannot generate structures)

Im not sure what to do, any advice?

sturdy oar
#

an image?

dusty topaz
#

you're fine to use mariadb driver for mysql

#

syntaxes are pretty much identical

trail dagger
#

is there a way to disable players collision ?

hollow cove
#

Hey so i did the thing where you run the buildtools in git and now i dont understand what to do

sturdy oar
#

the only way is to use scoreboards i think

nimble marten
#

an image?
@sturdy oar
yes
i would take a picture, (jpeg, png, etc)
and it would use the colors in the pixels to generate biomes depending on them

hollow cove
#

How do you give your server more ram

nimble marten
#

@hollow cove
In your start.bat, change the -Xmx### flag to have more ram.
Eg, if you want to give your server 8gb ram, -Xmx8G

TITLE SMP
java -Xms1M -Xmx512M -jar serverjars.jar nogui
pause
vernal spruce
#

thats how you give minecraft more ram as well..

obtuse rose
#

except -Xms1M part

#

that's useless

#

unless you're going to specify more than 1M

vernal spruce
#

isnt standard 250m

frigid ember
#

i badly need help, its to do with a skyblock plugin on a paper server

#

basicly when someone joins the server and types "/island" tp to there island from the gui, makes a cobble generator and mines they get random items like coal, iron and diamonds aswell as cobblestone. Now my problem is that they can tp home and bring it back with them (diamonds are dead easy to obtain in skyblock) and i would love if someone knows how to stop this, the island plugin runs on a diffrent world file the same as the nether and end does btw

pastel fox
#

Where can I get info on how Bukkit's tab completion works?

#

I inject a custom PermissibleBase into each player

#

And override hasPermission and isPermissionSet

#

I can execute the commands- but tab auto complete isn't consistent

#

E.g. I log in, have some permissions and the auto complete acts like I don't have the permissions for /kick

#

But then I can still do /kick myusername reason and it works

wanton delta
#

Does Color.fromRGB account for alpha channels?

subtle blade
#

RGB != RGBA

wanton delta
#

i know :(

subtle blade
#

Minecraft doesn't use the alpha channel for its colours

#

(at least the ones you'll see visually on the screen)

wanton delta
#

Well i mean like fromRGB(int rgb)

subtle blade
#

RGB != RGBA

wanton delta
#

i know :(

#

Im getting pixels from an actual image and it uses alpha channels so like im trying to delete alpha channel

#

Idk ill have to research how to do that more

obtuse rose
#

just ignore alpha channel then

#

there's nothing more you can do with that

#

that class use RGB anyway

vagrant widget
#

can someone help me fix mah server ;>

tiny dagger
#

nevah!

#

what's your problem?

vagrant widget
#

im not sure if its my server or my internet

tiny dagger
#

what's your distance from server?

#

same country ?

vagrant widget
#

uhhh

#

all i know is that it's not far out

#

any plugins that could cause issues?

tiny dagger
#

tbh

#

i had a problem with the blood effects

#

they actually were causing client spikes

vagrant widget
#

that might be my issue

#

i'll remove it and see

tiny dagger
#

oh

#

not this plugin specifically

vagrant widget
#

it's always under 20 TPS

tiny dagger
#

./timings paste

#

👀

vagrant widget
#

?

tiny dagger
#

you know that command don't you?

vagrant widget
#

never heard of it until now

tiny dagger
#

wow

#

i don't know if you're trolling on serious

vagrant widget
#

no im serious

#

like i'm not joking at all

tiny dagger
#

type it

vagrant widget
tiny dagger
#

Internal Server Error

#

oh

#

try to /timings on

#

first

vagrant widget
tiny dagger
#

try spark

vagrant widget
#

i don't use spark

#

i use VPS

tiny dagger
#

yeah but what a virtual private server has to do with a lagg monitoring plugin?

vagrant widget
#

🤷 lol idk

tiny dagger
#

./timings was the build in answear but it seems it doesn't work for you

dark shuttle
#

why do u put . before /

tiny dagger
#

it triggers discord bs

#

/timings

#

oh

#

it seems discord won't mess your command even if it's reserved :p

vagrant widget
#

why does this happen

#

when i turn on server and join ;/

tiny dagger
#

oh

#

so on join

#

try without any permissions

#

😂 might be someone running check for update on main thread

#

been there

vagrant widget
#

no permissions?

#

at all?

tiny dagger
#

try joining with another account and see

vagrant widget
#

i only have 1 account

#

yeah

#

somethings happening here lol

#

i put my self in a group with no perm

#

join on start is like 100 ping and drops back to normal

#

then default rank skyrockets

#

to 3k ping

frigid ember
#

Will I be pinged/emailed when my premium resource has been approved?

#

I already have an updated version to publish 🤦‍♂️

vagrant widget
#

oof

tiny dagger
#

try to get that /timings command going

#

it's gonna be your saviour

vagrant widget
#

not really sure how

timid valley
#

wtf you on 1.7or 1.8?

vagrant widget
#

1.8

timid valley
#

you gotta get this plugin off spigot resources to fix timings

#

search for fix timings

#

but if your using 1.8, you really need to be using a fork instead....

#

theres so many security issues in the last spigot release

#

least some of the forks have updates, and they are built off paper so youd have fixed timings too lol.

#

ubuntu banned timings is why its erroring

vagrant widget
#

got a link?

timid valley
#

i dont even remember what all the 1.8 forks are, i know theres one with commits within past year, youll have to do some googling

#

FluxSpigot i recall the name as one but its not as recent as some other one someone linked before

#

but regardless, old shit like that isnt gonna get support here, specially for forks. 1.8 is :outdated:

hot fable
#

Does anyone know how I can pass the permissions of luckperms version 4.3.73 to 5.1? pls

frigid ember
#

Does anyone know the permission node of /suicide, I need to disable it 😄

vagrant widget
#

essentials.suicide i assume

frigid ember
#

worked ty

sturdy oar
#

well

subtle blade
#

but if your using 1.8, you really need to be using a fork instead....
Or...

#

and hear me out here...

#

update your server

#

5 years out of date, my friend

#

Expect exploits and expect no support

#

Want to know where those exploits are patched? The latest version 🙂

vernal lance
#

👀

bronze marten
#

👀

vagrant widget
#

@subtle blade whats the best version for factions ?

trail zephyr
subtle blade
#

if you ask me what the best version of anything is, I'm going to tell you it's the latest version lol

spring cradle
#

Using these lines, i can use the anvil to make a bow with the book. Do you know what's the issue and how to resolve it ?

signal yarrow
#

You want to create an Enchanted Book that will apply the enchant with the anvil, is that right ?

subtle blade
#

You want EnchantmentStorageMeta instead

frigid ember
#

how would i go about getting the max amount of players for a server?

#

Thats getting the player count...

#

i asked for the max amount of players that can be on a server..

#

hmm makes sense, so if i am using bungee and i wanna get the max amount of players from one server if i am in another what would i go by?

#

not what i asked.

#

how would i go by getting the max amount of players for another server.

carmine furnace
#

Hi, I bought a FactionsUUID plugin but I have been charged but not received the plugin first time this has happened wondering where i should get support for this

golden vault
#

Give it 24 - 48 hours, some authors manually approve purchases but paypal still holds the funds. If you still don't have it after that you need to contact the author. If they ignore you or won't help you, you will need to resolve through paypal.

gray plume
#

What does it mean for a plugin to "Use Vault: true/false"?

#

For example.. in the Skywars X there is an option in the config that says Use-Vault: true/false

golden vault
#

It probably enables some features that hook into the vault api for economy, permissions or chat. Instead of using it's own.

#

Just a guess though

frigid ember
#

@frigid ember from main to test

red zenith
#

Does the placeholder api Server expansion offer that? Does it work across bungee?

frigid ember
#

offer?

buoyant path
#

Who is good with trig in here? Lol

#

I need help with getting a circle but it has to be really small

#

and change by the tick in the runnable

hallow surge
#

how do you send a message from a child here is an example

OnOff:
 on:
 off:
public String onOffArgs(String config_message) {
        return ChatColor.translateAlternateColorCodes('&', getConfig().getString("OnOffArgs"));
    }``` what should i put in my main class in the return?
#

@me when your available to help

frigid ember
#

how would i go by getting the max amount of players for another server

golden vault
#

@hallow surge getConfig().getString("OnOff.on") would work to get the on: your config example does not contain the path "OnOffArgs"

subtle blade
#

?choco

golden vault
#

lol

frigid ember
#

:D

keen compass
#

@buoyant path could show what you have and maybe someone would help you

buoyant path
#

Sure

#

Wanna just join a call with me

#

and ill explain there

keen compass
#

but generally circles just use basic algebra though

buoyant path
#

this is a little bit diff

#
    public void animate(ArmorStand as)  {
        as.setRightArmPose(new EulerAngle(-1.75, -0.69, 0));
        new BukkitRunnable() {
            int tick = 0;
            @Override
            public void run() {
                tick++;
                double t = ((double) tick % 33.75) * Math.PI / 16.875;
                Vector v = new Vector(Math.cos(t), 0, Math.sin(t));
                v.multiply(.1);
                as.setVelocity(v);
                float yaw = as.getLocation().getYaw();
                yaw += 10.6666666666667;
                Location location = new Location(as.getWorld(), as.getLocation().getX(), as.getLocation().getY(), as.getLocation().getZ(), yaw, as.getLocation().getPitch());
                as.teleport(location.add(v));


            }
        }.runTaskTimer(vulcanPrisons, 1, 1);
    }```
#

So basically Im trying to make an armorstand rotate and then teleport in a circle

#

it should have the effect of this

#

but it doesnt

#

I didnt change the code at all

vagrant widget
#

@subtle blade i got it to work

subtle blade
#

👏 But 👏 you're 👏 on 👏 a 👏 fork 👏

keen compass
#

lol

buoyant path
#

so can anyone help? lol

vagrant widget
#

yeahh

#

xd

keen compass
#

well changing the armor stands rotation isn't all that hard

frigid ember
#

how would i go by getting the max amount of players for another server

buoyant path
#

Idk how to get it to look correctly lol

keen compass
#

think you are going to need some radians

buoyant path
#

Can we dm?

subtle blade
#

Math.PI = 180 degrees
2 * Math.PI = 360 degrees

#

Euler angles can be created from there

#

You can easily figure out 90 degrees at just 1/2 radians, or 270 degrees at 3/2 radians, so on and so forth

wet ferry
#

You can easily figure out 90 degrees at just pi/2 radians, or 270 degrees at 3pi/2 radians, so on and so forth

#

Is what you meant to sau

subtle blade
#

Yes, sorry ;P

silver basin
#

in handling a join event

    @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
    public void onPlayerJoin(final PlayerJoinEvent event) {

        final Player player = event.getPlayer();
        final UUID uuid = player.getUniqueId();
        final String name = player.getName();
        final boolean trackIp = plugin.getConfig().getBoolean("prism.track-player-ip-on-join");
        final boolean doNotTrackJoin = !Prism.getIgnore().event("player-join", player);
        Bukkit.getScheduler().runTaskAsynchronously(Prism.getInstance(), () -> {
            // Lookup player for cache reasons
            PlayerIdentification.cachePrismPlayer(uuid,name);
            Bukkit.getScheduler().runTask(Prism.getInstance(),() -> {
                if (doNotTrackJoin) {
                    return;
                }
                String ip = null;
                if (player != null) {
                    Prism.debug("Player:" + name + " joined but disconnected before tracking entry made");
                }
                if (trackIp  && player.getAddress() != null) { //player may have disconnected.
                    ip = player.getAddress().getAddress().getHostAddress();
                }
                RecordingQueue.addToQueue(ActionFactory.createPlayer("player-join", player, ip));
            });
``` is the null check required ? I mean I know the player in this event cant be null but I assume that the given the first async task is a db access - it could take a while so is it possible that if the player disconnects the player variable becomes null?
frigid ember
#

how would i go by getting the max amount of players for another server

silver basin
#

@frigid ember what do u mean by another server?

subtle blade
#

If the player disconnects while joining, the playerjoinevent won't be fired

#

That's what PlayerLoginEvent is for

#

join event is a successful join

frigid ember
#

so like bungee i am in the Hub, and i wanna get the Max Players from another server like KitPvP or TestServer

silver basin
#

what if they disconnect quickly after it fire

#

s

subtle blade
#

Sure but that Player won't ever be null

#

The Player instance will still exist

#

It may just be invalidated

#

This is why we often express concern with holding references to entities because they're invalidated when unloaded and is prone to memory leaks

silver basin
#

@frigid ember you need to use a bungee plugin not Bukkit aka Spigot

frigid ember
#

how would i do so tho? cant i just use spigot to make a call to bungee to get the amount?

subtle blade
#

Any call you make to that Player instance is not going to manipulate a disconnected player (or even the same player that re-joins - they're different player instances)

silver basin
#

sure

#

So in this case the invalid player would still have the ip address stored ....and given I dont hold a direct reference to the object in a map anyway it should be fine I assume

subtle blade
#

Yes

#

Address should still be retrievable as far as I'm aware

silver basin
#

so then the null check will always be false and can be removed

subtle blade
#

Correct

silver basin
#

@frigid ember afaik there are no calls natively from Spigot->bungee

#

ie methods that return that info

frigid ember
#

how would i get it to the Spigot so i can display it on tab

silver basin
#

you would need to build somehting

#

....lol

subtle blade
#

Generally people resort to Redis pub-sub, though the bungee plugin channels may have information to at least get maximum player count

silver basin
#

Well we use a Redis messaging system

subtle blade
#

That being said, it also requires players to be online

silver basin
#

yeah dont use PluginMessaging

#

...I still regret using that for geSuit

#

I just cant bring myself to rewrite it too redis

frigid ember
#

idk how to use redis.

silver basin
#

yes

#

its a bit of a learning curve

#

Our BungeeChat system does it - ie updates the tab

#

I would just go find a plugin that handles it for you...dont try and write one

frigid ember
#

understandable but like how would i use it? just implement in my plugin?

cloud sparrow
#

Just use PAPI

#

implement into your plugin by reading their documentation for placeholders to find out other servers player counts.

frigid ember
#

Oh i already have a way to get the Players online

#

i am talking about Max Players allowed on the server

#

there is a placeholder for that too

#

&7(%online%/%online_max%)

#

This is what I have on my lobby

#

And it works

kind berry
#

is there any way to check the in game time with a event or something that will run constently?

#

(like a event)

rain plank
#

Anyone know how to set up voting plugin and votifier D;

dim cape
#

My premium plugin was denied yesterday because of not using oop. I was already working on a re-work of the plugin and it is much better organized now. Is there any kind of rule where I'm not allowed to submit it again? I looked on the premium resource guidelines and I didnt see anything, but I though I should ask here first.

cloud sparrow
#

organized*

#

Anyways no there isn't but you'll have to wait up to the month for it to potentially be accepted.

#

Or if a resource author finds another reason why it shouldn't be accepted.

marsh hawk
#

Is it possible to open a link outside of a chat component? Like say a player presses an item in an inventory. All i've found so far is how to use links within chatcomponents

dim cape
#

up to the month
Do you mean like the normal approval time or will it take longer since im submitting it again?

cloud sparrow
#

normal approval time

dim cape
#

ok, thanks

cloud sparrow
#

sometimes it could take up to a month but it depends on the case.

dim cape
#

last time it took exactly a week for them to deny it

cloud sparrow
#

Well then you were lucky at that time.

mighty tendon
#

hello guys, can anyone help me? my server freezed every x seconds, and this is what the log say

#

any ideas/problem that causes this error?

keen compass
#

would be nice if people would stop only giving parts of a dump

#

@mighty tendon paste the entire thing

#

?paste

worldly heathBOT
mighty tendon
keen compass
#

java.lang.OutOfMemoryError: Java heap space

#

you ran out of memory

#

that was just above the stacktrace you provided where I couldn't see it >>

mighty tendon
keen compass
#

probably shouldn't be allocating 20GB

mighty tendon
#

i always allocated 20gb before

keen compass
#

10GB is plenty enough once you go above that you really need to tune the GC otherwise you end up with freezes because of GC not keeping up

#

if GC can't keep up to free up space for new objects you can still run out of memory

mighty tendon
#

back then and my server didnt got any errors till now

#

hmm so should i reduce that?

keen compass
#

well you have two plugins doing something that causes a lot of ram to be used. Spartan and DiscordSRV in either case I can't tell you why it would be other then that GC is not able to free up the resources that were used, but no longer need to be used so that other objects can use that resource. Second next time you probably should get help in the proper forks channels 😉

mighty tendon
#

sorry haha asking help in paper discord is hopeless

keen compass
#

Also, MythicMobs seems to be generating NPE's which could be the cause of your out of memory problem

mighty tendon
#

hmm okok i see

#

but its kinda weird having out of memory error while still having alot of free memory

keen compass
#

You also have MMOItems generating exceptions on commands as well

#

Worldguard is generating exceptions as well

#

So it seems you have a bit of issues going on

#

especially with plugins

#

would appear they are not all playing nice with each other XD

mighty tendon
#

ooh alrighty then, so theres a chance if i solved all of these "plugins" problem right?

keen compass
#

[02:21:47] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 21487ms or 429 ticks behind

#

It appears I was correct. Your GC is causing the server to freeze which is causing problems

#

You can have 20GB but if the GC can't keep up not much good that does

#

more ram doesn't mean more performance lol

mighty tendon
#

so the solution is just reducing the allocated memory?

keen compass
#

try with like half that, most I would do is 12GB

#

there is jvm flags you can use to optimize the JVM for 10GB or so

mighty tendon
#

the aikar ones right?

keen compass
#

without tuning the GC allocating more ram to it is just making its job harder. Its like taking out the garbage in your kitchen. You can upgrade your garbage can in your kitchen to be large but then it takes you longer to take that garbage out that it would had just been better to stick with a smaller one.

#

but you can have that larger kitchen garbage can if you made the process of removing that garbage also more optimal as well

#

So that is about the best Analogy I can give for the GC lol

mighty tendon
#

alright, so the only option is increasing the allocated GC or reducing the current allocated ram

#

am i right

keen compass
#

Well, you can tune the GC to work more often to avoid those full stop the world GC's

mighty tendon
#

by allocating it higher?

keen compass
#

But If you have like 8GB of ram almost left over, your server should do fine with 10-12GB of ram with a decently tailored GC

#

you don't really allocate ram to the GC, you tune it to do things at what times and how

#

you can give the GC more threads to work with

mighty tendon
#

ok now how do i tune it

#

xd

keen compass
#

Generally use a profiler and GC profiler to determine what to tune. Aikar's flags are a good start to use

mighty tendon
#

yeah im already using it, but i increased the xms and xmx part

keen compass
#

try just setting the max to like 12GB instead

#

and see how that does

#

however, that won't solve some of the issues with them other plugins though

mighty tendon
#

okay, lemme try that, thank you so much for your time^^

keen compass
#

and that is why it is more helpful to have the full dump instead of the partial 😉

#

gives me a better picture of what is going on instead of restricting that information lol

mighty tendon
#

yeah haha sorry about that, its just i didnt really get used about this "asking for help" thingy, im still new about server developing

keen compass
#

well then get in the habit of providing as much info as you can. The more info there is to work with, the more easier it is to point to what is causing the problem. Its like taking a picture of a car and then asking why it won't move but you restricted the picture to the wheel, but had we seen the whole picture we would have spotted there was no motor 😛

mighty tendon
#

ah i see, that makes sense xD again thanks for helping me

#

really appreciate it

keen compass
#

Np, if you still have issues, just come on back. Odds are it will be a new problem instead 😉

mighty tendon
#

got it

vagrant widget
#

Hey does anyone know Microsoft flight simulator ?

keen compass
#

I am sure many know about it

vagrant widget
#

Ok how about this

#

A flight simulator but in a huge multiplayer Minecraft server

#

For the.. poor people .. like.. me :’)

#

I’m pretty sure that’s kinda possible

keen compass
#

would be interesting if you could make that work

vagrant widget
#

Yeah true

keen compass
#

but, then you would be down to the quality of Flight Sim 98

vagrant widget
#

Xd

kind berry
#

this helped cure my never ending sadness thanks @vagrant widget

#

this is even better

vagrant widget
#

I just realized

#

Oops-

kind berry
#

yeah lol

frigid ember
#

This sounds like a fucking insane question but, is it possible to give ''virtual ping'' to minecraft because i would like to have equal ping to my users because when they move around, the players are stuttering, and i host my minecraft server the same network i play it on so that gives me near 0 ping, and the users 70+

frigid ember
#

Hello just went over a post on reddit that claims that this plugin : CAC - The Best and Free Anticheat 0.0.1
installs two other plugins and crashes/breaks/allows the owner to grief the server

#

There are couple reviews about it, I have not tried it myself but if multiple people wrote reviews saying that it might be worth checking it out for some mod / admin

#

When downloading the plugin

cold wharf
#

How to add potion effects with duration and tier?

fleet crane
#

step 1) go to javadocs

#

step 2) type in add potion

hallow surge
#

genius!

lament wolf
#

Laziness and intellectual dishonesty

frigid ember
#

So I am trying to get Grief-prevention-anti-worldedit to work but it doesnt. I am trying to do it so you can only use world edit inside of a claim. Does it not work for latest version 1.15.2? It works in the way that players cant break blocks and stuff in claims but they can use world edit. Someone please help!

modest marsh
#

Hi there, Im using a eco plugin called "BagOfGold" and when i have money in my inventory while on creative and im opening inventory i get this thing

#

[Hidden(0):Gold, Hidden(1):500.00000,Hidden(2):b374fad-429f-4801 and so on

brisk mango
#

contact the plugin author

modest marsh
#

How?

brisk mango
#

there

modest marsh
#

Ye ik but how do i message him

frigid ember
#

damn i got ignored aha

keen compass
#

well you are asking about help to get a plugin working, which generally this isn't what this is for

#

might be able to, but don't be surprised if no one knows lol

brisk mango
#

^

torn robin
#

@modest marsh you click "Start a Conversation"

#

then type "Rocologo" in the participants

spring cradle
#

You want EnchantmentStorageMeta instead
@subtle blade oh ok
You want to create an Enchanted Book that will apply the enchant with the anvil, is that right ?
@signal yarrow yes !

frigid ember
#

Hey guys, I have an MacBook Pro server on OS X El Capitan. I got the server to run but I need to op myself. I checked but the window, showing the logs and the commands is gone. I have tried different versions of the server but it didn't work. Any way I can fix it? Btw, I have 1.13.2 version of Spigot, due to my plugins not supporting 1.15.2. Thx!

#

if you bought a macbook pro server, you kinda got scammed 😳

#

No, I meant I had an old MacBook Pro that I upgraded to high-specs for an Media server.

#

And this is becoming off-topic.

#

Anyways, can we find a way to fix my problem?

bronze marten
#

Show screenshots, startup logs or sth

frigid ember
#

Ok.

#

How can I send you logs? I can't send through discord because it reaches the limit.

#

@bronze marten

bronze marten
frigid ember
#

ok

#

@bronze marten

sturdy oar
#

idk use LuckPerms and give yourself every permission

#

that's kinda like OP

frigid ember
#

?

#

How am I suppose to do that? I can't even use commands....

limber sierra
#

@rain plank Voting plugin shouldn't be that bad - Votifier's not that bad either, just copy the public key to wherever, and that should be it (this tool helps: https://mctools.org/votifier-tester)

sturdy oar
#

oh my bad didn't know that was the issue

real surge
#

20ms

limber sierra
#

Can you not use commands in the console?

bronze marten
#

But the server starts up@normally? Why cant you use commands? How do you start the server

limber sierra
#

Usually you can use /lp editor, and from there give yourself *.

frigid ember
#

No, the console is literally hidden for some reason. The java app is open but it doesn't show up...

sturdy oar
#

wut

limber sierra
#

Are you opening it headless?

bronze marten
#

Start it from terminal.app

limber sierra
#

^^^^^^

sturdy oar
#

how are you starting the server tho

#

like do you have a start.command

bronze marten
#

java -jar server.jar —nogui

sturdy oar
#

I can pass you my macOS script i use for local server

bronze marten
#

Then inside the terminal you type commands

frigid ember
#

Sorry, I was gone for a few seconds, what was it again?

limber sierra
#

Start your server from terminal, basically

#

Either that, or whatever nogui/headless flag you have

frigid ember
#

@limber sierra I don't open headless, @sturdy oar, I don't have an start command as it fails to work as it thinks I have java 58.

#

Can someone help me get the player limit of another server ie: Hub => Test => Hub

limber sierra
#

@frigid ember Try run the server directly from terminal

frigid ember
#

How do I start?

sturdy oar
#
#!/bin/bash
cd "`dirname "$0"`"
exec java -Xms10G -Xmx10G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -jar server.jar --nogui```
I use this i think
limber sierra
#

that's a big boi

frigid ember
#

dang boi he thiccc

limber sierra
#

Not massively familiar with MacOS, I believe it's in launchpad?

#

Search for Terminal

frigid ember
#

I know where Terminal is, not the command though.

#

Sorry for confusing ya mate. I'm confusing a lot of the time lol

limber sierra
#

Lol dw

#

I'm doing a few things at once rn so I'm confusing myself

frigid ember
#

Oh lol

limber sierra
#

Open terminal, cd your way to your server directory

frigid ember
#

Yup

limber sierra
#

from there, type java -jar server.jar

#

obvs replace the jar name

#

then from there it should give you the output

sturdy oar
#

bruh just make a script .-. are you going to type the commands each time

limber sierra
#

^^^^

frigid ember
#

Alright.

limber sierra
#

that too

sturdy oar
#

and also i recommend using a screen

#

or tmux

limber sierra
#

but for diagnostics more than anything, i'm keeping it simple

#

is screen on mac?

sturdy oar
#

sure

limber sierra
#

oh wait ofc it is

#

ignore me

sturdy oar
limber sierra
#

im a big loser

frigid ember
#

Unsupported Java detected (58.0). Only up to Java 12 is supported.

#

That's why, I couldn't use start command.

sturdy oar
#

yeah so you have java 14

limber sierra
#

58 🤔

sturdy oar
#

I think you can use Java 14 with 1.15.2 tho

limber sierra
#

Didn't even know Java 14 was a version

#

TIL

frigid ember
#

Yeah, but 1.15.2 doesn't support my plugins.

sturdy oar
#

how is a plugin not working on 1.15.2 but is on 1.13.2

#

weird

frigid ember
#

Its some scoreboard plugins.

sturdy oar
#

If I'd were you I'd honestly change plugin

#

but i guess it's your choice

frigid ember
#

Yeah, I tried but all of them failed.

sturdy oar
#

yeah they might be using NMS for some weird scoreboard stuff

#

so it breaks

frigid ember
#

Anyways, I don't know what to do...

limber sierra
#

Tried TitleManager?

frigid ember
#

TitleManager?

sturdy oar
#

As I said, downgrade your java

#

and get 8 or 11

limber sierra
#

Does scoreboards too

#

Thatbtoo

frigid ember
#

Yeah, how do I downgrade Java?

limber sierra
#

OpenJDK 8 is my preferred

sturdy oar
#

you download another one lmao

frigid ember
#

I know, but that doesn't help.

sturdy oar
#

you then set it as the main one from the PATH

limber sierra
#

Uninstall, then apt-get install openjdk-8-headless (i think?)

#

No idea if mac has apt

sturdy oar
#

no

#

this not ubuntu

frigid ember
#

Ok.

#

Command not found

limber sierra
#

I started thinking Mac was the same as Linux lmao

#

Ignore me lmao

sturdy oar
#

yeah because APT is from debian lmao

#

I think you either have to search on brew, or just run the installer

frigid ember
#

Ok.

sturdy oar
#

also don't go install weird JDKs

frigid ember
#

Ok.

sturdy oar
#

I once installed BellSoft Liberica and my client broke

frigid ember
#

Anything I can do?

#

Still does an error.

sturdy oar
#

which error

limber sierra
#

What's the error?

frigid ember
#

The 58.0 error

sturdy oar
#

oh of course, let me guess, you haven't changed the path

frigid ember
#

No

sturdy oar
#

well you need to set the path and make sure that it works

frigid ember
#

Ok.

sturdy oar
#

you can do java -version

frigid ember
#

Ok

sturdy oar
#

to check the correct version is running as default

frigid ember
#

Java 14

sturdy oar
#

I mean you can do it in 2 ways

#

either set the proper path for your JAVA_HOME, or specify the java executable in your startup script

#

the first one is recommended

frigid ember
#

First one then.

#

How do I do the first one?

sturdy oar
#

🤷‍♂️ I don't remember

#

i think

frigid ember
#

Oh ok

frigid ember
#

ok

limber sierra
frigid ember
#

Alright, I will try first

#

Plz wait

atomic imp
#

so my friend has a survival server and we want to sell thing items for items, whats a good free plugin for it that isnt hard to setup when we make the shop, we want the plugin to be a chest and sign as the shop

sturdy oar
#

I have to leave 😂

atomic imp
#

we searched for one but we couldnt find one

frigid ember
#

Can someone help me get the player limit of another server ie: Hub => Test => Hub

sturdy oar
#

with PlaceholderAPI?

real surge
#

pub/sub @frigid ember ?

limber sierra
#

@atomic imp Would recommend ShopGUI+ but that's paid, either google "spigot shop" or create a menu with DeluxeMenus that takes an item in exchange for another item

atomic imp
#

I want it to be a chest on the ground and you right click the sign

limber sierra
frigid ember
#

Like, I get the Player Limit From my KitPvP Server and then it comes back to the hub telling me it so i can Display the text if placeholderapi can do this for me that would be great.

atomic imp
#

what about a /auction plugin that does item for item?

sturdy oar
#

rbuh can you give some context

#

like how are you trying to achieve that

#

programming? PlaceholderAPI? other ways?

frigid ember
#

Programming of course?

sturdy oar
#

it's not of course lmao

#

anyway

frigid ember
#

I fixed it guys! @limber sierra @sturdy oar

#

I fixed it by deleting the other versions, apart from Java 11!

limber sierra
#

@atomic imp I think there's a couple of plugins that use items as an economy, ssw it a while ago so not too sure - find an item-based economy plugin and use a normal auction plugin

#

@frigid ember ggwp

frigid ember
#

Thanks everyone for helping!

sturdy oar
#

I think that you can get the player limit of other servers from ServerInfo

limber sierra
#

enjoy urself :)

frigid ember
#

I'll be setting up my server! c:

#

ServerInfo?

real surge
#

bungeecord

frigid ember
#

how would bungeecord achieve that.

sturdy oar
#

oh wait

#

you can only get the online players

#

you might have to ping it

frigid ember
#

I ping the server to get the Online players, but i wouldnt have a clue on how to get offline.

sturdy oar
frigid ember
#

not offline

sturdy oar
#

ServerPing has a max and online field

#

just use the callback

frigid ember
#

wouldn't have a clue on how.

frigid ember
#

that didnt really help.

atomic imp
#

I still cant find anything

chrome edge
#

Is it possible to disable console kick message? Whenever player joins server, console shows kick message twice. Both lost connection and disconnecting

atomic imp
#

I want a plug-in like this but with some good permissions

#

Because that requires you to have op to use it, and my friend doesn’t want to give us op in survival mode

#

Please help

frigid ember
#

it doesnt require op lmfao

atomic imp
#

Yes it does

#

We tried it

frigid ember
#

do you have a permission plugin.

#

ie: PermissionEx

atomic imp
#

No.....

#

So if we install it... it will just work

frigid ember
#

Nope.

#

you need to set it up

atomic imp
#

Ok

#

Thank you so much

frigid ember
#

😩

tiny dagger
#

that 124 line at profilehelperuid 👀

#

or 78

obtuse rose
#

Most common throwable you will find

#

👍

tiny dagger
#

best way to fix them:
try {
} catch (exception e) {
//silence
}

#

🤥

terse river
#

Hello. I got this message, when i try to send a plugin message from bungee. Why?

wraith apex
#

You got two of the same plugin trying to load

terse river
wraith apex
#

(did you accidently save a plugin as something else, making duplicates I did this all the time)

#

no physical plugin files

terse river
brisk mango
#

@tiny dagger thats not the best way to fix them.

#

the best way is

#

try {

} catch (Throwable ignored) { }
tiny dagger
#

oh yeah

brisk mango
#

@terse river The exception occurs while you are trying to make new instance of your main class like new Main(), or basically when you have 2 plugins with the same package name and same name of main class

terse river
brisk mango
#

show me where youre sending it tho

terse river
brisk mango
#

why are you sending me the fucking class names

#

i want to see when it occurs

#

not the fucking class names

#

what im supposed to do with that

terse river
#

i send it via a command with this function

brisk mango
#

what are you exactly sending tho

terse river
#

new TestPluginBungee().sendCustomData("Test123", "Test456");

brisk mango
#

there

#

new TestPluginBungee()

#

i suppose its the main class

#

you are not allowed to make new instance of main class

terse river
#

TestPluginBungee ist the main class right

#

ah ok

brisk mango
#

no dont use singleton

#

static very bad

terse river
#

getProxy().getPluginManager().registerCommand(this, new SendCommand(this));

brisk mango
#

yes

terse river
#

ok

brisk mango
#

you can do final on TestPluginBungee

terse river
#

it works

#

thank u

vernal spruce
#

what does player.inv.getItemInMainHand returns if there is no item?

#

it returns a NotNull

hollow thorn
#

how would i make a mob that can use custom weapons

#

of weapons that can be used by amob

#

(ranged)

brisk mango
#

AIR @vernal spruce

vernal spruce
#

bit dumb how it wont return null but i guess..

frigid ember
#

that's minecraft for you

brisk mango
#

@vernal spruce why would it be dumb

#

its an item in main hand

#

and if there is no item

#

means its AIR

#

its not dumb

vernal spruce
#

because 80% of the api returns null in this situation

#

seems like specifically this returns air

fleet crane
#

Yeah the API is inconsistent unfortunately

tropic nacelle
#

who's fault is that

fleet crane
#

Hard to remedy inconsistencies once plugins depend on them :(

hoary parcel
#

V2 when

fleet crane
#

Hopefully not mine

hollow thorn
#

how would i make a mob that can use custom weapons
of weapons that can be used by amob
(ranged)

vernal spruce
#

hmm take a look how skeleton does it

#

maybe a certain field in nms

tiny dagger
#

tbh md5 when you passed from 1.12 to 1.13+ it was just better to break and improve the api as much as you could

#

seemed like the best time to do it imo

vernal spruce
#

you never know mybe another change from mojan will force it

tiny dagger
#

hopefully

keen cedar
#

What's the best way to dynamically set all of your plugins' command's no permission messages?

#

There's no JavaPlugin#getCommands to iterate through your registered commands and set them, and Bukkit's Command Map isn't exposed, so I'm not sure the best way to do this.

#

I need to:

  1. Get all of my plugin's registered commands.
  2. Iterate through them and set their permission message to something.
#

I'm having trouble with that first step.

#

Would it be possible to add JavaPlugin#getCommands or would that be undoable with current implementation?

silk cape
#

need help with loottables .json

#

file

hollow thorn
#

could you make it multi compatible

#

so it reutrns both null and air

#

or make null = to air

vernal spruce
#

nah we can simply replace ==null to type==air..

#

not much of a husstle

subtle blade
#

Wish Bukkit would take the Mojang approach and have items be non-null throughout the entire code base 😦

#

ItemStack.isEmpty() is great

#

But, again:

Hard to remedy inconsistencies once plugins depend on them 😦

tropic nacelle
#

Just break em

chrome edge
#

I'm planning to make report plugin and want to know something. If one player reported several times on different categories what will happen? I made a GUI that shows report category but I don't know if there is more report relevant to the reported player. Do you guys have any idea for this case?

tropic nacelle
#

Just rate limit em so they can't spam

subtle blade
#

If one player reported several times on different categories what will happen?
Are you asking us how your plugin should work? lol

chrome edge
#

I meant to say report system has 4 category like cheating, bad skin etc.

#

@subtle blade Actually no. I just wanted to know how to show more than one report

tropic nacelle
#

It's ur plugin

ashen stirrup
#

How would you set a block (from location) in a runnable? It tells me it needs to be final.

#
        for (int i = 0; i < world.getMaxHeight(); i++){
            Bukkit.getScheduler().scheduleSyncDelayedTask(GenBucketTest.getInstance(), new Runnable() {
                @Override
                public void run() {
                    if (world.getBlockAt(genLoc) != new ItemStack(Material.BEDROCK)) world.getBlockAt(genLoc).setType(block);
                }
            }, 30L);

            genLoc = genLoc.add(0.0, 1.0, 0.0);
            blocksPlaced++;
        }
chrome edge
#

Basically I'd like to know the idea. If you have 5 report which are cheating, spamming etc.

  1. If I check your report and ban you what would happen other 4 reports?
  2. If you have 1 cheating report, can other player report you?
silk bane
#

@ashen stirrup make the thing it tells you to make final final then

subtle blade
#

Move all of that into your one runnable

#

and make it a task timer

ashen stirrup
#

Alright

subtle blade
#

Would need slight modification but yea

#

Use a task timer and decrease a field there instead

chrome edge
#

@ashen stirrup You've to set your veriable as final. Task may delayable

ashen stirrup
#

^ what?

#

And alright, I'll try that

chrome edge
#

You cannot change "genLoc" due to delay. If you consider, the task is delaying.

#

@subtle blade Do you have any idea what I said? I just want to get the idea...

subtle blade
#
Bukkit.getScheduler().runTaskTimer(plugin, task -> {
    if (genLoc.getBlock().getType() == Material.BEDROCK) {
        task.cancel();
        return;
    }

    genLoc.getBlock().setType(blockoo);
    genLoc.add(0.0, 1.0, 0.0); // Do you mean subtract() here? I'm only writing add() because you did
}, 0L, 30L);```
#

Timers run at regular intervals

ashen stirrup
#

Yeah, it's supposed to go from bedrock level to the sky

#

Cheers

subtle blade
#

Instead of having upwards of 255 runnables, you can just have one

silk bane
#

why use a task at all? just set them all at once

subtle blade
#

For the effect

ashen stirrup
#

^

subtle blade
#

Based on what I wrote, looks like a genbucket thing

#

factions I presume

silk bane
#

cool

ashen stirrup
#

Yeah

silk bane
#

do they normally start at the bottom?

subtle blade
#

Though I have a feeling that condition is never going to be true because you're checking for bedrock

#

Right that's kind of what I'm thinking to

naive goblet
#

Choco Runnables aren't cancellable?

subtle blade
#

Timers are

#

Oh, shit

#

BukkitRunnable

#

😅

silk bane
#

br -> ... br.cancel()

subtle blade
#

Yep

#

Fixed

real surge
#

hello I have a properties file to get key/value for my plugin but I can't get the path to the file I put "plugins/MyPlugin.jar/messages.properties" and I got the FileNotFoundException

#

(I'm French sorry for my English)

wraith thicket
#

So the file is in your jar?

real surge
#

yes

wraith thicket
#

Did you move it from your jar to the actual file system/disk?

real surge
#

compiled with maven

#

I didn't undestand what you said

#

understand *

wraith thicket
#

Your messages.properties is in your .jar - yet it sounds like you're trying to read it form the disk

real surge
#

yes

#

it is in my folder resources on my maven project

wraith thicket
#

How are you trying to read the file exactly?

#

That'll copy the file from your jar to the plugins/YourPlugin/ folder

real surge
#

File file = new File("plugin/FallenKingdom.jar/messages.properties");

wraith thicket
#

There is no such file on your disk, though

real surge
#

I know how to copy it but I can't get it

wraith thicket
#

That will copy the file from your .jar to plugins/YourPlugin/ folder

#

FallenKingdom.jar is not a directory, it's a file

real surge
#

yes

#

and how I do to get the .properties to copy it

wraith thicket
#

Hence plugin/FallenKingdom.jar/messages.properties makes no sense- a file does not behave as a directory

real surge
#

I just put Plugin.saveRessource();

wraith thicket
#

You need to use the saveResource method of your plugin instance and pass "messages.properties"

real surge
#

ok

wraith thicket
#

Just like the javadocs say

real surge
#

thank you

#

it works perfectly 🙃

waxen niche
#

Anyone know why BuildTools is building the "wrong" version for certain builds? Building 1.8.4 will return 1.8.8, same with 1.8.5, .6 and .7. Building 1.10 also builds 1.10.2 ?

hidden glade
#

Huh?

subtle blade
#

No reason to be running those minor builds anyways

waxen niche
#

java -jar buildtools.jar --rev=1.8.5 will build and return spigot-1.8.8

#

The question is merely, is it building 1.8.8 on purpose, or is it actually 1.8.5 and the filename is just wrong, or is there a bug?

hidden mica
#

Uhm.. so i need some help with Maven and Intellij (NOT a minecraft plugin, just a java program)
I don't know how i can set it to "Run as Maven build" or anything like that, and i somehow need to make the pom.xml myself
does anyone have a solution, or a copy of a pom.xml?

naive goblet
#

Just create a new Maven project?

hidden mica
#

but it's a java project

#

so i should just delete my project and create a maven one, or?

naive goblet
#

I believe so

#

It’s easier that way

#

@waxen niche don’t use the = and it should create the right one I think

frigid ember
#

Hello, I have a problem because I need to download enachnted golden apple from equipment but it is not available as material. Version: 1.15.2

gentle oriole
#

just a quick question is there a build for the new snapshot?

subtle blade
#

Material.ENCHANTED_GOLDEN_APPLE

#

It most definitely exists lol

#

khellberg, no. Snapshots are not released publicly

#

and if you've played on the server and seen how often it crashes, you'd understand why ;P

waxen niche
#

@naive goblet Would be very odd if that was the issue, but will test it out. When I'm using --rev=1.8.5, it starts out by giving the right build, version info and what not,. The problem is the finalized compiled jar, which is, according to it's own name, spigot-1.8.8.jar

gentle oriole
#

ahh didn't know im hosting a server for my office and they wanted plugins . Thanks For the answer

keen compass
#

@waxen niche the other versions have security vulnerabilities that some of it is fixed in 1.8.8 from spigot. Not sure if spigot patched all of the security flaws but do know some of them are patched in that version. Meaning all prior versions before that are not safe to run. In general not safe to run outdated versions anyways lol

waxen niche
#

I just noticed that version 1.8.4 to 1.8.7 is missing from the version list on the buildtools wiki

#

It has 1.8.3 and 1.8.7 and 1.8.8, but the versions between are missing

#

Version 1.10 is listed tho, but it will build 1.10.2

#

But you're right, I think, 1.8.7 is listed, but trying to build that now will also return 1.8.8

keen compass
#

Doesn't make sense to distribute known versions to contain security vulnerabilities especially if a patch to fix some if not all was made 😉

waxen niche
#

No, of course not. But they are listed and included

#

So it makes sense to build something you claim it will build :P

keen compass
#

you technically still can

waxen niche
keen compass
#

those files just contain the commit hashes for those versions

#

so if you really need those versions you can use git to checkout that commit hash for that version and then build it yourself. Just can't use buildtools to do it.

waxen niche
#

Alright, it's not that important, just got confused when I didn't get the result I expected. Tho, 1.8.7 should be removed from the wiki like it's older siblings as well, considering you can't build it anymore

keen compass
#

Wiki at times gets behind on its information

#

only so much volunteer people can do you know 😉

waxen niche
#

Yeah, I just realized I could edit it myself :P

keen compass
#

but buildtools isn't the only thing that uses those files, those files are also for developers

#

to know at what commits each version is

waxen niche
#

Right, I get that the json files is not really related, but it was those I originally got my "info" from, and just now, 10 minutes ago, I realized that the version list on the actual buildtools page had different versions

#

So my mistake was using the json as reliable information, when the wiki actually already contained it, besides two small issues

keen compass
#

Well now you know why buildtools does what it does and why it probably isn't a good idea to run versions lower then 1.8.8

#

should just stick with the updated versions but alas people seem to want to still support 1.8

#

even if that population of people is shrinking rapidly XD

tiny dagger
#

atlas?

#

or alas?

#

:d

waxen niche
#

Alas, people on the atlas

tiny dagger
#

it was atlantis

waxen niche
#

But thanks, I would have scratched my head a while longer trying to figure this out if it wasn't for your answers

#

Appreciate it

keen compass
#

you are welcome

ocean sparrow
spare frost
#

On line 49, should I use .equals or == to compare?

#

@subtle blade :o :D elp me

subtle blade
#

idk what Map is

#

A Java Map?

tiny dagger
#

doubt

#

Map map = manager.getMap(name);

#

use ==

spare frost
#

oh my bad, its a game map

keen compass
#

Its a Map item I think

tiny dagger
#

object

subtle blade
#

If you’re not creating new instances every time you access that map, i.e. it’s pulled from some registry, it’s probably fine to be reference comparable

spare frost
#

I should have named it differently.

#

yes theres only one reference to it

#

Map are immutable and like only hold info

subtle blade
#

Then it’s reference comparable ;P

spare frost
#

yay

#

but if I did .equals it would still work?

tiny dagger
#

yeah

#

by default its the same

subtle blade
#

Yes because it defaults to == unless overridden

spare frost
#

oh

subtle blade
#

That’s why you should generally override hashCode and equals when you have data objects

#

Though here it’s fine

spare frost
#

should I override equals and make it compare the names?