#help-archived

1 messages · Page 214 of 1

tacit spoke
#

Yes, but I can't find it for version 1.8

#

Yes,

pastel nacelle
#

maybe don't use a version that is over 5 years out of date

tacit spoke
#

1.8 And 1.8.8

grim halo
#

@tacit spoke Go in the updates and search for old versions
@frigid ember Search in anchient archives if someone else had this error. 1.8 is very old and outdated.

tacit spoke
#

ok

#

Thanks

grim halo
bleak osprey
#

Hey guys,

i got the problem that a website cant reach the Port 8195 on my server. I opened the Port at the UFW and its free on my server.. idk whats the matter, can anyone help me out?

grim halo
#

@bleak osprey Check open (tcp) ports with netstat -lt

bleak osprey
#

cant see ports in there

#

oh yes i do

#

tcp 0 0 v22020041189561149:8195 0.0.0.0:* LISTEN

#
00:37:42 [SEVERE] [NuVotifier] Votifier was not able to bind to /192.145.46.62:8195```
sturdy oar
#

Yeet

bleak osprey
#

yes

grim halo
#

v22020041189561149:8195 What is that??

bleak osprey
#

the server name

grim halo
#

No idea... try forwarding 0.0.0.0:8195

sturdy oar
#

v22020041189561149:8195 What is that??
@grim halo might be a long addres

frigid ember
#

How can I run a BukkitRunnable() inside:

public class Spawns implements CommandExecutor {
public static Integer getRandomInt(Integer max) {
Random ran = new Random();
return ran.nextInt(max);
}

public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (cmd.getName().equalsIgnoreCase("sp-iasw")) {
//bukkitrunnable
        }
return false;
}
}```
sturdy oar
#

Ipv4s can be expressed as a long value by shifting their groups bytes

#

How can I run a BukkitRunnable() inside:

public class Spawns implements CommandExecutor {
public static Integer getRandomInt(Integer max) {
Random ran = new Random();
return ran.nextInt(max);
}

public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (cmd.getName().equalsIgnoreCase("sp-iasw")) {
//bukkitrunnable
        }
return false;
}
}```

@frigid ember I don't suggest you create a new Instance of Random each time you call that method

bleak osprey
#
00:41:38 [INFO] [NuVotifier] Votifier enabled on socket /0:0:0:0:0:0:0:0%0:8195.00:41:38```
frigid ember
#

Oh that random isnt supposed to be there, I forgot to remove XD

pastel nacelle
#

i don't suggest you use Integer where you should use int

sturdy oar
#

Anyway use Bukkit.getScheduler()

#

And get the plugin with dependency injection

grim halo
#
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
      if (cmd.getName().equalsIgnoreCase("sp-iasw")) {
        Bukkit.getScheduler().runTask(plugin, () -> {
          System.out.println("Im running one tick later");
        });
      }
      return false;
    }
    public boolean onCommand(final CommandSender sender, final Command cmd, final String label, final String[] args) {
      if (cmd.getName().equalsIgnoreCase("sp-iasw")) {
        new BukkitRunnable(){

          @Override
          public void run() {
            System.out.println("This also works...");
          }
          
        }.runTask(plugin);
      }
      return false;
    }

@frigid ember

sturdy oar
#

Lambda ftw

frigid ember
#

}.runTask(plugin); for plugin I just use Spawns?

bleak osprey
#
> 00:45:37 [WARNING] [/194.169.211.218:45848] <-> InitialHandler - read timed out
> 00:45:38 [WARNING] [/194.169.211.218:45854] <-> InitialHandler - read timed out```
#

@grim halo

#

test vote cant be reached

grim halo
#

@frigid ember For plugin use your plugin instance

frigid ember
#

ah ok

barren egret
#

is redstone supposed to ignore cancelling physics updates?

stark oxide
#

a quick question: how can I change my plugin's icon?

grim halo
#

Redstone has its own event

stark oxide
#

a quick question: how can I change my plugin's icon?
@stark oxide in the spigot website i mean

grim halo
#

@stark oxide You mean in the forum=

stark oxide
#

yes

frigid ember
#

Ok so im stuck at:

    private static Spawns instance;
    public static Spawns getInstance() {
        return instance;
    }
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        instance = this;
        if (cmd.getName().equalsIgnoreCase("sp-iasw")) {
            new BukkitRunnable(){

                  @Override
                  public void run() {
                    System.out.println("This also works...");
                  }
                  
                }.runTask(this);
        } 
return false;
}

runTask gives me:
The method runTask(Plugin) in the type BukkitRunnable is not applicable for the arguments (Spawns)

lone fog
#

That isn't you main class

#

You need an instance of your main class

frigid ember
#

So use the one from my Main?

grim halo
pastel nacelle
#

don't call it main

#

but yes

stark oxide
#

thanks!

frigid ember
#

How can I call it from my Main? This is new to me as im used to putting everything in main im trying to understand to make things neater/clean looking

lone fog
#

Create an instance of your main and pass it to the constructor of spawns

grim halo
#

Create an instance of your main <- Dont

pastel nacelle
#

the instance of your main is created by the server

frigid ember
#

just pass ur main into constructor

pastel nacelle
#

and it is a singleton

lone fog
#

Right

#

Just pass this

grim halo
#

this refers to the instance you are currently in.
So in your "main" class you pass this as an argument if you want to pass a reference to another class.

pastel nacelle
#

objects n stuff

#

u know

spare frost
#

Can entities like armorsatnds have custom nbt keys/values?

lone fog
#

Yes

spare frost
#

Can I do it with NBT API?

lone fog
#

Entities have persistantDataConatiners

spare frost
pastel nacelle
#

use the PDC

spare frost
#

its for a minigame so it doesnt have to last over restarts

lone fog
#

Unless you are on super old versions

spare frost
#

im on 1.12.2

lone fog
#

Ah

pastel nacelle
#

rip you i guess

grim halo
#

If it doesnt need to persists you can just use metadata no?

lone fog
#

Or a map

frigid ember
#
                if (cplayer.isLeader()) {
                    p.closeInventory();
                    p.sendMessage("");
                    p.sendMessage("§c Are u sure?");
                    p.sendMessage("§c If yes, type 'YES' on the chat.");
                    p.sendMessage("");
                    p.performCommand("clan desfazer");
                    p.playSound(p.getLocation(), Sound.CAT_MEOW, 1.0F, 0.5F);
                    return;
                }
            }

How can i verify if the player send the message "YES" to the chat and the execute the command "clan desfazer"?

grim halo
#

Yes or a map...

quick arch
#

its for a minigame so it doesnt have to last over restarts
metadata

#

pretty sure it's dumb though

grim halo
quick arch
#

I remember having to serialize it back to it's actual type because it was all strings for me 🤔

frigid ember
pastel nacelle
#

conversation is the most horrid shit ever imo but it does have its uses

frigid ember
#

haha

#

conversation is the most horrid shit ever imo but it does have its uses
What would you use on that case?

#

To verify the message

pastel nacelle
#

I don't know what you're doing here, but I'd probably do what towny does

#

use a command to confirm and not a chat message

#

I prefer the freedom of choosing whether I'm entering a command or speaking to chat

#

the conversation api strips that freedom

#

i no longer have the choice to use chat

#

I must respond to whatever plugin wants me to respond before I can talk in chat

frigid ember
#

I don't know what you're doing here, but I'd probably do what towny does
I just want the player to confirm the action before doing it

pastel nacelle
#

just use /yourplugin confirm

#

or /confirm, if it isn't taken already, I guess

frigid ember
#

Hmm, well

#

Thanks!

quick arch
#

Could just make it a json message and have them click it

#

🤔

pastel nacelle
#

also a very good option

spare frost
#

How do I set metadata to an armorstand?

grim halo
#

ArmorStand#setMetadata(String metadataKey, MetadataValue newMetadataValue)

quick arch
#

metadata is horrible

#

🤢

spare frost
#

Does it last when you restart the server/

lone fog
#

no

grim halo
#

I mean just throwing them in a map is probably faster

quick arch
#

^

#

their uuids 🤔

frigid ember
#

null for location

#

line 45: Location loc = Location.deserialize(se.getConfigurationSection(reason + ".location").getValues(false));

quick arch
#

do you know that there's...

#

getLocation() right?

#

unless your outdated 🤔

frigid ember
#

nah im in 1.16.1

quick arch
frigid ember
#
deathlocation:
  e9d30742-403e-4726-8b0f-de85903ede35:
    Lazinq fell out of the world:
      time: 1596410212700
      location:
        world: world
        x: 230.5
        y: 73.0
        z: 242.5
        pitch: 3.300001
        yaw: -4.050001```
quick arch
#

then there's getLocation()

frigid ember
#

for getting it out of a config.yml file?

quick arch
#

yes

#

YamlConfiguration#getLocation("test.test")

#

etc

frigid ember
#

deathlocation.location

quick arch
#

oh wait

frigid ember
quick arch
#

🤔

#

You can just directly set the location instead of having to serialize it

#
set(key, location);
frigid ember
#

yes and im deserializing it

quick arch
#

then use getLocation(key) on it

frigid ember
#

wdym?

#

that was for saving

quick arch
#

🤔

#

o

frigid ember
#

with loading ive to get the info and put it into the .yml file again

spare frost
#

All entities have unique ids right?

pastel nacelle
#

"yes"

quick arch
#

myes 😏

pastel nacelle
#

with a very small footnote of "maybe an uuid collision will happen eventually"

quick arch
#

it's really small, dw

#

Won't happen unless your server's been on for decades

lone fog
#

I know piece of wood has a patch for it

#

idk if spigot does

quick arch
#

probably not 🤔

grim halo
#

@frigid ember

  1. Dont use '%'
  2. setIngredient​(char key, RecipeChoice ingredient)

So if you want an exact recipe choice:
new ExactChoice(ItemStack)

lone fog
#

*ExactChoice only works for ShapedRecipes

frigid ember
#

how would u guys get location for the player's uuid out of this .yml file

#

that is formatted like this

pastel nacelle
#

by redoing the way the yml is formatted

#

because that is kinda cancer

grim halo
#

ConfigurationSection#getLocation(String path)
And also save it like you are supposed to do

frigid ember
#
    private void saveData() {
        dataMap.forEach((uuid, list) -> {
            for(Data data : list){
                String saveKey = "deathlocation." + uuid + "." + data.getReason() + ".";
                getConfig().set(saveKey + "time", data.getTime());
                getConfig().set(saveKey + "location", data.getLocation().serialize());
            }
        });
        saveConfig();
    }```
quick arch
#

🤔

#

it's being saved everytime it's called?

grim halo
#

Dont .serialize() by hand

quick arch
#

^

frigid ember
#
    public String locToString(Location loc) {
        return loc.getWorld().getName() + ", " + loc.getBlockX() + ", " + loc.getBlockY() + ", " + loc.getBlockZ();
    }```
#

I had this method

quick arch
#

also, can't maps be put into yaml

frigid ember
#

but someone told me to use serialize so I could deserialise

pastel nacelle
#

ideally you would save the world by UUID and not name, unlike the bukkit location serializer

quick arch
#
set(key, location) // Serializes already
getLocation(key) // Deserializes
frigid ember
#

but how can I use getLocation(uuid) here?

pastel nacelle
#

depends on where the location is

frigid ember
#
ItemStack d1 = new ItemStack(Material.STICK);
        ItemMeta d2 = d1.getItemMeta();
        d2.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&6&lReinforced Stick"));
        d1.setItemMeta(d2);
        d1.addUnsafeEnchantment(Enchantment.DURABILITY, 1);
        ShapedRecipe r1 = new ShapedRecipe(d1);
        r1.shape("SSS","SSS","SSS");
        r1.setIngredient('S', ExactChoice(Material.STICK));
        Bukkit.getServer().addRecipe(r1);
``` getting an error for ExactChoice
grim halo
#

ExactChoice is not a method but a class

frigid ember
#

Ah

#
                getConfig().set(saveKey + "location", data.getLocation());

deathlocation:
  e9d30742-403e-4726-8b0f-de85903ede35:
    Lazinq fell out of the world:
      time: 1596410212700
      location:
        world: world
        x: 230.5
        y: 73.0
        z: 242.5
        pitch: 3.300001
        yaw: -4.050001```
pastel nacelle
#

String saveKey = "deathlocation." + uuid + "." + data.getReason() + ".";
Location loc = config.getLocation(saveKey + "location");

patent monolith
#

Does anybody know of a library or method that can parse a String into a String array while taking into consideration quotation marks similar to command prompt or a terminal of some sort?

grim halo
#

Also new ExactChoice(Material.STICK) is not valid as it takes ItemStacks only

pastel nacelle
#

in order to get the location from this

#

you need to know the UUID and the death reason

quick arch
#

could just be formatted into this

deaths:
  %uuid%:
    %int%:
      time: //time here
      reason: // reason
      // location serialized with set(key, location)
#

🤔

frigid ember
#

it can be

#

but why int

pastel nacelle
#

keying it by int will let you save every death in the file

quick arch
#

^

#

It could also be by time but that's a mess

pastel nacelle
#

keying it by reason will only let you save 1 death per reason

cyan kelp
#

How can I show a title to all players in a server?

frigid ember
#

ohh ok

pastel nacelle
#

show a title to one player on the server

#

and then repeat that for all of the players on the server

cyan kelp
#

How can I get an array of players so I can loop through it?

pastel nacelle
#

Bukkit.getonlineplayers

cyan kelp
#

Thanks

quick arch
#

🤔

#

yes, good death reason

pastel nacelle
#

ideally you'd use a list of maps

#

instead of a map of maps keyed by autoincrementing number

#

but it probably doesn't matter

quick arch
#

uh... he has a map for the deaths

pastel nacelle
#

and what is list here

quick arch
#

no idea, probably list of locations

pastel nacelle
#

well this is a map

quick arch
#

reason, time, etc

pastel nacelle
#

of lists

#

of maps

quick arch
#

and it's a mess 🤔

pastel nacelle
#

myes

#

Map<UUID, LIst<Map<String, Object>>> is what the data ends up as basically

quick arch
#

😬

#

yeah that's a mess

pastel nacelle
#

though your link was a Map<UUID, Map<Integer, Map<String, Object>>>

grim halo
#

That looks like it should be encapsulated in a ton of new classes...

pastel nacelle
#

this, i mean

#
deaths:
  1234-56789-2348-2394-294:
    1:
      time: 12345678
      reason: "Ha you dead!"
      location: // Serialize
    2:
      time: 12345790
      reason: "You dead again!"
      location: // Serialize
quick arch
#

good enough

pastel nacelle
#

this is a map holding maps holding maps

quick arch
#

I don't serialize maps e_e

pastel nacelle
#

needs to be a map holding lists holding maps reeee

quick arch
#

then I may serialize it

pastel nacelle
#
deaths:
  1234-56789-2348-2394-294:
    - time: 12345678
      reason: "Ha you dead!"
      location: // Serialize
    - time: 12345790
      reason: "You dead again!"
      location: // Serialize
quick arch
#

oh is that how maps are serialized 🤔

pastel nacelle
#

that's how a list of maps looks like yeah

quick arch
#

never serialized them, so I never saw the output of em'

pastel nacelle
#

like idk if a hashmap holding lists holding maps would actually get serialized into this by the bukkit config api

quick arch
#

well, I serialized them once but for item serializing

pastel nacelle
#

but this is how a dictionary of lists holding disctionaries looks in yaml

quick arch
#

isn't it horrifying 😬

pastel nacelle
#

i get cancer from the bukkit config api

quick arch
#

I do too

#

Choco does too

pastel nacelle
#

thankfuilly my config framework is set up in such a way that I can leave and forget the serialization and shit in a specific class

#

and then pull complex objects directly from the config

quick arch
#

I should go find a lib that save comments and such 🤔

pastel nacelle
#

plugin.config().SOUNDS.BONFIRE_LIT.val().play(player, player.getLocation());

quick arch
#

what is that

#

looks horrible to me

pastel nacelle
#

better than getConfig().getStringList("sounds.bonfire-lit").forEach((s) -> (player.playSound(Sound.valueOf(s))));

#

or do you disagree

quick arch
#

oh

#

that's more readable though 🤔

pastel nacelle
#

not really

#

the more verbose way to do it would be to

#

SoundsKey.SoundSet soundsToPlay = config().SOUNDS.BONFIRE_LIT.val();

#

and then call .play on soundsToPlay

#

but there's no reason to be that verbose imo so i just do it in a single line

#

this also lets me refactor shit directly without running around in 20 million places looking for strings that represent paths in the config

quick arch
#

🤔

pastel nacelle
#

plus the ide can actually suggest config paths to me now 😎

#

config().SOUNDS. + ctrl-space shows me all of the subkeys under the sounds configurationsection

patent monolith
#

does anybody know of a library or method or something that can turn
hello this is "test string" and it has a space in it, but it is still it's own argument
into these arguments:
hello
this
is
test string
and
it
has
a
space
in
it,
but
it
is
still
it's
own
argument

quaint sinew
#

can anyone explain to me why this happened? I dont think i have the logs anymore but a while back my server started spouting weird stuff about chunks on startup (I think something about it not being able to find it but take that with a grain of salt) recently I went to the end and saw chunks that were not how they normally are, like this isnt even the original terrain

#

because of this I got an automatic backup set up incase anything like this happens in important areas like some of my big builds

pastel arrow
#
String[] arguments = "hello this is test string and it has a space in it, but it is still it's own argument".split(" ");
patent monolith
#

that doesn't produce the result I have shown

quick arch
#

command arguments/tab completions?

patent monolith
#

this string contains "an argument" which has spaces -> this, string, contains, an argument, which, has, spaces

#

yeah

#

well

quick arch
#

ACF has that except it's with |

patent monolith
#

I wanted it to be like command prompt or a terminal

#

where strings help keep arguments encapsulated

#

double-quotes i mean

#

and the double-quotes can be escaped as well

#

@quick arch acf?

quick arch
#

Aikar's command framework

patent monolith
#

do you know what method it is?

quick arch
#

oh it uses annotations

patent monolith
#

so would it be something like

quick arch
patent monolith
#

convert(String) and it will give a string array

quick arch
#

no

patent monolith
#

damn ok

quick arch
patent monolith
#

no that is not what i am looking for sorry

quick arch
#

oh

patent monolith
#

I will just reinvent the wheel

#

ill be back

pastel arrow
#
String original = "hello this is \"test string\" and it has a space in it, but it is still it's own argument";
String[] arguments = original.split(" ");
List<String> editedArguments = new ArrayList<>();
for(int i = 0; i < arguments.length; i++) {
    String arg = arguments[i];
    if(arg.startsWith("\"")) {
        arg = "";
        for(int j = i; j < arguments.length; j++) {
            if(arg.length() > 0) {
                arg = arg+" "+arguments[j];
            }else {
                arg = arguments[j];
            }
            if(arg.endsWith("\"")) {
                i = j;
                editedArguments.add(arg);
                break;
            }
        }
    }else {
        editedArguments.add(arg);
    }
}
        
for(String args : editedArguments) {
    ConsoleOutput.log(args);
}
editedArguments.clear();
```Outputs: https://i.imgur.com/Lgh6tQS.png 
https://i.imgur.com/HI3MqkM.png
(Yes I know its dirty code. Make your own if you want it cleaner lol)
#

@patent monolith

patent monolith
#

i just finished mine

public static String[] getArguments(String raw) {
        Objects.requireNonNull(raw, "arg0:java.lang.String");
        raw = raw.trim();
        
        List<String> arguments = new ArrayList<>();
        
        char[] chars = raw.toCharArray();
        
        boolean escaped = false;
        boolean quotes = false;
        StringBuilder argument = new StringBuilder();
        for (char c : chars) {
            switch(c) {
            case ' ':
                if (quotes) {
                    argument.append(c);
                    escaped = false;
                } else if (argument.length() > 0) {
                    arguments.add(argument.toString());
                    argument.setLength(0);
                }
                
                break;
            case '\\': 
                escaped = true; 
                break;
            case '"':
                if (!escaped) {
                    if (quotes) {
                        quotes = false;
                    } else {
                        quotes = true;
                    }
                    
                    break;
                }
            default: 
                argument.append(c);
                escaped = false;
            }
        }
        
        arguments.add(argument.toString());
        
        return arguments.toArray(new String[arguments.size()]);
    }
quick arch
#

rip

grave galleon
#

How to get a player's EditSession to undo after they have pasted a schematic within my plugin?

#

worldedit 6.1.5 btw :3

elfin juniper
#

hey guys im just getting started into developing plugins, so u guys have any yt channels or smth that could help? ping me

grave galleon
#

thesourcecode's bukkit tutorials is a great start @elfin juniper

nova mural
#

can someone help me out

#

im mind blanking

#

has support for wildcard permissions been removed from any recent version of spigot

#

for some reason i feel like it has and that's why my stuff is breaking

elfin juniper
#

k thanks maikpla

#

but his vids seem a little outdated @grave galleon

warm prism
#

Hello good night, a question is that it happens to me for the first time I bought a premium complement but it has not been released. What would be the problem?

frigid ember
#

Whats the best way to go about playing a sound from the resource pack to a location with say a 14 block radius? I'm usually sending direct to a player so radial to all in an area is new to me.

This is what I have: (yes I know its shotty)

Random randr = new Random();
String[] soundlist1 = {"westernsfx_01"};
int index = randr.nextInt(soundlist1.length);
p.playSound(p.getLocation(), soundlist1[index], 1.0F, 1.0F);
twilit orchid
#

how come i cant use viaversion

balmy sentinel
#

@elfin juniper try CodeRed he’s pretty good as well, explains thing throughly, and his videos are relatively new. Also although thesourcecode’s videos are old they’re still pretty relevant.

neon matrix
#

@patent monolith want a more efficient solution?

#
private static final Pattern ARG_PATTERN = Pattern.compile(
  "(\".*?\"|[^ ]+)"
);
public static String[] getArguments(String input) {
  return ARG_PATTERN.matcher(input)
    .results()
    .map(it -> it.group().replaceAll("\"(.+)\"", "$1"))
    .toArray(String[]::new);
}```
golden geyser
#

@elfin juniper most of the source codes videos are fine, but i would also recommend technovision for the setup as he goes a little more indepth on the updated versions

neon matrix
#

When using TSC videos you need to make certain you're using the recent videos

quick arch
#

🤔

twilit orchid
#

hey can yall help me with my viaversion?

#

its in my plugins folder but its not letting me connect

wild ivy
#

Is there a default setting for how long stuff lasts after someone dies. I just switched from vanilla to spigot and my players say the timer seems much shorter.

wary ledge
#

can i put 2 event handlers in 1 class?

elfin juniper
#

k ty

torn robin
#

@wild ivy fairly certain the default of 5 minutes hasn’t been changed in Spigot

#

You’d have to check the spigot.yml, it probably has that as a setting

#

@wary ledge yes

#

Don’t forget the @EventHandler annotation for each method

wary ledge
#

so this should work

#
public class Count implements Listener {
    HashMap<String, Integer> jump = new HashMap<String, Integer>();
    public HashMap<String, Integer> getjump() {
        return jump;
    }
    @EventHandler
    public void event(BlockBreakEvent event){

        Player player = (Player) event.getPlayer();
        Random random = new Random();

        int R = random.nextInt(20)+1;

    if (R==10) {
            if(jump.get((player.getName())) == null) {
                jump.put((player.getName()), 0);
            }
            else {
                if (jump.get((player.getName()))>=94){
                    jump.put((player.getName()), jump.get((player.getName()))+1);
                }
                else {
                    jump.put((player.getName()), 94);
                }
            }

            player.addPotionEffect(PotionEffectType.JUMP.createEffect(10000000, (jump.get((player.getName())))+0));
        }
    }
    @EventHandler
    public void event(EntityDeathEvent event) {

        if (event.getEntityType() == EntityType.PLAYER) {

            Player player = (Player) event.getPlayer();

            player.addPotionEffect(PotionEffectType.JUMP.createEffect(10000000, (jump.get((player.getName())))+0));

        }

    }
}```
torn robin
#

Yes, assuming you added the listener when you initialized the class

wild ivy
#

K, I'll look for it there, thx. Just got started and haven't really had a chance to jump into the plugins. My players wanted modded 1.16...but I had to create offspring instead.

wary ledge
#

getServer().getPluginManager().registerEvents(new Count(), this); but this adds the entire class

torn robin
#

bukkit...registerEvents(...)

#

Correct, that should work fine

#

A bit of testing should confirm it

wary ledge
#

Error:(49,43) java: cannot find symbol

#

Player player = (Player) event.getPlayer();

torn robin
#

Are there even sufficient mods for 1.16 yet?

quick arch
#

yes

#

Sodium

wild ivy
#

Dunno. Another reason I was waiting a bit.

torn robin
#

Don’t think that’s related, might be an importing/build setup error?

wary ledge
#

pointing at the end of events

torn robin
#

?paste

worldly heathBOT
wary ledge
#

there isn't anything to paste

torn robin
#

The formatting is weird on mobile, could you paste it there please?

wary ledge
#

oh

#

the first event handler works

#

2nd one does not

quick arch
#

probably because it's also called event (method name)

wary ledge
#

well i mean it prob does work but i can't get it to compile

torn robin
#

that's some wack indentation

#

it appears that your first if is encompassing the rest of the class, i'd fix that (it isn't, but the indentation suggests it)

wary ledge
#

so if i rename the method to event2

#

do i just change the method name or everything event

torn robin
#

that might be it... I'd rename the methods

#

something more accurate

#

public void onDeath() and onBlockBreak()

#

other than that I strongly recommend formatting the class properly, the indentation is throwing me off way too mukch

wary ledge
#

still the same error

#

wdym formatting

torn robin
#
    @EventHandler
    public void event(BlockBreakEvent event){

        Player player = (Player) event.getPlayer();
        Random random = new Random();

        int R = random.nextInt(20)+1;

    if (R==10) {
            if(jump.get((player.getName())) == null) {
                jump.put((player.getName()), 0);
            }
            else {
                if (jump.get((player.getName()))>=94){
                    jump.put((player.getName()), jump.get((player.getName()))+1);
                }
                else {
                    jump.put((player.getName()), 94);
                }
            }

            player.addPotionEffect(PotionEffectType.JUMP.createEffect(10000000, (jump.get((player.getName())))+0));
        }
    }
#

the way this indentation is, it's suggesting if (R==10) { is outside of the event(BlockBreakEvent event) method

#

it makes me think you're missing a curly bracket

#
    @EventHandler
    public void event(BlockBreakEvent event){
        Player player = (Player) event.getPlayer();
        Random random = new Random();
        int R = random.nextInt(20)+1;

        if (R==10) {
            if(jump.get((player.getName())) == null) {
                jump.put((player.getName()), 0);
            } else {
                if (jump.get((player.getName()))>=94){
                    jump.put((player.getName()), jump.get((player.getName()))+1);
                } else {
                    jump.put((player.getName()), 94);
                }
            }
            player.addPotionEffect(PotionEffectType.JUMP.createEffect(10000000, (jump.get((player.getName())))+0));
        }
    }

    @EventHandler
    public void event(EntityDeathEvent event) {
        if (event.getEntityType() == EntityType.PLAYER) {
            Player player = (Player) event.getPlayer();
            player.addPotionEffect(PotionEffectType.JUMP.createEffect(10000000, (jump.get((player.getName())))+0));
        }
    }
wary ledge
#

discord is messing it up

torn robin
#

+0 ?

wary ledge
#

it was for my IDE

torn robin
#

Could you try seeing if a separate piece of code works in a different class?

#

Like just try setting a random player's health to 0

#

and see if the IDE throws an error

#

is this maven, gradle, or have you added the libraries manually?

wary ledge
#

maven

torn robin
#

have you successfully used maven in the past?

wary ledge
#

no

#

i've never used it at all

torn robin
#

Could you send your pom.xml?

wary ledge
#

im just using the default mc dev plugin

#

for spigot

#

the compile worked

torn robin
#

so the issue is resolved?

wary ledge
#

ummmm

#

maybe

#

he plugin is broken in game

#

could be my hash map

#

the way i tried to use my hash map from my other class didn't work

#

wait no

#

i might have gotten it

#

just dont't know why this wont work

#

getServer().getPluginManager().registerEvents(new Death(), this);

torn robin
#

So @past orbit what is the important part of the command you're trying to get? You know that the player wants to toggle god, but what other info do you need if it's not for themselves?

#

@wary ledge where are you calling it and what exactly do you mean by wont work?

wary ledge
#

well i assume without it it wont work

#

but it doesn't work with it

torn robin
#

you are correct, it won't work without it, but how do you know it isn't working? is the code simply not running? are there errors?

wary ledge
#

nvm

torn robin
#

So RAGING do you agree that the code can assume if the sender doesn't specify a player they intend to target themselves?

#

in other words, if the player simply ran /god without a name, they meant to target themselves?

#

Excellent! Since the arguments that came with the command are given in a String array (String[] args), you can check the length (ie. how many arguments were given after /god <args>) with args.length

#

For example:

if(args.length == 1) {
  // The player executed /god <player>
} else {
  // The player specified either only /god or /god [too many arguments]
}
#

Hopefully this is all making sense so far?

#

Great, let me know if anything is confusing, I know arrays can be confusing.

#

To simplify, arguments that are supplied with a command are put into the args array, so args[0] would be the player name you want

#

if someone ran

/testcommand hello how are you
args[0] would be hello
args[1] would be how
args[2] would be are
etc.

#

Since you want to allow /god [name], args[0] means you only want one argument the be specified, so you check if the sender gave 1 argument

wary ledge
#

ok so everything should work

#

if i can figure out how to access the hash map

#

from the other file

torn robin
#

You would probably want to keep an instance of the listener in your main file and have a public method to retrieve the hashmap in your listener file

wary ledge
#

but the hashmap is in listener

torn robin
#

Yes, if you keep the instance of the listener in your main class you could do something like plugin.getListener().getMap()

#

Ahhh I see

spring coyote
#

How can I check if a player is invulnerable due to the invincibility given for the short amount of time after a player takes damage?

torn robin
#

I personally handle this by having a function wide player variable

#

for example...:

spring coyote
#

but the player isnt actually invulnerable

#

they just cant take damage for that time

#

are you sure that would work

#

Ok so you know when u punch a player u cant just have 50 cps and do 50x damage, minecraft has a time when the player cant be damaged at all

#

it happens when u punch the player

torn robin
#
Player target = null;
if(args.length == 1) {
    if(sender.hasPermission("staff.command")) {
        target = (Player) bukkit.getPlayer(args[0]);
    } else {
        // Send no permission command, or default to sender
        // if you send no perm command remember to return true;
    }
} else {
    if(sender instanceof Player) {
        target = (Player) sender;    
    } else {
        // Tell the console sender to specify a player
        return true;
    }
}
#

That's something that I'd do RAGING

spring coyote
#

thx

torn robin
#

That way RAGING you have both the sender and the target, they may or may not be the same person

#

however you only have to run the setInvulernable and other code once, for the target

spring coyote
#

do entities not have nodamageticks?

torn robin
#

Pretty sure all entities have noDamageTicks

#

You might also be interested in setMaximumNoDamageTicks

spring coyote
#

oh well it wont get the nodamageticks of the entity

torn robin
#

what mc version?

spring coyote
#

1.16.1\

torn robin
#

No problem, what exactly are you confused on?

#

Have you modified your current code at all?

#

@spring coyote could you try casting to LivingEntity?

spring coyote
#

Yeah I just looked at the javadocs and saw it only works for livintentity

#

thx for the help

torn robin
#

👍

#

so RAGING we can go line by line

#
public void onCommand(...){
    Player target = null;
    if(args.length == 1) {
        if(sender.hasPermission("staff.command")) {
            target = (Player) bukkit.getPlayer(args[0]);
        } else {
            // Send no permission command, or default to sender
            // if you send no perm command remember to return true;
        }
    } else {
        if(sender instanceof Player) {
            target = (Player) sender;    
        } else {
            // Tell the console sender to specify a player
            return true;
        }
    }
#

no problem, glad I can help

#

The first line we create a Player variable that will act as the target

#

at the end of this logic the target variable will be the player that we want to toggle/enable god mode one

#

This would all be within the onCommand scope

#

This means you can use it further down the line within the command method

wheat mirage
#

Why do falling blocks with non downward velocities always have such issues syncing with the client?

#

Am I missing something?

torn robin
#

I'd guess the client always enforces gravity acceleration?

#

There might be a way to turn gravity off

wheat mirage
#

Not when they have gravity off

#

Which is my use case

#

They always lag back

torn robin
#

Do you by any chance have a youtube video explaining what you're talking about?

wheat mirage
#

Err not a good one

#

But try doing a falling block entity

#

gravity off

#

Some random velociry

#

it lags back if its left for any period of time

#

Maybe the client doesnt simulate drag?

#

but the client is running the server

#

so jt makes no sense

keen compass
#

if a block doesn't have a downward velocity then how is it a falling block o.O

wheat mirage
#

Its what its called in the code

keen compass
#

anyways, the reason for a block going back is because the client predicts how the block should move and doesn't really anticipate that the server doesn't want it to move

wheat mirage
#

Frostalf please dont respond to my questions you never help

#

you dont understand whats going on

keen compass
#

your issue is client prediction

#

unfortunately it isn't always easy and sometimes impossible to get around that issue

twilit orchid
#

what should i use for a no pvp delay for 1.16

spring coyote
#

there is an attribute @twilit orchid called attack speed

twilit orchid
#

i mean what plugin

frigid ember
#

I want to start making plugins but I don't know how to start, I have been told that they can be done without putting anything, if someone were so kind to pass me a video or something.

twilit orchid
#

what plugin should i start

#

put*

wheat mirage
#

The client simulates the server

torn robin
spring coyote
#

@frigid ember do u know the basics of java?

torn robin
#

they can be done without putting anything ?

frigid ember
#

More or less a little

spring coyote
#

ok thats good enough, i find spigot a great way to learn java tbh

#

this youtuber is good, also, even though it says 1.15 it still works for 1.16 and most likely 1.17

frigid ember
#

But I don't know if the same applies with intelj which is where I work the plugins

spring coyote
#

The coding would be exactly the same

#

Once you have everything set up it shouldnt be too difficult to follow along with the tutorials, i think that only the setup of putting the spigot api in would be different

frigid ember
#

I already know that, but what I mean is that if I have to download something, I know you can download the spigot libraries but they told me that in Intelj they don't need to.

torn robin
#

That applies to any IDE that supports Maven/Gradle

#

that's simply because Maven/Gradle automatically download it for you

frigid ember
#

Thanks

wheat mirage
#

@torn robin Is there any reason the client wouldn't properly predict velocities for falling block enitities?

#

The client has all the code

#

Why does it predict it to go farther than it does?

#

tps is 20

torn robin
#

I'm making a small plugin to check it out

wheat mirage
#

Wow, nice, thanks

#

I'm trying to actually make some small moving structures

#

But without consistent movement, it's impossible

keen compass
#

it probably does predict velocities correctly

#

however it probably has problems when the velocity is 0

#

that would be a bug if you ask me since the client should account for a velocity of 0

#

also, the client doesn't simulate the server unless you are playing in single player

wheat mirage
#

no, please

#

Don't respond to my questions

keen compass
#

so from what I looked at, if the NBT tag is set for NoGravity the falling block shouldn't fall

#

however, falling blocks have a max lifespan of 30 seconds, 5 seconds in some situations before turning into a dropped item

#

so maybe ensure the nbt tag is actually being set on the falling block is all I can say

#

if it is set, then it is a client bug

#

assuming no other plugins are at play

wheat mirage
#

@past orbit ?

torn robin
#

Good to hear RAGING

#

if you do have any questions feel free to ask in here

plush nexus
#

how could i set a zombie to drop items from the fishing loot table? so far i've got something like Zombie fishingZombie = (Zombie)evt.getLocation().getWorld().spawnEntity(evt.getLocation(), EntityType.ZOMBIE); fishingZombie.setLootTable(LootTables.FISHING); fishingZombie.damage(200);

torn robin
#

I was able to get a basically still FallingBlock by setting the velocity to .00001 in the Y direction

wheat mirage
#

@torn robin Interesting

#

Im not using low velocities

#

Yet they still seem to desync

#

It could be prudent to note

#

Its not all the time

#

Id say 1/5 blocks

#

Also, launching them in groups means they tend to lag back together

#

Or not at all

#

Try a reasonable velocity over a long distance

torn robin
#

To clarify you want to say launch a wall of falling blocks moving perfectly horizontal?

wheat mirage
#

Not necessarily

#

Mostly large clusters of blocks

#

Acting as meteors

#

Etc

torn robin
#

Gotcha gotcha

#

but for testing a wall would be a good start

wheat mirage
#

Indeed

#

The desync is indeed strange

#

I wonder why it tends to happen for many blocks or none at all

#

Timings are good though

worldly heathBOT
wheat mirage
#

@torn robin Theres a popular mc bug on the tracker talking about minecrafts tendency to round values fairly inconsistently. However this shouldnt be related at reasonable speeds on all axis.

torn robin
#

@past orbit I'll look into that in a bit, it could definitely be optimized a bit

wheat mirage
#

(rounding errors in packets, specifically)

#

@past orbit I think spigot has a built in API for command permissions IIRC

#

could be wrong

#

But I recommend it

buoyant path
#
[23:31:40 INFO]: miningX: -113
[23:31:40 INFO]: miningY: 98
[23:31:40 INFO]: miningZ: -496
[23:31:40 INFO]: targetX: -113
[23:31:40 INFO]: targetY: 98
[23:31:40 INFO]: targetZ: -496```

```java
  if (mining.getLocation().getBlockZ() != targetBlock.getX() || mining.getLocation().getBlockY() != targetBlock.getY() || mining.getLocation().getBlockX()!= targetBlock.getZ()) continue;

is there an issue with my syntax? wtf

#
                    Bukkit.broadcastMessage("miningX: " + mining.getLocation().getBlockX());
                    Bukkit.broadcastMessage("miningY: " + mining.getLocation().getBlockY());
                    Bukkit.broadcastMessage("miningZ: " + mining.getLocation().getBlockZ());
                    Bukkit.broadcastMessage("targetX: " + targetBlock.getX());
                    Bukkit.broadcastMessage("targetY: " + targetBlock.getY());
                    Bukkit.broadcastMessage("targetZ: " + targetBlock.getZ());```
#

???

wheat mirage
#

hastebin please

#

no highlighting here

#

just a wall of text

buoyant path
#

rip

#

did you at least see the broadcast?

#

im 99% sure

#

-113 = -113

#

98 = 98

worldly heathBOT
buoyant path
#

and -496 = -496

#

lmao

#

dont know why it did http

wheat mirage
#

Store them in variables

#

Data types may have some issues

#

Then broadcast the variables

buoyant path
#

getX for block is an integer

#

getBlockX for location is also an integer

#

same types

wheat mirage
#

So you know what youre comparing is the same as what youre broadcasting 100%

#

Variables

#

Please

#

Give us the full class

#

cant help with just that

buoyant path
#

which class?

#

ok so basically

#

currentMining is always null

#

but when it broadcasts

#

there is an instance of my Mining object

#

that has the same coords

wheat mirage
#

Dyde

#

Youre using getblockx

#

in the z check

#

USE VARIABLES

#

and also

#

Respect your line lengths

#

Press enter a few times

#

Theres an actual name for it

#

But dont make them that long

buoyant path
#

lol

wheat mirage
#

or you miss errors

buoyant path
#

Ik about all the conventions shit

#

rn I just wanna fix this

wheat mirage
#

Yes and you would have already fixed this

#

if you followed the conventions

buoyant path
#

doubt

wheat mirage
#

Anyway

#

Enjoy your fix

#

change x to z

#

follow proper conventions

#

or go somewhere else

#

Dont want to help make bad code

#

Youre the kind of developer that gets cursed out by anyone who inherits your code

#

The conventions exist for a reason

buoyant path
#

also id like to point out that technically getBlockX is a variable, its just stored somewhere else lol

wheat mirage
#

Id also like to point out your code looks like trash

#

And that wasnt my point

#

Cya!

buoyant path
#

Lol just because you follow every goddamn rule of code doesnt mean you are some demi god? I actually care about clean code, Im not trying to argue im trying to get something done.

torn robin
#

Looks like the wall still moves pretty smoothly

#

what range of velocity are you trying to achieve?

wheat mirage
#

@torn robin In bed rn its 6am

#

So cant record myself sorry

#

I think its probably around 1 on each axis

#

Try a large amount of entities

torn robin
#

The wall is moving fairly smoothly for me

#

I'll try increasing the entities

wheat mirage
#

Thanks

#

@buoyant path I turned your code into better code and instantly found your problem

#

The conventions are there to help you too

torn robin
buoyant path
#

Generally I follow java conventions

wheat mirage
#

Maybe you wouldnt need to cry on discord about how your debugs dont work if you actually dollowed them

buoyant path
#

I just didnt in this instance

#

I wouldnt have been doing this for 5 years if I didnt use conventions lmao

wheat mirage
#

@torn robin Try different instances of them

#

@torn robin Sorry for lack of detail, I'll get you a video tomorrow

torn robin
#

IronMan it looks like the issue was you were using getBlockZ with == getX

#

You should be using either only getBlock== getBlock or get_ == get_

#

also of course make sure you're not mixing up xyz's

buoyant path
#

getX for blocks returns the same as getBlockX would for the location

torn robin
#

what exactly do you mean by different instances?

buoyant path
#

and Im not going to be generating an instance of Location

#

I looked through the code in spigot and all it does is plug the x y z variables from block

#

straight into a location

wheat mirage
#

@torn robin As in doing multiple indpendent walls

torn robin
#

🤔

#

@buoyant path have you figured out the problem?

buoyant path
#

I got it dont know why it wasnt working

wheat mirage
#

He was using x in a z check

buoyant path
#

oh thats cool

wheat mirage
#

YOURE USING X IN A Z CHECK holy fuck lmfao

#

i said that twice

#

i solved your problem using

buoyant path
#

well I redid it all

#

so

wheat mirage
#

give it a read

buoyant path
#

Ive read conventions

#

lmao

#

they are not the be all end all but they do help yes

faint owl
#

once y'all are done could someone help me out with some setup im way out of my depth here

wheat mirage
#

x doubt

torn robin
#

Go ahead Roan

halcyon brook
#

I setup a custom scoreboard for my server and I want to display the top 5 players from a scoreboard objective. Do placeholders exist for this?

faint owl
#

yea well so I made a regular server, like with the server.jar and that was working fine, and ive tried to carry over as much as I can to the spigot server, mainly the ip adress thing, and it doesnt seem to be connecting

buoyant path
#

@wheat mirage want me to name the java conventions off lmao

#

you guys are like plats in rocket league

#

if you arent JSTN

#

you arent shit

#

I guess?

torn robin
#

NotOliver sounds something that a plugin would be better suited for

buoyant path
#

Ill let you help other people but please actually help with the issue at hand

torn robin
#

I'm assuming you've changed the ip-address in server.properties?

faint owl
#

yes

torn robin
#

Have you tried setting it blank or to 0.0.0.0?

faint owl
#

I have not, I can though

torn robin
#

Also I'd strongly recommend just using a host lol

#

also you're implying you got it working with a vanilla server?

faint owl
#

I did yes

#

seems stuck on connecting to server

#

then times out

torn robin
#

Are you connecting on your own computer?

faint owl
#

yes

#

oh wait

#

I got a friend in

#

oh I solved it

#

my bad

torn robin
#

Magic 🧙‍♂️

faint owl
#

sorry for bothering you

torn robin
#

No problem, glad you solved it 👍

torn robin
#

@wheat mirage

#

I made them follow me every tick and didn't see any significant desync

keen compass
#

lol, making blocks follow you

#

I believe the issue might be whether the nbt tag is being set or not or there is other plugins doing things

#

Highly doubt this is a client problem unless they are using an older version =/

wheat mirage
#

@torn robin for your initial example does velocity never decay? firing a block straight out with velocity and no gravity should make it slow down after a while

torn robin
#

I've tested it with both decay and no decay

thick prawn
#

Has anyone noticed that if you place down 2 mushroom blocks next to each other and place redstone on one of them, it will update the states of the blocks, and even when it's cancelled, it will still update it?

grave galleon
#

this is my plugin for spawning islands

#

and i want to make it be able to undo

#

im using worldedit api btw

#

can anyone help me?

#
Player p = (Player) player;
        EditSession session = WorldEdit.getInstance().getEditSessionFactory().getEditSession(p.getWorld(), -1, p);
        session.undo(session);
#

i've tried that so far

#

but it threw an exception

#

cuz you can't cast WorldEdit's player to Bukkit.Player

high mantle
#

probably wanna go to their discord instead

grave galleon
#

can you dm me an invite?

mental falcon
#

is it safe to use Bukkit.getScheduler().runTask(plugin,runnable); inside another thread or do I have to use Bukkit.getScheduler().runTaskLater(plugin,runnable,1) when I want to do something inside the main thread from another thread?

frigid ember
#
Bukkit.getScheduler().runTask(plugin,runnable);

use this if you want to make something in main thread

mental falcon
#

thanks!

frigid ember
#

yw

drowsy furnace
#

if I can't open build tools

#

Build tools does that mean it's done?

#

it might be norton firewall being really annoying

#

yeah I turnt it off and I ca open it again

grim halo
#

"can't open build tools" Do you use git bash or a .bat script to run BuildTools?

drowsy furnace
#

I used the .exe

grim halo
#

Since when... is there a .exe?

#

Could you send me a link?

drowsy furnace
#

that's what I downloaded

grim halo
#

That is unsupported stuff ^^ you need to nag the author if you want support for 3rd party tools.

drowsy furnace
#

alright cheers, my problem kinda just sorted it self out anyway.

silent kiln
#

does anyone know in 1.8 the packets to make an iron golems arms do tyhe attacking animation

#

tried this but doesn't seem to be working

drowsy furnace
#

"Some routers may allow you to disable UPnP. In that case, please refer to your Router's manual in order to enable it."

#

do I need to disable or enable it

#

Q~Q

#

this is for beacon

#

which apparently is the offical way to portfoward.

tiny dagger
#

let me see on mine

#

mine disabled @drowsy furnace

#

but i doubt this is what you need for port forwarding anyway

drowsy furnace
#

do you know where to find the thingy

#

the port

#

like is it still 25565

harsh anvil
#

Default is still 25565

drowsy furnace
#

thanks

grim halo
#

At the native english speakers. Does this make sense?

"There are X force loaded Chunks in this world."
"From whom Y are loaded by FCP."

#

nvm whom is only fro ppl.

tiny dagger
#

it makes sense to me 🤔

sturdy oar
#

does anyone know in 1.8 the packets to make an iron golems arms do tyhe attacking animation
@silent kiln why are you passing the handle in first argument

#

Wouldn't it just be the golem entity

hollow thorn
#

is there any way to get if an item is a sort of arrow

rare prairie
#
ItemStack arrow = new ItemStack(Material.ARROW);
#

or what you want

#

from event?

tiny dagger
#

Item?

#

well

#

Item#getItemStack()#getType()

hollow thorn
#
ItemStack arrow = new ItemStack(Material.ARROW);

@rare prairie as in tipped arrow or spectral arrow or arrow all in one class

tiny dagger
#

pretty sure they are different materils for those

#

like

#

Material.TIPPED_ARROW

humble spoke
#

i was trying to check if a property in the config is empty, which in my case it is, but the fullSetting != "" is still true

#

even though it seems to be ""

rare prairie
#

String#isEmpty

subtle bison
#

maybe you have a hidden space in the config

hollow thorn
#

pretty sure they are different materils for those
@tiny dagger is there any class that can get them all into one

rare prairie
#

no, you can make one

humble spoke
#

oh nvm i just had to use string.equals

crystal spindle
#

!= null

dusky sigil
#

Just to see if i understand, if all is set up, will this - statement.executeUpdate("CREATE TABLE test ();"); create a table named test? (SQL)

sturdy oar
#

Add "if not exists"

frigid ember
#
DeathInfo:
  e9d30742-403e-4726-8b0f-de85903ede35:
    '2':
      location:
        ==: org.bukkit.Location
        world: world
        x: 182.30000001192093
        y: 66.0
        z: 224.30030996357354
        pitch: 36.000366
        yaw: 116.70021
      reason: Lazinq was slain by Zombie
      time: 1596454816759```
Is created in the config by doing the following:
```java
    private void saveData() {
        dataMap.forEach((uuid, list) -> {
            List<Data> deaths = dataMap.get(uuid);
            for(Data data : list){
                String saveKey = "DeathInfo." + uuid + "." + deaths.size() + ".";
                getConfig().set(saveKey + "location", data.getLocation());
                getConfig().set(saveKey + "reason", data.getReason());
                getConfig().set(saveKey + "time", data.getTime());
            }
        });
        saveConfig();
    }```
so I want to locate ALL info about the player in the config
this only locates 1/2
patent monolith
#

@neon matrix sorry I dont understand that at all

humble spoke
#

how do i check if an item can have ddamage?

clever hornet
#

what is the enchanting playsound id

south shoal
#

just look it up with the command playsound or sound and that use tab to find it

umbral dirge
#

Is there a simple way / plugin to fix Nullping + Authsmasher and stuff

ripe narwhal
#

how do I change plugin priority?

agile cairn
#

May I ask can I use bungeecord with forge?

light stone
#

I believe you can.

agile cairn
#

So what to combine it to use with

umbral dirge
#

Normal bungeecord + Cauldron server

#

Like normal bungeecord

#

with a spigot server

#

but instead of spigot use cauldron or something

tiny dagger
#

@hollow thorn just make a method or a check

blazing burrow
#

how should i use a timer?

#

like for example a timer used in bedwars for when the diamond or emerald gens will upgrade or something

sturdy oar
#

Velocity > Bungeecord

#

Smh

vernal spruce
#

how should i use a timer?
@blazing burrow https://bukkit.gamepedia.com/Scheduler_Programming

BukkitWiki

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

blazing burrow
#

okay thanks

#

wait yeah no @vernal spruce i tried runnable already

#

do i have to use runnable

vernal spruce
#

there isnt really a way to have a timer otherwise

blazing burrow
#

yes okay

frigid ember
#

2 is now wrong cuz its just the size 🙃

blazing burrow
#

@vernal spruce so could i just have a while loops thats runs a runnable every 20 ticks?

frigid ember
#
    private void saveData() {
        dataMap.forEach((uuid, list) -> {
            List<Data> deaths = dataMap.get(uuid);
            for(Data data : list){
                String saveKey = "DeathInfo." + uuid + "." + deaths.size() + ".";
                getConfig().set(saveKey + "location", locToString(data.getLocation()));
                getConfig().set(saveKey + "reason", data.getReason());
                getConfig().set(saveKey + "time", data.getTime());
            }
        });
        saveConfig();
    }```
#

its about this

vernal spruce
#

@vernal spruce so could i just have a while loops thats runs a runnable every 20 ticks?
@blazing burrow a runnable can be a timer itself,exists for both a timer(once every X),or later(after X)

sturdy oar
#

Bukkit.getScheduler().runTaskTimer(plugin, ()->{}, 1L, 20L);

blazing burrow
#

But i cant seem to figure out how, i looked at the thing but cant really make out how a repeating/looping one will look like so i presumed u use a while loop

frigid ember
#

ima walk with my dogs tag me if you have an answer pls

blazing burrow
#

what params does runTaskTimer use

vernal spruce
#

Bukkit.getScheduler().runTaskTimer(plugin, ->{}, 1L, 20L);
@sturdy oar disgasting lambda 🤢

lone fog
#

Delay and period

#

Delay is time before first execution, period is time between executions

sturdy oar
#

@sturdy oar disgasting lambda 🤢
@vernal spruce lambda is superior

blazing burrow
#

Ohhh i see

sturdy oar
#

Don't tell me you use new Runnable

odd knoll
#

Man yeeted the ()

blazing burrow
#

public void runnable() { new BukkitRunnable() { public void run() { time++; } }.runTaskTimer(this, 0, 20);
so is this practical

umbral dirge
#

I wanna make an custom ban command, but when i type /ban the vanilla command also pops up

frigid ember
#

EventPriority

#

Should probably fix that

umbral dirge
#

k

storm vessel
#

Does anyone know why this is happening when i try to package my plugin with Maven?

bold anchor
#

Set the target level

storm vessel
#

This is my first plugin

#

Not sure what you mean

#

Do I need to add something to the pom.xml that specifies target level?

marsh gale
#

I am having trouble running SPIGOT buildtools

#

this is my BAT command file

#

java -jar BuildTools.jar -nogui
PAUSE

#

Exception in thread "main" joptsimple.UnrecognizedOptionException: n is not a recognized option
at joptsimple.OptionException.unrecognizedOption(OptionException.java:108)
at joptsimple.OptionParser.validateOptionCharacters(OptionParser.java:633)
at joptsimple.OptionParser.handleShortOptionCluster(OptionParser.java:528)
at joptsimple.OptionParser.handleShortOptionToken(OptionParser.java:523)
at joptsimple.OptionParserState$2.handleArgument(OptionParserState.java:59)
at joptsimple.OptionParser.parse(OptionParser.java:396)
at org.spigotmc.builder.Builder.main(Builder.java:156)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:34)

jagged torrent
#

-nogui is a spigot argument, not a buildtools argument

formal nimbus
#

How can I find the slot number a specific item is in inside of an inventory?

#

is there a function for that?

#

or do I just have to use a for loop against the contents

light stone
#

Is it possible to give levitation to a boat in which a player is with commands?

formal nimbus
#

commands as in command blocks?

#

or in spigot

light stone
#

Java is not commands.

bold anchor
#

Isn’t it ehm technically though?

light stone
#

No, Java is made up of statements.

formal nimbus
#

so you're talking about command blocks

light stone
#

Yes.

formal nimbus
#

in which case I don't think it's possible

#

but it might be

#

there's a discord group, Minecraft Commands

#

I could give u an invite if u wanted

#

they would probably know

light stone
#

Alright, thanks.

formal nimbus
#

oh

#

the invite got removed

#

I'll dm it to you

marsh gale
#

when will I know when Git Bash is done compiling?

#

forget it

#

its done

grave galleon
#

what is java.lang.AssertionError: TRAP

#

and how do we prevent it

frigid ember
#
private void saveData() {
        dataMap.forEach((uuid, list) -> {
            for(Data data : list){
                String saveKey = "DeathInfo." + uuid + ".";
                getConfig().set(saveKey + "location", locToString(data.getLocation()));
                getConfig().set(saveKey + "reason", data.getReason());
                getConfig().set(saveKey + "time", data.getTime());
            }
        });
        saveConfig();
    }```
im saving my info into .yml file like this
but it only saves information about 1 thing in the hashmap
not multiple while its a list of Data```java
    private final Map<UUID, List<Data>> dataMap = new HashMap<>();```
https://paste.md-5.net/alofoqekal.cpp <- Data.class
shy shard
#

Can any one tell me why when you save config file all double banana: " " are replaced with single banana: ' '

#

thing is if some one later wants to edit messages

#

and they type some thing like |don't| inside single ' it will break config

echo path
#

Can i code my own spigot plugin?

left grove
#

Can someone help me

#

My server keeps crashing over and over

#

I tried to optimize it by editing the spigot.yml file

rare prairie
#

Can any one tell me why when you save config file all double banana: " " are replaced with single banana: ' '
if you save your config, the " " thing is replacing by ' ', and if you using ' don't ' then you should do like, 'don''t'

left grove
#

But it ended up

#

breaking everything

rare prairie
#

?paste

worldly heathBOT
nocturne laurel
#

I need help finding a auto unban plugin for 1.11.2

rare prairie
#

advancedban

wary ledge
#

why can't the bottom 2 methods access the Map?

rare prairie
#

@frigid ember Are you added some Data instances to List<Data> into hashmap not only one? and you sure that you not clearing somewhere the hashmap data?

tiny dagger
left grove
#

Can someone help me out here?

rare prairie
#

?paste

worldly heathBOT
rare prairie
#

paste your error

left grove
#

how

nocturne laurel
#

advancedban
I do not see a auto unban feature where it says features (not meant to sound rude)

wary ledge
#

anyone here helping with code? or just trouble shooting public plugins

left grove
rare prairie
#

why can't the bottom 2 methods access the Map?
@wary ledge How do you mean by that 2 methods is not accessing? Seems the code is correct for me

wary ledge
#

well

#

here is the error from the respawn event

left grove
#

All I did was change the spigot.yml

wary ledge
left grove
#

and suddenly the server just

#

can't run

rare prairie
#

@left grove maybe you have lot of plugins that causing OutOfMemoryError?

wary ledge
#

and someone told me that it was this line player.addPotionEffect(PotionEffectType.JUMP.createEffect(10000000, (jump.get((player.getUniqueId())))+0));

nocturne laurel
#

I do not see a auto unban feature where it says features (not meant to sound rude)
@rare prairie can you dm me a screenshot where it says auto unban for AdvancedBans

#

if you want to

rare prairie
#

@wary ledge java.lang.NullPointerException
You have to do jump.containsKey(player.getUniqueId()) before player.addPotionEffect

#

@nocturne laurel No, there are temporary bans, that automatically unbans the banned player after the time is expired. So if you have like essentials, do /tempban playername 1h then this player will can join again after 1 hour

left grove
#

is there something wrong with my plugins?

wary ledge
#

what does containskey do?

rare prairie
#

it checks if the player uuid is in the map saved

#

is there something wrong with my plugins?
@left grove if you start your server without plugins, you'll see the result, if the error still present, you'll have to update your java, or dont know

wary ledge
#

well ummm

tranquil aurora
#

Is it possible to run bungeecord commands from a spigot console

nocturne laurel
#

The reason I want a auto unban plugin is incase I get banned from my server it will auto unban me (Oh and if it is a .sk file then let me know how to keep it from spamming messages in console)

wary ledge
#

no more error in console

#

but it doesn't apply the effect on death

left grove
#

is my spigot file okay?

#

I really don't know what I did to kill the server like this

frigid ember
#

How do i save a default configuration with Bungeecord? The configuration systems seem really different from the bukkit one.

#

but i can't figure it out

wary ledge
#

these should add the effects back if the player dies or drinks milk

wise spoke
#

is there a variable for what world a player is in? for like a scoreboard? i tried %world% but it didnt work

wary ledge
#

right?

#

or is it possible to make an effect that wont be cleared by milk or death

tranquil aurora
#

Is it possible to run bungeecord commands from a spigot console
@tranquil aurora

left grove
#

Nothing that I try is working

frigid ember
#

@wise spoke %player_world%

left grove
#

how do I fix this

wise spoke
#

thanks

frigid ember
#

/papi ecloud download Player

rare prairie
#

@frigid ember

ConfigurationProvider f = ConfigurationProvider.getProvider(YamlConfiguration.class);
f.save(file);
frigid ember
#

hm

wary ledge
#

i did a debug

frigid ember
#

so new values get written?

wary ledge
#

by making it say "milk" when i drink milk

frigid ember
#

and old ones removed?

#

by this?

#

@rare prairie

wise spoke
#

@frigid ember that didnt work. it literally shows %player_world%. i use multiverse and minecraft 1.8.9

frigid ember
#

/papi ecloud download Player

rare prairie
#

@frigid ember No, if you set new values/path like on bukkit plugin, then that value is set to the config by the given value

frigid ember
#

@wise spoke

wary ledge
#

and it does the same thing when i die

wise spoke
#

yeah? @frigid ember

frigid ember
#

you executed that command?

wise spoke
#

/papi ecloud download Player ?

frigid ember
#

oh so i dont have to worry about it?

#

@wise spoke yes

rare prairie
#

@wary ledge You still not do a check for Map#get method, you should do

if (jump.containsKey(player.getUniqueId())) {
  player.add
}
wise spoke
#

unknown command. would it help if i told you the scoreboard plugin?

frigid ember
#

is placeholder api even installed?

rare prairie
frigid ember
#

@wise spoke

wise spoke
#

i did have it installed. will that command work when i install it and restart?

frigid ember
#

yes

wise spoke
#

ok thanks

frigid ember
#

it requires it working

left grove
#

can someone help me out?

#

I broke my server and I don't even know how I did it

tranquil aurora
#

Is it possible to run bungeecord commands from a spigot console
@tranquil aurora

frigid ember
#

lol

#

can you give us some logs?

#

@left grove

left grove
#

yeah

wary ledge
#

so code is now

#
        if(event.getItem().getType().name().toLowerCase().contains("bucket")) {
            Player player = (Player) event.getPlayer();
            if (jump.containsKey(player.getUniqueId())) {
                player.addPotionEffect(PotionEffectType.JUMP.createEffect(10000000, (jump.get((player.getUniqueId())))+0));
                player.chat("milk");
            }
        }```
wise spoke
#

@frigid ember that worked. thank you

#

one last thing

wary ledge
#

and it says milk when i drink milk

#

but it does not add my effect back

left grove
#

I tried to optimize the server

frigid ember
#

@left grove ```#

There is insufficient memory for the Java Runtime Environment to continue.

Native memory allocation (mmap) failed to map 2126512128 bytes for committing reserved memory.

Possible reasons:

The system is out of physical RAM or swap space

The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap

Possible solutions:

Reduce memory load on the system

Increase physical memory or swap space

Check if swap backing store is full

Decrease Java heap size (-Xmx/-Xms)

Decrease number of Java threads

Decrease Java thread stack sizes (-Xss)

Set larger code cache with -XX:ReservedCodeCacheSize=

This output file may be truncated or incomplete.

#```

tiny dagger
#

oof hardcoded item names

left grove
#

and I like

#

broke it

#

my spigot file

wise spoke
#

@frigid ember that worked. however when i change world it still shows the old world name. i then have to reload the scoreboard plugin.

left grove
#

that I edited

frigid ember
#

@wary ledge we recommend comparing the item type with our enum for materials

wary ledge
#

enum?

frigid ember
#

Material.BUKKET

#

idk

#

if that was it

#

.getType() == Material.BUKKET

#

idk it exactly

#

but that should be it

left grove
#

so what do I do

#

to fix this

frigid ember
#

@left grove removing it?

tiny dagger
#

probabily is BUKKIT

#

no wait

frigid ember
#

oops

tiny dagger
#

BUCKET

frigid ember
#

ah

wary ledge
#

ok it worked

wise spoke
#

im using powerranks. how i show what rank they have on the scoreboard? would it be %player_rank%?

wary ledge
#

but that still doesn't make everything else work

tiny dagger
#

just look what placeholders the plugin supports

frigid ember
#

what are you planning to do?

#

@wary ledge

wary ledge
#

ok so

#

everytime you break a block there is a % that you will gain a level of jump boost

#

i have that down

#

but

#

if a player dies or drinks milk

#

i want to instantly add it back

frigid ember
#

ok

#

you can cancel the bukket event

wary ledge
#

what event

frigid ember
#

when a player consumes a bukket

#

check if its a bukket

wary ledge
#

but what if they are trying to clear other effects

frigid ember
#

then don't cancel it

wary ledge
#

my idea would work if it would run

frigid ember
#

or

#

wait

#

dont cancel it

#

save the effect

wary ledge
#
        Player player = (Player) event.getPlayer();
        if (jump.containsKey(player.getUniqueId())) {
            player.addPotionEffect(PotionEffectType.JUMP.createEffect(10000000, (jump.get((player.getUniqueId())))+0));
            player.chat("death");
        }
    }``` death is being sent but the effect is not
frigid ember
#

and give it back after consuming

edgy cove
#

Hi everyone

rare prairie
#

bye

edgy cove
#

I want to send a message from spigot to bungee and then I want to receive a response. How can I do that?

rare prairie