GithubHelp home page GithubHelp logo

Server randomy crashes about skript HOT 5 CLOSED

Blizzmond avatar Blizzmond commented on September 22, 2024
Server randomy crashes

from skript.

Comments (5)

NotSoDelayed avatar NotSoDelayed commented on September 22, 2024

What if you use event-item instead of event-slot?

from skript.

Fusezion avatar Fusezion commented on September 22, 2024

Not sure why you're crashing but the issue stems from slot not referencing an inventory which should be impossible for anything using slot normally (excluding dropped items and other entities alike)

Any code of yours using a slot within line 41-X as a reference would be a huge help

from skript.

Romitou avatar Romitou commented on September 22, 2024

Probably a duplicate of #6458

from skript.

Romitou avatar Romitou commented on September 22, 2024

This is due to the event-slot event value, which can return an InventorySlot with null inventory (which happens when you click outside the inventory). I'm not sure whether this is normal or whether the checks need to be done elsewhere.

public Slot get(final InventoryClickEvent e) {
Inventory invi = e.getClickedInventory(); // getInventory is WRONG and dangerous
int slotIndex = e.getSlot();
// Not all indices point to inventory slots. Equipment, for example
if (invi instanceof PlayerInventory && slotIndex >= 36) {
return new ch.njol.skript.util.slot.EquipmentSlot(((PlayerInventory) invi).getHolder(), slotIndex);
} else {
return new InventorySlot(invi, slotIndex, e.getRawSlot());
}

from skript.

sovdeeth avatar sovdeeth commented on September 22, 2024

yeah duplicate of #6458

from skript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.