1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Creative inventory

Discussion in 'Skript' started by Radicc, Oct 12, 2022.

Thread Status:
Not open for further replies.
  1. Radicc

    Radicc New Member

    Joined:
    Oct 7, 2022
    Messages:
    7
    Likes Received:
    0
    I want to see what items players take from the creative inventory mostly bcause i want to see if anyone is abusing and bcause there is certain items i dont want to be spawnable with creative. Can anyone help? I HAVE searched the docs and i tryied to google it too :emoji_slight_smile:

     
  2. Best Answer:
    Post #4 by lotzy, Oct 12, 2022
  3. lotzy

    lotzy Active Member

    Joined:
    Mar 15, 2022
    Messages:
    139
    Likes Received:
    22
    'Inventory click event skunity'?
    Are you try to google that?
     
  4. Radicc

    Radicc New Member

    Joined:
    Oct 7, 2022
    Messages:
    7
    Likes Received:
    0
    i tried but there is no event for creative and i tried to send "%event-item% from %inventory name%" does not work!
     
  5. lotzy

    lotzy Active Member

    Joined:
    Mar 15, 2022
    Messages:
    139
    Likes Received:
    22
    time to use skript-reflect for handle that!!!!

    Code (Text):
    1. import:
    2.   org.bukkit.event.inventory.InventoryCreativeEvent
    3. on InventoryCreativeEvent:
    4.   if event.getCurrentItem() is dirt:
    5.     send "You cant get this from creative" to event.getWhoClicked()
    6.     cancel event
    7.    
    [docs link]
     
    Radicc likes this.
  6. Sabified

    Sabified Member

    Joined:
    Jun 5, 2022
    Messages:
    46
    Likes Received:
    2
    You could just loop through all players and remove the items you don't want the players to have..
     
  7. lotzy

    lotzy Active Member

    Joined:
    Mar 15, 2022
    Messages:
    139
    Likes Received:
    22
    He want stop getting items from creative inventory
     
    Radicc likes this.
  8. Radicc

    Radicc New Member

    Joined:
    Oct 7, 2022
    Messages:
    7
    Likes Received:
    0
    i want SOME items to not be taken from the CREATIVE inventory.

    i also want to send a message to all players with a permission that says “%player% took %(dont know what to put herr)% from %event-inventory%”
     
  9. lotzy

    lotzy Active Member

    Joined:
    Mar 15, 2022
    Messages:
    139
    Likes Received:
    22
    alternative of event-inventory = event.getInventory()
    alternative of clicked event-item = event.getCurrentItem()
    alternative of event-player = event.getWhoClicked()
    Simply look at docs what I send , and make something like i wrote above
    upload_2022-10-13_12-47-18.png
     
    Radicc likes this.
  10. Radicc

    Radicc New Member

    Joined:
    Oct 7, 2022
    Messages:
    7
    Likes Received:
    0
    Thanks and sorry i dint see the docs link :emoji_grinning:
     
Thread Status:
Not open for further replies.

Share This Page

Loading...