Managing Users Restricted from the World

If your world becomes popular and attracts a lot of players, there will be users that break the world's rules. The creator must place restrictions on those problem users for the benefit of all other users. You can ban players from the world short-term or permanently using PlayerBan and UserService within world insight for MapleStory Worlds. Once you restrict players with [World Insight] (https://maplestoryworlds-insight.nexon.com/worlds{"target":"_blank"}), if a restricted user closes their MapleStory World account and rejoins, the platform can identify the user's restriction history and carry on the restriction status.

To restrict users and limit their access to the world, you must complete 2 tasks.

  1. Register the user that will be restricted from World Insight.
  2. Write a script that checks restriction status in the target world.



## World Insight Restriction Registration

You need the user's User Id or profile code to restrict them.

### Restriction Permission

For group worlds, only the group leader or manager can register, remove, or view restrictions. The restriction status Period will be one of the following 3 options.

  * Banned: Currently restricted.
  * Scheduled: Scheduled for restriction.
  * Expired: Restriction over.



### Single Item Registration

  1. Press the World Insight - Player Ban - [\+ Register] button.
  2. Enter the value for each item in the pop-up window. [png](1779429047356782417c586b44a2ea88030b98828a4b6)
     * Profile Code/User Id: Identifier for the player that will be restricted.
     * Reason Key: The key for the restriction reason that the user will see upon accessing the world. The script uses this value as a key.
     * Start At : The restriction start date. The default value is the current time.
     * End At : The restriction end date. Not setting an end date will make the restriction permanent.
  3. Press the [Register] button to register the user that will be restricted.



### Mass Registration

If you need to restrict several users, you can use a CSV file to register them all at once. A CSV for registration/removal must follow a set format. Following a mass registration, the status of the Linked Profiles will change to Verifying. This is the process of navigating to see if any of the UserIds or profile codes that were registered for restriction are linked. Verifying takes up to 10 minutes. If there is a linked UserId or profile code after Verifying, it's marked on Profiles. If the linked User Id or Profile code has already left the service, it will show as Deactivated. If the registered UserId or Profile code is not valid, it will show as Invalid.

  1. Press the [Bulk] button and download the CSV file. [png](17793428771993464cd1479804b05870b0c1d69628e0a)
  2. Enter the user value that will be registered as restricted to fit the CSV file format.
  3. Add the CSV file and press the [Bulk] button.
  4. Once registration is complete, Linked Profiles will be Verified, which will take up to 10 minutes. [png](17793328909721ee2bad0f73e4abc92bfb78fa70f7895)
     * Verifying: The registered user's linked profile and prior restriction status is being verified.
     * Deactivated: The restricted user has closed their service account.
     * Invalid: The registered user's UserId or ProfileCode is invalid.



#### CSV Example

[{"Action":"REGISTER","PlayerIdentifyType":"ProfileCode","PlayerIdentifier":"AAAAA","ReasonKey":"Default","StartTime":"2026-04-30T07:00:00Z","EndTime":"2026-05-30T07:00:00Z"},{"Action":"REGISTER","PlayerIdentifyType":"UserId","PlayerIdentifier":"BBBBB","ReasonKey":"Scam","StartTime":"2026-04-30T07:00:00Z","EndTime":"nan"}]

  * Action: Represents the current restriction status. 
    * REGISTER: Restricts the user.
    * UNREGISTER: Lifts the restriction.
  * PlayerIdentifyType: The identifier type of the user that will be restricted. Select one of 2 and enter it. 
    * UserId: The account's unique UserId.
    * ProfileCode: The user's profile code.
  * PlayerIdentifier: The actual user identifier value that fits the type.
  * ReasonKey: The reason for the restriction. The creator must enter it themselves. The script uses this value as a key.
  * StartTime: The restriction start date. This can't be empty.
  * EndTime: The restriction end date. If one is not set, the restriction will be permanent.



## Removing Restrictions from World Insight

If a user is restricted for a limited time per the creator's world policies, then it must be manually lifted.

### Single Item Lifting

  1. Press the recylcing bin button for the item that will be removed. [png](1779342803306c58635df832d416f8eadbf69b27a750c)
  2. Press the confirm button to remove the restriction from the target user immediately.



### Mass Removal

If you have several restrictions to lift, you can use a CSV file to do it as a batch. CSVs for registration/removing must follow a set format. It can take up to 10 minutes to batch de-register.

  1. Click the Bulk button and select Unregister.
  2. Enter UNREGISTER for Action in the CSV file. 

[{"index":"Action","0":"UNREGISTER"},{"index":"PlayerIdentifyType","0":"UserId"},{"index":"PlayerIdentifier","0":"BBBBB"},{"index":"ReasonKey","0":"Scam"},{"index":"StartTime","0":"2026-04-30T07:00:00Z"},{"index":"EndTime","0":"nan"}]

  3. Upload the written CSV file and press [Register] for registration.



> Tip The restriction can't be removed while the Linked Profiles are being Verified. The restriction must be removed after the status change is complete.

## Restriction Processing in the World

After registering a restriction from World Insight, the creator must use the `[UserService](/apiReference/Services/UserService{"target":"_blank"})` method to write a script that confirms and processes the restriction status when the user enters. This is because the World Insight registration alone won't automatically block the user from entering.

  * `_UserService:IsUserBanned(string profileCode)`: Returns whether the user is a restriction target.
  * `_UserService:GetUserBanReason(string profileCode)`: Returns the user's restriction reason key.



### Restriction Processing Example

This is an example of checking a user's restriction status, displaying a restriction reason message pop-up if they are restricted, and then kicking the user from the world in 10 seconds.

  1. Create a new Logic.
  2. Change the name to `BanGateLogic` and write the following. 
         
         @Component
         script UserBanEnforcer extends Component
         property number kickDelaySeconds = 10
         
         @ExecSpace("ClientOnly")
         method void ShowBanPopup(string message)
         -- Display the restriction reason as a pop-up message.
         _UIPopup:Open(message, nil, nil)    
         end
         
         @EventSender("Self")
         handler HandleUserEnterEvent(UserEnterEvent event)
         local profileCode = event.ProfileCode
         local userId = event.UserId
         
         local isBanned = _UserService:IsUserBanned(profileCode)
         if not isBanned then
             return
         end
         
         local key = _UserService:GetUserBanReason(profileCode)
         local message = _BanReasonTable:GetMessage(key)
         
         -- Delivers the pop-up only to the target user's client.
         self:ShowBanPopup(message, userId)
         
         local delay = self.kickDelaySeconds
         _TimerService:SetTimerOnce(function()
             -- Kicks the user after showing the pop-up message.
             _UserService:KickUser(userId, KickReason.WorldContent)   
         end, delay)
         end
         end
         



    
    
    3. Create a new `BanReasonTable` Logic and write the following so that a message that matches the values entered in the World Insight's Reason Key.
    The example used DEFAULT, CHEAT, ABUSE, and PROFANITY for the Reason Key.
        
        ```lua
    @Component
    script BanMessageProvider extends Component
        method string GetMessage(string key)
        local reasons = {
            ["DEFAULT"]   = "You can"t enter this world because you broke the operational policy.",
            ["CHEAT"]     = "You can't enter this world because you used an exploit or cheat.",
            ["ABUSE"]     = "You can"t enter this world because your behavior harmed another user.",
            ["PROFANITY"] = "You can't enter this world because you used profanity or abusive language.",
        }
    
        if key == nil or key == "" then
            return reasons["DEFAULT"]
        end
    
        local msg = reasons[key]
        if msg == nil or msg == "" then
            return reasons["DEFAULT"]
        end
        return msg
        end
    end